Genny and 3D

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed May 09, 2007 4:41 pm

Shiru wrote:
Stef wrote:The 3D level of Toy Story is the most impressive imo. I do want to examine that game :p
The main trick is that they only render half of screen and use vertical flip for the other part, anyway, this is still quite impressive :)
I slightly examined all raycasting games on SMD some time ago, and interesting thing is that Bloodshoot uses same trick. Up/down halfs just slightly alters by different palettes (for example, skull on first door is just palette change).
Did you already saw the 3D level of ToyStory ? imo it's by far the most impressive :)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed May 09, 2007 4:56 pm

Yes, of course I saw it (I even write extracters for textures from TS, ZT, BS, DN3D). But TS has more impressive effects (like polygons between BG layers and very big animated objects like walking foots), than 3D-level. Although this level looks cool for first look, it's not so technically advanced. Yes, it has fake 'textured' floor (some vectors), and decent framerate, but nothing else. Framerate comes from mentioned trick (mirroring up/down halfs) and many limitations.

ZT and BS technically far superior. Both of them has non-ortogonal walls with different size (3D level of Toy Story looks like simple orthogonal tile-based raycaster); BS also has moving parts of level (doors has thickness). And objects (sprites) with overlapping and etc.

By the word, there is another funny thing with BS - it uses sprites layer to draw objects.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed May 09, 2007 7:10 pm

Shiru wrote:Yes, of course I saw it (I even write extracters for textures from TS, ZT, BS, DN3D). But TS has more impressive effects (like polygons between BG layers and very big animated objects like walking foots), than 3D-level. Although this level looks cool for first look, it's not so technically advanced. Yes, it has fake 'textured' floor (some vectors), and decent framerate, but nothing else. Framerate comes from mentioned trick (mirroring up/down halfs) and many limitations.

ZT and BS technically far superior. Both of them has non-ortogonal walls with different size (3D level of Toy Story looks like simple orthogonal tile-based raycaster); BS also has moving parts of level (doors has thickness). And objects (sprites) with overlapping and etc.

By the word, there is another funny thing with BS - it uses sprites layer to draw objects.
In a pur technical point of view, Toy Story isn't the best for sure... but it's probably the best in a graphical point of view and on the frame rate basis, this is imo the best choice regarding the genesis hardware. I always prefer good frame rate above "features".
One other technically impressive 3D game is Duke Nukem 3D : it looks really awful but the 3D rendering don't use the H-flip trick and the display window is large :)

Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Wed May 09, 2007 9:17 pm

I think its possible to do incredible things on md, it just depends on the time and energy spent to set the algorithm (and the way you push the precalculation far away, usualy mad and nuts).

ZT is extremely impressive around the enemies, in some levels, you can have like 50 spiders on screen... wow ^^ However, the wall raycast is a bit... umm, poor...

I wonder why no genesis games had simple additional hardware inside (like bmp2tiles SRAM mapper or a transformation cpld) to help... really, there weren't many games using those things in around 1000 releases ^^... Stef, It may not be too late ;)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu May 10, 2007 12:50 am

Stef wrote:I always prefer good frame rate above "features".
From all 3D games on MD I personally prefer BS, both for features and gameplay. But unfortunately it really suffers of awful framerate.
Stef wrote:One other technically impressive 3D game is Duke Nukem 3D : it looks really awful but the 3D rendering don't use the H-flip trick and the display window is large :)
DN3D uses 'vertical scanlines' trick instead, so game window is not so big as it looks.
Fonzie wrote:However, the wall raycast is a bit... umm, poor...
Look also to door raycast, it's funny. I even doubt that ZT uses typical raycasting (maybe not for doors) because of it. Find any door in narrow corridor (like |-|), stand very close to front of door (just before door opens), rotate around, while look at angle between wall and door. Perspective of door and wall does not match while you rotate.
Fonzie wrote:I wonder why no genesis games had simple additional hardware inside (like bmp2tiles SRAM mapper or a transformation cpld) to help...
All because of price of hardware, I think. In our days, it's now not a problem to implement something like it, even easy enough for hobbyists (with all of these crazy fast MCU's and large FPGA's). But for me personally, there is no challenge with adding something like 160 MIPS co-processor in game cartrigde:) Push the limits of old hardware more interesting, I think.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu May 10, 2007 5:27 am

