Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Pinpickle

Member Since 18 Jan 2013
Offline Last Active Feb 13 2013 01:04 AM

Topics I've Started

An "AABB Physics Engine"

18 January 2013 - 03:36 PM

I've been working on the physics for my 2D game and for the past two weeks it's been doing my head in. I wanted something a little more complicated than what you see in 2D platformers, but I wanted to keep the feel of them by making it far less than realistic (for example, angles are out of the question). Because of this, I don't want to just implement a more comprehensive physics engine that already exists like Box2D and just disabling rotation on every body as it has so many extras that I won't be using that will be wasting valuable processing time - this game is going to be running on mobile devices so that is quite important.

 

I call this kind of physics engine I'm trying to make an AABB physics engine, as all bodies will be rigid and rectangular in shape. I can't find any documentation on something like this anywhere. I thought that I could take the really basic platforming engine that I could make in my sleep (object has horizontal speed and vertical speed, move until it collides, stop at collision point and set either horizontal or vertical speed to 0 depending on collision), and then put in some more "real world" physics such as manipulating objects through forces rather than directly changing the speed, and implementing friction on  every body. It didn't take long for me to realise that the code was just getting messy and ugly and I needed to start that from scratch and that's sort of been me for the past week reading up as I've never delved far into the physics part of games. Problem is, most tutorials and resources deal with things that I'm not interested in, collision detection with shapes that aren't rectangles, and angles, it's frustrating.

 

So I'm looking for a starting point, or some really useful documentation, or even a physics engine like this that already exists, I'm writing this game in AS3.


PARTNERS