Hi All.
I am planning to make a pseudo 3d racing game like a old Lotus, Outrun etc...
I know how to create a straight track but i don't have any idea to make turns :sad:. And how to save file with course data ? Can anybody help me?
Sorry for my language, but i from poland and i'm still learning english
Pseudo 3D Racing game
Started by gumispl, Dec 17 2006 02:19 PM
7 replies to this topic
#1
Posted 17 December 2006 - 02:19 PM
#2
Posted 17 December 2006 - 08:12 PM
From what I remember of Outrun, a turn would simply be a picture of a bent track, with forces applied sideways. Lotus Challenge was a bit more complex, as the track could turn in diffrent directions at the same time.
A track file would be a simple list of road sections, like "straight", "left", "bump", "right", "left"... etc.
A track file would be a simple list of road sections, like "straight", "left", "bump", "right", "left"... etc.
#3
Posted 17 December 2006 - 10:09 PM
The way the psuedo 3d games like OutRun used to work is that there would be a paletted display with a raster interrupt or similar coprocessor changing the horizontal offsets of the streight track using pointers and also the same raster interrupts were changing the color palette mid-screen to make the stripes on the road and color of the undulating grass at the sides of the road.
PC hardware isn't capable of generating interrupts based on the screen positions of rasters and doesn't have a coprocessor for accomplishing that function either. You'll be better off with a color look-up table and blitting horizontal lines instead.
PC hardware isn't capable of generating interrupts based on the screen positions of rasters and doesn't have a coprocessor for accomplishing that function either. You'll be better off with a color look-up table and blitting horizontal lines instead.
#4
Posted 17 December 2006 - 10:49 PM
Why would you need interrupts and palettes to fake an undulating road, when you have quite capable 3D accelerators? Even Outrun and its predecessors had to do some 3D for the sprites, vehicles and decorations.
#5
Posted 18 December 2006 - 03:43 PM
Jare is right. A real 3d game would be just as easy as a fake 3d one.
#6
Posted 18 December 2006 - 09:12 PM
As long as you don't go overboard and try to over-do Trackmania, of course. ;)
#7
Posted 27 December 2006 - 08:39 PM
I have a small problem with implementing pseudo 3d engine 
Part of code:
This code should draw road using this image (resized):

'Road' is board of TRoad record with x,y,width,height integers. On start game to Road[x].y are asigned values:
Road[10] is on the bottom of road, Road[1] on the top of road (in the middle of screen).
I don't know how to calculate pattern which set valid road[x].height :/
Please help.
Part of code:
for temp := 10 downto 1 do begin road[temp].height := ?????????? road[temp].width := road[temp].height*16; road[temp].x := 400 - (road[temp].width div 2); end;
This code should draw road using this image (resized):

'Road' is board of TRoad record with x,y,width,height integers. On start game to Road[x].y are asigned values:
Road[10].y := 550; Road[9].y := 511; Road[8].y := 480; Road[7].y := 456; Road[6].y := 437; Road[5].y := 422; Road[4].y := 410; Road[3].y := 400; Road[2].y := 392; Road[1].y := 385;
Road[10] is on the bottom of road, Road[1] on the top of road (in the middle of screen).
I don't know how to calculate pattern which set valid road[x].height :/
Please help.
#8
Posted 28 December 2006 - 02:01 AM
I think most psuedo3d games use only one row of pixels resized to draw the road instead of a whole road section, or more precisely two horizontal patterns: with stripes and between stripes. The reason you do it that way is to make the curve drawing easier.
I've never made a psuedo3d race engine before but I think the way it works is that you have a step value as you go up the screen and you decrease the width with a linear progression and the height of the stripes with an parabolic progression. In order to do the parabolic progression, you make an intermediate step value that determines what to set the step value of for the actual stripe length.
Something like this for example:
I haven't tried this code yet but to generate curves with it you use another step3 variable to be the horizontal step that adds to midscreenx as the screen plotting goes higher.
I hope I'm explaining myself clearly. Unfortunately I don't know all of the answers.
I've never made a psuedo3d race engine before but I think the way it works is that you have a step value as you go up the screen and you decrease the width with a linear progression and the height of the stripes with an parabolic progression. In order to do the parabolic progression, you make an intermediate step value that determines what to set the step value of for the actual stripe length.
Something like this for example:
step=max_pixels;
step2=0;
while (step>1)
{
plotpattern(midscreenx-(step/2), screenbottomy-step, step, 1, image[step2 % 2]);
step--;
step2+=step;
}
where plotpattern accepts parameters of x position, y position, width, and height and uses step2 to generate the non-solid stripe patterns. I can't quite think of how to generate the stripe patterns, though, so that image[step2%2] may be wrong.I haven't tried this code yet but to generate curves with it you use another step3 variable to be the horizontal step that adds to midscreenx as the screen plotting goes higher.
I hope I'm explaining myself clearly. Unfortunately I don't know all of the answers.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











