Need help with racing game code

Started by
2 comments, last by signal_ 13 years, 6 months ago
Hi there

I'm new to programming and my goal in school is to try to create a racing game. My group has decided to create a game similar to top gear SNES:



The problem is we don't know how to code our game to be like that of Top Gear such that our car stays in the middle of the screen, the road moves and a constant background in the back.

Could someone teach me how to code something like Top Gear SNES?
Advertisement
What will you be using to make this game? Will you be using a programming language or game making software? What platform? What APIs/libraries/etc. will you use?

As you can see a lot of information is missing for people to offer advice.

I watched the video and I observed the following:

1. The game looks like it was made in 2D using sprites.
2. The background of buildings at the top of the screen is a static image that is scrolled back and forth (wrapping around when necessary) proportional to the amount turned when traversing a 'curve'.
3. Car sprites: There are two things here, the player's sprite and the AI cars' sprites.
a. The player's sprite seems to have three frames: forward, bank left, and bank right. The player's sprite is always the same size and on the same y-coordinate (up-n-down) on the screen. The player influences the game by steering right-n-left, which corresponds to moving the sprite back and forth on the game screen's x-axis. Flourishes such as using the car bank frames and tire smoke mark sprites are used when turning/sharp turning.
b. The enemy AI cars are scaled up and down depending on how far they are from the player's position on the track (far away cars are small & a car that's on your front bumper is big).
4. The player's car does not move, the track is dynamic and creates the illusion of movement. The track has three basic images: straightaway, bank left, bank right. The lines on the tracks as well as signs outside of the track move and scale to give the illusion of movement. The movement is from the far away horizon diagonally to outside of the screen linearly all the while the scaling for away objects to be larger incrementally as they move from the horizon to the player. These objects give the illusion of movement that the player is 'driving' into the screen.

So that would be my rough plan if I were to want to clone this game. By the way people are not going to be able 'to teach you how to code something like' this. You are going to have to learn on your own how to make games. This forum can be a great help, but ultimately you'll need to learn on your own.

Also, if this is the first game you are attempting to make then don't; start simpler. This will be a difficult project for a team of beginners. Welcome to the forums.

ps: I found this crazy 'racing into the screen' game tonight made in Unity. Maybe it will provide more inspiration. Check it out: FOTONICA (requires Unity web plugin).
Quote:Original post by signal_
The track has three basic images

I wouldn't say the track has 3 basic images, but rather as you also state, it's dynamic. -It's composed of horizontal strips like other racing games from that time, such as Lotus, Outrun or Crazy Cars, for instance.

Depending on your skill and deadline, you could do this as a first project.
If your subject is programming with focus on real-time graphics, and you're doing this after many exercises as a final project, you should be able to pull it off.
I saw a good explanation on how to accomplish the strip-road effect. I'll post that when I get back home. Good luck with your project.

Quote:Original post by g0th1k4
I'm new to programming and my goal in school is to try to create a racing game
I agree with signal_; if you're all absolute beginners, I would go for text monopoly or console tetris instead. -Or perhaps do small tasks instead of one big project.

UPDATE: Corrected smartphone typos, and I found that linke after much searching:
Lou's Pseudo 3d Page

[Edited by - SuperVGA on October 20, 2010 1:28:21 AM]
Very cool link, SuperVGA. I was thinking of a slightly different way of achieving the same effect, but the way that the article you linked illustrates seems more flexible/robust.

This topic is closed to new replies.

Advertisement