One great solution to framerate problems if overclocking. Just 2 extra MHz and PAL configuration gives a decent performance boost.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

MG
Very interested
Posts: 56
Joined: Wed Feb 28, 2007 8:41 am
Contact:

Post by MG » Thu May 10, 2007 9:53 am

TmEE co.(TM) wrote:One great solution to framerate problems if overclocking. Just 2 extra MHz and PAL configuration gives a decent performance boost.
éh éh, yeap, of course, but i suppose that's the goal to touch is to make the best 3D frame rate with the basic hardware ;)
Ah ? ben si ? pourquoi pas...

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu May 10, 2007 12:40 pm

Well of course , but OC helps a lot with existing 3D games that run poorly, for example ZT runs really good then, also BS and DN3D.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu May 10, 2007 6:15 pm

Shiru wrote:
Stef wrote:One other technically impressive 3D game is Duke Nukem 3D : it looks really awful but the 3D rendering don't use the H-flip trick and the display window is large :)
DN3D uses 'vertical scanlines' trick instead, so game window is not so big as it looks.
vertical scanline trick ? what are you speaking about ? maybe you mean the pixel doubling on X axis...
I just tested blooshot again. The display window isn't that bad, the 3D rendering is quite "clean" ! but the frame rate is really bad :-/ I guess it's the cost of this nice and complexe rendering :)
Fonzie wrote:However, the wall raycast is a bit... umm, poor...
Look also to door raycast, it's funny. I even doubt that ZT uses typical raycasting (maybe not for doors) because of it. Find any door in narrow corridor (like |-|), stand very close to front of door (just before door opens), rotate around, while look at angle between wall and door. Perspective of door and wall does not match while you rotate.
You're right, it looks really strange ;) Also we can see it does simple byte rendering (on letter texture for instance).
Push the limits of old hardware more interesting, I think.
I agree, the fun is to use the base hardware and push it to its limits =)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu May 10, 2007 6:26 pm

Stef wrote:vertical scanline trick ? what are you speaking about ? maybe you mean the pixel doubling on X axis...
I mean that they draw only 1 slice per 2 pixels of game window (not doubling, second slice is always gray).

ZT also draws 1 slice per 2 pixels, not for speedup but for increase number of shades.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu May 10, 2007 7:05 pm

Shiru wrote:
Stef wrote:vertical scanline trick ? what are you speaking about ? maybe you mean the pixel doubling on X axis...
I mean that they draw only 1 slice per 2 pixels of game window (not doubling, second slice is always gray).

ZT also draws 1 slice per 2 pixels, not for speedup but for increase number of shades.
Use fast blur option on Gens (or Alt+7 shortcut on Fusion) with Duke Nukem 3D. It is not a simple grey pixel, the "odd" pixel is used to increase virtually the number of color, they assumed the game was played on a "bad TV" which mix adjacent pixel :)
The game uses byte rendering as almost raycasting game by the way.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu May 10, 2007 7:57 pm

Stef wrote:It is not a simple grey pixel, the "odd" pixel is used to increase virtually the number of color, they assumed the game was played on a "bad TV" which mix adjacent pixel :)
Sorry, I was wrong, it's indeed a pixel doubling.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu May 10, 2007 8:09 pm

Shiru wrote:
Stef wrote:It is not a simple grey pixel, the "odd" pixel is used to increase virtually the number of color, they assumed the game was played on a "bad TV" which mix adjacent pixel :)
Sorry, I was wrong, it's indeed a pixel doubling.
no problem, we can be easily fudged here on a "fast shot"...
I'm very interested by all these 3D raycast game on genesis, they all have their own method to handle the thing =)

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Fri May 11, 2007 3:36 pm

