Zooming on 3D Race Games

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Re: Zooming on 3D Race Games

Postby DST » Sun Jan 30, 2011 2:42 am

Well part of the secret is the map itself. It only stores a number - that number is used for the color of the square but also the number of lines to draw.
Thus the track borders with a value of 4 are complete squares, while the 'rest of the world' is 2-line Lshapes that form a grid, to cut back on the total number of lines to transform.

Their actual xy in the transformation is just assigned from their position in the array.


Just thought of another speedup: ditch the array cell draw, and calculate the start and end of all the lines on the grid as huge lines from left to right, and top to bottom. Easy enough. Then simply draw black lines over them for the main track center.

That would result in probably 1/4 the total number of lines.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Zooming on 3D Race Games

Postby Bee-Ant » Sun Jan 30, 2011 8:42 am

Wow Dee, If I'm not mistaken you made the same thing before...it's Picodrive or something?and this is way better :D
But you can't compare this with GAG's demo...
This uses lines only while GAG's uses images...so of course this demo gets a faster fps ;)
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Zooming on 3D Race Games

Postby tintran » Sat Aug 06, 2011 12:42 am

having been to the forum for a while, just tried DST's Neon Z racing.
I got flickering between 20 to 30 frames.

OS: Linux Fedora release 14
cat /proc/cpuinfo gave me more info than I was looking for
processor: 0 model name: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ cpu MHz:1000.000 cache size: 512 KB
processor: 1 model name: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ cpu MHz:1000.000 cache size: 512 KB


Unrelated to the game Neon Z racing: I think it's probably alot faster than 20 to 30 frames, since i ran the .exe (probably got executed by WINE under Fedora), because when I run GE for linux, it is fast and not laggy like when i just run the GE (not for linux) it probably runs under WINE again and i can see it lag when i try to resize the main GE window or move it around. 20-30 fps is still pretty smooth.
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: Zooming on 3D Race Games

Postby tintran » Sun Aug 07, 2011 5:11 am

@Game A GoGo, no, i don't mind at all (actually awed that someone would try and understand my code, i have problem understanding my own code after a week or so) :shock:
how did you get that tile.bmp to show as ground? did you pixel by pixel it? and i don't know what mode 7 is. :?:
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: Zooming on 3D Race Games

Postby Game A Gogo » Sun Aug 07, 2011 1:30 pm

The ground was pixel duplicated (3 times I think, so 1 pixel is 9 pixel big...) to reduce lag.

Mode 7 was a special drawing mode on the Super Nintendo, it allowed you to stretch.skew and a few stuff. Thus allowing "3D" games to exist on the super Nintendo.

Of course, the Super Nintendo had a chip to process this quickly and a chip specially designed to access the entire image map in a split second, while GE struggles A LOT with data processing.

And about understanding your code... I know what you mean :P
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Zooming on 3D Race Games

Postby DST » Tue Oct 25, 2011 3:07 am

Okay, dunno why i didn't do this before but here's the source if anyone wants to look into it.

All the important 3d stuff is in canvos>draw actor. Toward the bottom you will find the transformations.

It's pretty complicated but if you can understand the transformations then you can do 3d in anything.

NeonZRacingByDST.zip
(507.06 KiB) Downloaded 295 times
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Zooming on 3D Race Games

Postby JamesLeonardo32 » Tue Nov 08, 2011 4:05 pm

DST wrote:Okay, dunno why i didn't do this before but here's the source if anyone wants to look into it.

All the important 3d stuff is in canvos>draw actor. Toward the bottom you will find the transformations.

It's pretty complicated but if you can understand the transformations then you can do 3d in anything.


O wow, impressive job again, sir DST.
JamesLeonardo32
 
Posts: 320
Joined: Wed Oct 13, 2010 4:57 pm
Score: 36 Give a positive score

Previous

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest