2D car games

Started by
6 comments, last by jagguy2 15 years, 8 months ago
If I want to make a 2D car game with an aerial view, do I use a tile map for the road or something else. I want to drive on the road which makes up 1/3 of the screen and when i drive off the road on grass I will either slow down or crash. SO it is too big to display as an image and the course will scroll in all directions. I dont like tiled games but in this case I dont know what else to do?
Advertisement
The way I would probably do it is use an array, and have it so like 0 is the road and 1 is the grass. Then make an image for each of the numbers.

Then make it so when the car goes on the number 1 tile make it slow down.

The only problem I will see with this is that if you dont make corners, like tiles with corner road pieces, the track will look a bit square, so if you do this method make sure you do corners aswell
What is it that you don't like about tiled games?

Assuming it's because you don't like the blocky look then you could always just store the track in a vector format. One way would be to draw the map in inkscape and use that as your map format. Then on loading you could generate suitable track geometry for roads and grass, as well as any transitional edges needed.
i dont hate tiled games
I only use bitmaps and i dont want to draw on the screen.

I am not sure what else i can do apart from tiled approach in this case. I didnt understand what the other post was about.

where can i get some road tiles from?
Quote:Original post by jagguy2
i dont hate tiled games
I only use bitmaps and i dont want to draw on the screen.


Don't want to draw on the screen? I think you're pretty much toast. I don't see how we can help. [lol]

Seriously though, what's that mean? Drawing bitmaps on the screen is pretty much it for most 2d graphics
i meant loading bitmaps from a file then displayed on screen
I faced a similar dilema when i wrote my commercial over head car game "Auto Cross Racing" available here

http://www.kjmsoftware.co.uk/auto_cross_racing/auto_cross_racing.htm


I ended up using 3d models for the cars and tracks, although they are all viewed from above.

The track was easy to create by lofting a spline in a 3ds max and exporting it as a .3ds model, which allowed for a smooth curvy road.

3d also allowed me to use different camera modes. Static cameras which don't rotate with the car and others that do rotate, also with auto zooming.

Allows for alot of flexibility.

KJM
i am after some 2D tiles to make a road and scenery for 2D game

This topic is closed to new replies.

Advertisement