Defining the track in a 2D racing game

Posted by Ivan on Game Development See other posts from Game Development or by Ivan
Published on 2012-06-04T13:56:23Z Indexed on 2012/06/04 16:55 UTC
Read the original article Hit count: 274

Filed under:
|
|

I am designing a top-down racing game using canvas (html5) which takes a lot of inspiration from Micro Machines. In MM, cars can move off the track, but they are reset/destroyed if they go too far.

My maths knowledge isn't great, so I'm finding it hard to separate 3D/complex concepts from those which are directly relevant to my situation. For example, I have seen "splines" mentioned, is this something I should read up on or is that overkill for a 2D game?

Could I use a single path which defines the centre of the track and check a car's distance from this line? A second path might be required as a "racing line" for AI.

Any advice on methods/techniques/terms to read up on would be greatly appreciated.

© Game Development or respective owner

Related posts about html5

Related posts about canvas