Stef wrote:I'm very interested by all these 3D raycast game on genesis, they all have their own method to handle the thing =)
I'm very interested in raycasting and other 'fake 3d' fast rendering techs too, not only for genesis, but for any small-powered systems. Even today these methods of rendering can be useful, for mobile platforms for example.

Some time ago I thought what is possible to implement on SMD, superior to ZT/BS/DN3D/TS, with balance of good framerate and enough features to playable game. I have come to conclusion that fastest way can be simplest tile-based raycasting engine (maybe with walls on edges of grid instead of 'cubes'), but it's not enough to create playable game. Tile-based engine takes too much RAM (or ROM, depending where levelmap will be stored), so levels can't be big, and only poor clone of Wolf3D is possible. More perspective way will be sector-based raycasting engine (much less memory required to store levels, non-orthogonal walls is possible), but it will be also slower, and it's too hard for me to implement such engine (I'm not good in math).

There is another method of raycasting-like rendering exists. I don't know it's name and details of algorithm. It was used in game demo 'Citadel 3D' for ZX Spectrum. Game looks like raycasting game, with non-orthogonal walls (45g walls are present) and walls with two different heights; with up/down look; and dynamic wall textures (texture animation is possible). Game engine not based on raycasting, it's something like sector-based engine where renderer works with pieces of walls instead of slices.

About 'mode7'. I think, it's possible to make Mario Kart-like racing game on SMD, but there is very big problem with making of good graphics for such game (racing track itself).

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri May 11, 2007 5:00 pm

Shiru wrote:
Stef wrote:I'm very interested by all these 3D raycast game on genesis, they all have their own method to handle the thing =)
I'm very interested in raycasting and other 'fake 3d' fast rendering techs too, not only for genesis, but for any small-powered systems. Even today these methods of rendering can be useful, for mobile platforms for example.
In fact i'm too, i said genesis because i'm mainly on genesis right now :p

Some time ago I thought what is possible to implement on SMD, superior to ZT/BS/DN3D/TS, with balance of good framerate and enough features to playable game. I have come to conclusion that fastest way can be simplest tile-based raycasting engine (maybe with walls on edges of grid instead of 'cubes'), but it's not enough to create playable game. Tile-based engine takes too much RAM (or ROM, depending where levelmap will be stored), so levels can't be big, and only poor clone of Wolf3D is possible. More perspective way will be sector-based raycasting engine (much less memory required to store levels, non-orthogonal walls is possible), but it will be also slower, and it's too hard for me to implement such engine (I'm not good in math).

There is another method of raycasting-like rendering exists. I don't know it's name and details of algorithm. It was used in game demo 'Citadel 3D' for ZX Spectrum. Game looks like raycasting game, with non-orthogonal walls (45g walls are present) and walls with two different heights; with up/down look; and dynamic wall textures (texture animation is possible). Game engine not based on raycasting, it's something like sector-based engine where renderer works with pieces of walls instead of slices.

About 'mode7'. I think, it's possible to make Mario Kart-like racing game on SMD, but there is very big problem with making of good graphics for such game (racing track itself).
I do like all these 3D stuff unfortunatly i don't have a good knowledge about all the method to do fast rendering :o
I did a quick 3D cube demo on genesis. It was a simple flat 3D rendering with complete 3D transformation. I used a fake bitmap buffer for the 3D draw, code is in C... it reached about 25 FPS for a single cube :-/
Anyway it can be optimised in many way !
I'm currently re-working the bitmap part of my library. I will remove the software bitmap buffer which eat almost half of the RAM. I plan to rewrite all the function in "direct access" mode. I'm impatient to finish it, it should bring a good speed boost for simple flat rendering. The goal is to have a 3D flat engine capable of making game like Starwing (SNES) with acceptable frame rate.

Post Reply