Sign in to follow this  
jagguy2

2D car games

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this