Jump to content

  • Log In with Google      Sign In   
  • Create Account


wildbunny

Member Since 22 Jan 2011
Offline Last Active Jan 19 2013 06:39 AM
*****

Posts I've Made

In Topic: An "AABB Physics Engine"

19 January 2013 - 06:35 AM

Hi there,

 

I wrote a series of articles about the process of creating a 2D platform game which uses AABBs exclusively for collision detection. Here is a link to the article which covered the collision detection and resolution:

 

http://www.wildbunny.co.uk/blog/2011/12/14/how-to-make-a-2d-platform-game-part-2-collision-detection/

 

There is some free downloadable source-code linked in the article as well which should get you off to a good start :)

 

Cheers, Paul.


In Topic: Link to a Game development themed math primer?

16 October 2012 - 10:10 AM

I wrote this primer / reference material a while back:

http://www.wildbunny.co.uk/blog/vector-maths-a-primer-for-games-programmers/

Cheers, Paul.

In Topic: Dynamic friction 2D rigid body

07 October 2012 - 11:50 AM

First of all you'll need an equation which lets you remove velocity in one dimension via an impulse. If you have frictionless collision resolution working already, you have this equation to hand (you're using it to remove velocity in the contact normal direction).

So, next step is to find the velocity component in the tangential direction that you want to remove to create friction.

* Form the tangent vector using the perp operator on the contact normal
* Get the relative tangential velocity by dotting total relative contact point velocity against the tangent vector
* Now, you can then generate an impulse to remove some or all of this tangential velocity (most text books say the magnitude of this impulse should be bounded by the magnitude of the normal impulse, but if you just want infinite friction, remove the whole lot)

Job done Posted Image

In Topic: Racing game: multiplayer networking with physics

18 September 2012 - 02:00 PM

Take a look at my little multi-player version of Asteroids, the mechanics are actually quite similar to a racing game where the cars have weapons:

http://mmoasteroids.wildbunny.co.uk/

If there's anyone else playing when you try it you might be able to see the mechanics you're after working.

My server is authoritive over everything except the position of each player; but to mitigate the inherent problems with that, the server simply clamps the maximum speed of each player so no cheating is possible.

I simulate on client and server - the only thing I don't do that you'll require is collision between players.

In Topic: Weapon firing prediction timing issue on Client / Server

16 September 2012 - 11:46 AM

This problem is quite hard - you need to have the client tell the server how many fixed sized time-steps there were between key-actions, then the server can correct forward or backwards (by rewinding time).

PARTNERS