Jump to content

  • Log In with Google      Sign In   
  • Create Account


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

#5023157 An "AABB Physics Engine"

Posted by on 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:




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


Cheers, Paul.

#4996290 10 steps to becoming a better programmer

Posted by on 01 November 2012 - 01:38 PM

Hi guys,

Just written this article that you might find useful; 10 things which have helped me become a better programmer and be more productive in general:


Hope it helps!

Cheers, Paul.

#4990774 Link to a Game development themed math primer?

Posted by on 16 October 2012 - 10:10 AM

I wrote this primer / reference material a while back:


Cheers, Paul.

#4987724 Dynamic friction 2D rigid body

Posted by on 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

#4980664 Weapon firing prediction timing issue on Client / Server

Posted by on 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).

#4978636 Better way of doing constraints

Posted by on 10 September 2012 - 11:19 AM

Hi there,

Sure, you need to design your constraint so it works in 'relative space' and pushes on object A while pulling on B.

I wrote just the article which should help you out with understanding how to design a constraint:


It starts off dealing with simple concepts and builds up to designing a constraint :)

Hope that helps!

Cheers, Paul.

#4963914 Achieving oldschool platformer physics

Posted by on 28 July 2012 - 05:30 AM

I wrote a series of articles about making an old-school 2d platformer using modern techniques, including a physics engine:


Hope they help!

Cheers, Paul.

#4947785 Collision in physics

Posted by on 09 June 2012 - 05:37 PM

Have you read my article 'physics engines for dummies' where I cover the basics of a physics engine?


Cheers, Paul.

#4942975 Simply Grasping Collisions and Contacts

Posted by on 24 May 2012 - 12:55 PM

Thanks for posting those links Raigan :)

The OP might also appreciate this article, in which I describe generating the full contact set (among many other things) from the closest feature pairs returned by SAT, or minkowski difference:


Just part of implementing a physics engine capable of playing angry birds - hence the title :)

Cheers, Paul.

#4935482 2D isometric: screen to tile coordinates

Posted by on 27 April 2012 - 04:32 PM

I wrote an article on the subject a while ago: http://www.wildbunny.co.uk/blog/2011/03/27/isometric-coordinate-systems-the-modern-way/

Hope it helps!

Cheers, Paul.

#4924753 Edge-Face Collision detection between sphere and box

Posted by on 23 March 2012 - 03:24 PM

I'm a little confused - spheres don't have faces, or edges - are you talking about a polygonised sphere?

In which case you want convex vs convex polyhedra?

#4914160 Linear Algebra and Calculus 3

Posted by on 18 February 2012 - 05:11 AM

I wrote this article aimed at game developers which covers vector mathematics - you might find it helpful :)


Cheers, Paul.

#4914159 Colision 2D - getting push vector

Posted by on 18 February 2012 - 05:08 AM

Hi there,

Your push directions are incorrect - the for rect vs rect the push directions are always either in the x or y axis only.

This article I wrote should give you some ideas, although not the complete answer: http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/

If you shrink one box A down to a point, and then increase the dimensions of the other box B by those of box A, the push vector can be found as the shortest distance from the point (box A) to the edges of box B.

Hope that helps!

Cheers, Paul.

#4910234 Vector maths - a primer for game programmers

Posted by on 06 February 2012 - 12:28 PM

Hi guys,

Just finished a new set of resources on vector maths - hopefully it should be accessible to beginners as well as providing some decent reference for intermediate level programmers.


Cheers, Paul.

#4907171 2d tile collision advice

Posted by on 28 January 2012 - 05:16 PM

I wrote this article on tile collision detection which should give you some pointers:



Cheers, Paul.