i am planning to make racing game in android.I have created many applications in different mobile technology. but i am pretty much beginner for game application. So my question is how can i make race track in android? How should i show that car is moving on that race track. I have the images of cars and race track. But i have no idea how should i show the part of race track and how should show that car is moving on that track??
THE MINIMUM acreage required for building a half-mile track is approximately 17.5 acres, compared to 27 acres for a five-eighths-mile track and 55 acres for a mile track. This includes the outer embankment but does not include land for buildings, parking, a road encircling the track, and other needs.
I suggest you download AndEngine ( an open source 2d android game develoopmnent framework ). In the examples there is a (very simple) race track demo with a movable car + controls + obstacles. If you have troubles you can always get support from the forums
AndEngine has a very easy learning curve :-)
Have fun creating your racing game!!
Here are 2 good tutorials on starting with 2d:
- Canvas tutorial
- OpenGL tutorial
The last part, about showing only a part of the map, can be achieved by using a BoundCamera
in AndEngine.
You should start with studying the 2D graphics capabilities of the Android library. Here's another good reference article. It lists some drawing options including drawing to the Canvas object which is probably the right choice for the kind of game you're describing.
Here's a full but simple example of handling the onDraw event for a canvas and performing custom drawing. Here's a small bit of the code:
paint.setColor(Color.BLUE);
canvas.drawCircle(20, 20, 15, paint);
The above is a simple example that draws a circle with a particular size to a particular location on the canvas. It's a good place to start. To finish your game you'll be drawing bitmaps which is a more complex process but conceptually similar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With