Skip to main content
added 5 characters in body
Source Link
Cypher
  • 1.3k
  • 1
  • 10
  • 18

I would suggest something you haven't listed.

Don't "create" your track at all.

Rather, define it indirectly by placing a bunch of collide-able objects around wherearound where you want your track to be. Walls, old cars, wrecked buildings, semi-transparent-laser-beams... whatever you want. Heck, they don't even have to be visible. Then you can do your collision against those objects.

This has the benefit of being relatively fast, because each of those objects will end up just being a rectangle, and now you can just test for rectangle intersections.

In my opinion, this is the simplest way to go for any racing game, especially 2d.

I would suggest something you haven't listed.

Don't "create" your track at all.

Rather, define it indirectly by placing a bunch of collide-able objects around where you want your track to be. Walls, old cars, wrecked buildings, semi-transparent-laser-beams... whatever you want. Heck, they don't even have to be visible. Then you can do your collision against those objects.

This has the benefit of being relatively fast, because each of those objects will end up just being a rectangle, and now you can just test for rectangle intersections.

In my opinion, this is the simplest way to go for any racing game, especially 2d.

I would suggest something you haven't listed.

Don't "create" your track at all.

Rather, define it indirectly by placing a bunch of collide-able objects around where you want your track to be. Walls, old cars, wrecked buildings, semi-transparent-laser-beams... whatever you want. Heck, they don't even have to be visible. Then you can do your collision against those objects.

This has the benefit of being relatively fast, because each of those objects will end up just being a rectangle, and now you can just test for rectangle intersections.

In my opinion, this is the simplest way to go for any racing game, especially 2d.

Source Link
Cypher
  • 1.3k
  • 1
  • 10
  • 18

I would suggest something you haven't listed.

Don't "create" your track at all.

Rather, define it indirectly by placing a bunch of collide-able objects around where you want your track to be. Walls, old cars, wrecked buildings, semi-transparent-laser-beams... whatever you want. Heck, they don't even have to be visible. Then you can do your collision against those objects.

This has the benefit of being relatively fast, because each of those objects will end up just being a rectangle, and now you can just test for rectangle intersections.

In my opinion, this is the simplest way to go for any racing game, especially 2d.