A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Platformer Physics Programming! @_@

  1. #1
    Junior Member
    Join Date
    Jan 2008

    Question [F8] Platformer Physics Programming! @_@

    Hey there, I'm working on a sidescroller/platform game with heavy emphasis on the physics of geometric objects such as boxes, balls, and other things the main character can interact with. (I may even put in a Tarzan-esque rope swinging system, but that's waaaaay out of my league for now ^__^; )

    So, I've been looking around forums and tutorials for a good way to set up a collision system that goes beyond Flash's primary hitTest function. I tried places like Emanuele Feronato, Kirupa, APE, and a few others, but they are a bit too complicated for me. I completely understand the physics utilized in such games, but I have a very limited idea of how to program them.

    So far I've made a hitTest system with different variables like acceleration, friction, jumping power, etc. for a main character to run around and jump on a platform. But, I'm stumped when it comes to sloped grounds that many platformer gamers have. You know, like Sonic, Mario, N Game, all those use a very imaginative array of elevations and slopes for the character to move on. But in my game, there are various objects that fall and slide around the ground like everyday boxes or beach balls, and they have to collide with one another. Also, these objects need to rotate based on their center of gravity until they reach a rest position (if a box is placed on a slope, it tilts forward until one of its sides is in complete contact with the ground, then it slides due to gravity and friction). HitTest isn't very useful for thus, because all I can to is set up collisions based on the rectangular hit boxes of objects, or their center x,y coordinates. I would really like to use the Separating Axis Theorem discussed by Metanet, but does anyone know of a simpler tutorial that basically teaches how to set up an advanced collision system from scratch?

  2. #2
    5+5=55 Schfifty Five's Avatar
    Join Date
    Jun 2006
    Honestly, I think you'd be better off just using a premade physics engine if you can wrap your head around one.

    You've already tried APE, but you should check out Glade:

    And Box2D Flash:

  3. #3
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    London, UK
    have a look at http://www.cove.org/flade/ as well ..also to get a better understanding of flash with physics i would recommend usign the book Animating with Actionscript by keith peters
    Flashmatics | Flashmatics Library (free downloads)
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    Flash Certified Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center