NEED HELP FOR RACING GAME

Posts

Pages: 1
I want to make a racing game, the car is at the center of the screen (think of NeedForSpeed, Burnout, or others). The problem is I want to make it in 2d, not 3d. How could I make the screen "move" towards the player, not the car moves?

Thanks in advance
kentona
I am tired of Earth. These people. I am tired of being caught in the tangle of their lives.
20742
...in what maker? Seriously, people, be more descriptive in your requests.
Ocean
Resident foodmonster
11243
If you make the map 9 tiles bigger in every side, and have that part not be driveable in, I believe your character should remain in the middle of the view because you'll never hit any of the edges of the actual map. Well, that's what I'd do in RM2K3 if I weren't relying on a panorama for that.
@kentona :
Oh I'm sorry. In RPGMaker XP.

@Ocean :
So, from bird-eye view isn't it. That's worth a try. Thanks.

Anyway, other than bird-eye view can I view like NeedForSpeed like that? (3rd person view I think)
Do you know how to use Sin and Cos in relation to your X and Y movements based on what angle between 0 and 360 your car is at? For any 2d vehicle (Imagine top down) you need to be faimilar with the maths.

As previously mentioned, you do now move the vehicle but you move the environment surrounding the vehicle in the opposite direction to simulate movement.

Your car will be moving at a velocity where velocity is speed and given direction. In pseudocode you need to have variables for the following.

Angle
Speed (Scalar)
X Position
Y Position

You can't just move your car diagonally though, you have to figure out the next X and Y components using sin and cos.

I.e.
x = x + speed * cos(angle)
y = y + speed * sin(angle)

Where x and y are the top left corner of the map when the car is placed in the middle of the screen.

I made a game like this in Flash using actionscript however, if you're starting out making racing games I would recommend something like Clickteam's The Games Factory.

Ive made a lil side scrolling car game

what I think you should do 1st you need 5 set's for the car up leftangle right angle ect
then go to scene map or spriteset map set the character location on the map to the bottom of screen instead of middle....

alright then make a map with the maximum height the width depend's on how many turn's you want in the road....anyway make a parralell process then set a conditional brance if up is pressed the car goes faster then set another brance in the 2nd part of the 1st brance....set it to if down is preesed spped goes to default...

you get the idea???

then set a new brance for left make the car move left and change graphic for 1 second then set back to middle

(same for right)


the all important part is for when the player does nothing the car moves frward


then set the obstacles cars ect on the map

then make a massive fog graphic add pillars on either side get it to scroll down (speed 5)

Pages: 1