Racing Game question
by Alkor · in iTorque 2D · 12/08/2011 (12:26 pm) · 4 replies
Any idea how to implement a track for a top down racer?
It seems pretty hard but maybe I am missing something.
Someone did this before?
It seems pretty hard but maybe I am missing something.
Someone did this before?
#2
I create a circular track with the size of the screen.
Afterwards what do I do? I create in Illustrator or Photoshop the reverse of the track and put it as a collision polygon?
Also ... what if I want to display only a portion of the track. For example the car is in the middle and based on acceleration and speed I "fast forward" a track.
Is that possible in any way?
12/09/2011 (12:26 am)
Could you be a little more clear about what you said?I create a circular track with the size of the screen.
Afterwards what do I do? I create in Illustrator or Photoshop the reverse of the track and put it as a collision polygon?
Also ... what if I want to display only a portion of the track. For example the car is in the middle and based on acceleration and speed I "fast forward" a track.
Is that possible in any way?
#3
12/11/2011 (12:09 am)
I would recommend making your track as a tile-map and then mount the camera to the car so that you can make larger levels.
#4
I threw together a video of what I was thinking of. I wound up needing more collision polygons to represent the outside of the track as the collision poly has to be convex.
12/11/2011 (11:43 am)
@Alkor,I threw together a video of what I was thinking of. I wound up needing more collision polygons to represent the outside of the track as the collision poly has to be convex.
Ray Delia
SK Studios
There are probably a bunch of ways to go about the challenge. Here is a n easier one:
Create a background image the size of your screen, with a simple circular racetrack on it. Import that into your project, and place it on the scene, and add it to the data blocks.
Then create two blank scene objects, and make them fill the entire screen. (use the editor to size and position)
use one scene object to create a collision polygon for the area inside the track bounds (not the track itself)
use the other scene object to create a collision polygon for the area outside the track.
Now you should have two collision polygons that could prevent your object from going off the track.
Now you just have to make a car or something that can drive along, and make it respond to collisions so it can't go off of the track.