# 2d racing game not mode7

This topic is 3797 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I want to make a 2d racing game like top gear, or test drive for snes.. http://snes.doomhead.net/images/roms/TopGear2_ss6.jpg http://www.consoleclassix.com/info_img/The_Duel_Test_Drive_2_GEN_ScreenShot4.gif Its not mode 7 like mario kart or fzero... I remember someone told me it deals with algorithms or some math word. But that was all he said. Sooooo...i cant google tutorials cause I dunno what this is called? this is not like mariokart or fzero

##### Share on other sites
These games took advantage of the scanline IRQ of the legacy consoles to determine the current line's position in the vertical axis, and using this info to look up different-sized bitmaps and/or fill area dimensions, offset by the left-right movement in the horizontal axis. The dashboards were just standard tile blits.

Game programming tends to require knowledge of various algorithms in math and programming. I don't mean to discourage you, but you should have a firm grasp in general programming and at least basic graphics programming before you can attempt making this type of game. If you have zero development experience now, it will take several years for you to make even this simple-looking stuff.

##### Share on other sites
Well Im ok with 2d programming. But 3d kicked meh a**. So since this includes math math mathy math. where shoulkd I start....

##### Share on other sites
In this type of game, I would imagine that knowledge and understanding of trigonometry (distances to angles conversion and vice versa) and linear algebra (transformations, vectors) would be beneficial. Actually programming using these concepts is not difficult if you do know what you're doing.

The games you mention are actually mostly 2D games even though they follow tracks that could be described in 3D; the track bending is just a trick where the color fill areas are shifted about according to the player's position on the track.

The track drawing engine used in them was necessarily 2D because 3D hardware was not readily available back then. Mode 7 in SNES was still 2D, even though it did incorporate a matrix transformation to give transformation effects (an application of linear algebra). SNES did have true 3D games later on but they required an additional processor on the cartridge (SuperFX).

##### Share on other sites
I somewhat folow wat ur saying. The difficult problem would be figuring out how the track/ race course works. Considering its like saved memory. its not like random curves and what not. Its a set track.

And then to call upon a certain bend or stop light or what ever. 3d racing game is much easier, lol.

The dashboard or car is like u said, just a tile or sprite. Ill do more research on this.

By the way, do u know of any fan games made with this type of technique?

##### Share on other sites
Quote:
 Original post by chocolate_ninjaI somewhat folow wat ur saying. The difficult problem would be figuring out how the track/ race course works. Considering its like saved memory. its not like random curves and what not. Its a set track. And then to call upon a certain bend or stop light or what ever. 3d racing game is much easier, lol.The dashboard or car is like u said, just a tile or sprite. Ill do more research on this.By the way, do u know of any fan games made with this type of technique?

The track could very well be a random list of curves that are traversed one after another. However, in most simulations of racing the track (and thus the curve list) is closed to somewhat emulate a real track. "Call upon certain bend" should not, therefore, be more difficult than keeping track of which curve you're in, and your position along that curve. Better yet, you could parametrize the whole track length to 0.0...1.0 and find the current curve and position along it based on that.

The only necessary difference of games discussed herein to 3D racing games is the task of drawing the view. The 2d drawing technique does impose limitations as compared to true 3d approach (no free view rotation in 2d).

Many years ago I remember having seen a project like this, but I don't remember any details about it. I have always considered this drawing style a necessary evil, when efficient 3d drawing operations are not available.

##### Share on other sites
An Alternative method which would yield to you some more graphically interesting results would be to use a Voxel Terrain engine to render the track. You could do the aformentioned "Call Upon A Curve/Road Piece" Method by creating Road Pieces out of Smaller Voxel Terrains and Traverse Them in a Random or Pre-defined manner. That way you can not only add Curves/Turns to your engine, but easily you can add Hills and simple structures that pass you along the road. Just make the road pieces long enough so that you don't see the end and before you get to the point where you would see the end shift into the next piece.

Another alternative is to create a Tile Based Voxel Terrain Heightmap Approach where you would create smaller tiles of different pieces of the track (Each of them being a Voxel Heightmap) and then use a 2D Tile Editor to create a map. Then Load up the map at runtime and you have a Mario Kart (SNES) style game, but with height so you can be speeding down the road through canyons, running over true jumps, whatever height-based geometry you want.

Hope that helps some.

##### Share on other sites
i get wat ur saying. but I dont fully understand the vortex thing....

i understand the concept, but Im not that advanced....

##### Share on other sites

Pixelate Magazine Voxel Terrain

Coder's Mind Voxel Terrain

It isn't a terribly hard concept to understand if you understand raycasting.

If you know how to rotate and transform points in 3D this may be more useful:
OTM Voxel

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 9
• 13
• 80
• 11
• 10
• ### Forum Statistics

• Total Topics
632969
• Total Posts
3009592
• ### Who's Online (See full list)

There are no registered users currently online

×