Sonic and Sega Retro Message Board: (Sega Saturn homebrew) Sonic Z-Treme - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 10 Pages +
  • ◄ First
  • 8
  • 9
  • 10
    Locked
    Locked Forum

(Sega Saturn homebrew) Sonic Z-Treme Homebrew 3D game for the Saturn

#136 User is offline Asagoth 

Posted 05 September 2018 - 05:28 AM

  • Behold ... the mighty... the flawless... salted cod eater...
  • Posts: 88
  • Joined: 16-January 17
  • Gender:Male
  • Location:Portugal
Man... you shouldn't give up because of poor attention on your work... or complaints... just follow your heart... be proud of yourself... do what you do best... the rest don't matters... complaining about something is easy... doing better is another different thing... now concerning the wiki (I've no inttention in offending you people... I've the utmost respect for you Folks)... Sonic Retro has 22181 members ... I can count with my fingers those who edit the wikis... if you guys have valuable info about something just go to the wiki an add it there... I know is not easy in the first time (I never edited a wiki before I joined Retro... and I have much to learn yet...and my English sucks sometimes... but is as easy as learning to ride a bycicle...) do not expect others to do it for you (no offense)...

#137 User is offline XL2 

Posted 05 September 2018 - 09:33 AM

  • Posts: 43
  • Joined: 01-July 17
I'm not giving up, but after scratching my head for months about occlusion culling because of Sonic X-Treme's weird mix of maps, I decided to just go "screw it" and try to build a bsp compiler or portal system, which would work for sure in a FPS game, but maybe not in Sonic X-Treme's maps.

But the Saturn being the Saturn, everything is super complicated, so I'm not even sure where to go and there is 0 documentation or tutorial online for it, as everything is about "normal" 3D, not Saturn's weird take at 3D.

Like, if you take a BSP tree, you need to subdivide your polygons to create convex regions.
On PS1 and N64, it's all good, you just need to modify your texture coordinates in these newly subdivided polygons to keep the same texture and make it seamless. You can also clip the polygons on your portals for a faster rendering.

On Saturn, well, like usual, it just doesn't work, you will end up with really ugly walls and textures.

I'm a really huge fan of Lobotomy Software's work on the system, but it's far from perfect.
See this image from Duke Nukem 3D, you can see how the subdivision of the polygons creates so many problems, like the "narrow" monitors and the ugly floor.
The map is very obviously auto-partitionned with a BSP tree.

Posted Image


You can hide these issues to a certain degree with gouraud shading, but on colorful maps like in Sonic X-Treme it won't work and will look ugly.

Creating simply a portal system can avoid this problem since you don't need convex sectors only - so no need to subdivide your polygons - but good luck placing portals in Sonic X-Treme's maps and you will still need to use a z distance sorting, which creates many z fighting issues.
And since the sectors aren't convex only, you are limited for the clipping because of how it works on Saturn (you can use a user clip draw command, which will clip within a rectangle on screen, but the distance from the camera must be carefully planned else it just won't work since it clips on the following draw commands).


The other solution I played with is a PVS system within an octree, sampling as many points as possible.
The problem is that it takes forever to compile (more than 1 hour on my i5 6600K) and even then it's not perfect since your nodes can have a wall right in the middle, making the occlusion culling useless.

The other solution is to just forget occlusion culling and just draw everything, which is what I'm currently doing.
Thanks to the LOD system and mipmapping, it's an acceptable solution, but if you just add gouraud shading it quickly increases the rendering time by maybe 20% or so, which hurts the framerate too much in some areas.
It also increases the CPU load since you need to transform more vertices and polygons that are being occluded, so it's not a very good solution.

#138 User is offline XRick 

Posted 05 September 2018 - 12:59 PM

  • Posts: 63
  • Joined: 17-September 08
  • Gender:Male
  • Location:Portugal
  • Wiki edits:2
Well, from what I've been reading around as of late, the Saturn really seems to be a programming mess or something.

Unfortunately, I have no programming knowledge, so I can't help you in any way.
I can only hope you manage to find some useful intel or get in touch with someone in the scene capable of giving you some tips.

Anyway, there's people in here who are attentive of your work and praying for the best to you.

#139 User is offline XL2 

Posted 28 September 2018 - 08:59 AM

  • Posts: 43
  • Joined: 01-July 17
Surprisingly, it seems like most maps from Sonic X-Treme are working with the BSP compiler I (quickly) wrote.
Here is a shot of Jade Gully in OpenGL (PC, for testing) after the BSP subdivision.


Posted Image

I just simulate the Saturn behaviour in OpenGL for faster testing, mainly for the lack of texture coordinates on Saturn (but it's not perfect).
I'm using a solid leaf bsp tree from the MrGamemaker famous bsp tutorial.

You can see, just like Saturn Quake and Saturn Duke Nukem 3D, how it creates issues with textures because of the lack of texture coordinates.
The way around this is to declare some quads as entities instead of parts of the map to avoid diagonal subdivisions.
Some maps just don't work with it, such as Super Mario 64's peach castle.
Crystal Frost didn't work, but I think it's because of the massive cuts I made to the level's geometry in october of last year to get a demo ready for Retro Barcelona.

I still have not implemented portals and pvs, so I don't know if the maps that currently work will still work after.
It should help reducing the overdraw, allowing fast gouraud shading, and speed up collision detection a lot, maybe allowing proper collision detection against the map for ennemies too.

I also did a quick test with E1L1 from Saturn Quake (before implementing the BSP compiler), and it ran at mostly 30 fps on real hardware with OK draw distance.
https://imagizer.ima.../922/fF2Ilw.jpg
This post has been edited by XL2: 28 September 2018 - 09:10 AM

#140 User is offline CollectiveWater 

Posted 29 September 2018 - 10:51 AM

  • Posts: 134
  • Joined: 14-June 17
John Linneman at Digital Foundry did a DF Retro Extra episode covering SAGE 2018 (he did one for 2017 last year as well), and "Sonic Z-Treme" is the first game covered in the video. (He also highlights several other games from this year's event.)

Very well-done as always by John. Hope y'all enjoy, if you haven't seen it yet:


#141 User is offline Andrew75 

Posted 29 September 2018 - 11:45 AM

  • Technical Artist
  • Posts: 1909
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
A Very nice watch !

#142 User is offline LastingTime 

Posted 02 October 2018 - 12:36 PM

  • Posts: 6
  • Joined: 01-October 18
This is very impressive! Don't give up!

  • 10 Pages +
  • ◄ First
  • 8
  • 9
  • 10
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users