(Homebrew) Sonic Z-Treme

I experimented using the red gouraud palette sprite bug, which works fine as already known.
I also played with another technique that I just call the green gouraud bug, which shifts palettes 32 values, allowing you to interpolate the results.
While I'm not using gouraud on the level yet, I'm using flat lightning with palette shifts, so gouraud would just make it all smoother if I can make all the textures fit in 32 colors.

Here is the game with both the metal effect (working on real hardware nicely) using both green gouraud shifts (when the metal player is invincible) and red gouraud (both when invincible and not).
I (quickly) added global lightning to the maps using per-vertex lightning and averaging the results to get a per-quad flat lightning shifting palettes.
I also added back rings and ennemies, but the ennemies are static since I didn't code in an insertion function for the octree nodes.
Outstanding work on the lighting.
I'd like to just ask about the level design.. I know its still work in progress and the engine is what matters here at this stage, but will larger open areas be possible? Sonic needs more room to stretch his little legs :)
Also would the engine allow slopes at other angles than 90 degrees?
Would environments like the one in Sonic Jam 3D world be possible?
again amazing to see all this possible on the Saturn and its great to have someone bring us a game I always wanted to see on Saturn.
For the levels the main issue is RAM, it wouldn't allow levels like in Sonic Adventure.
For slopes, yes, see my earlier videos of the fps demo with the Mario 64 map.
Yes too for Sonic Jam-like levels, in fact it's pretty simple.
I just need to add back RGB0 support and it could happen.
Keep up the good work !
What if you utilized the Saturn 4mb ram cart? Would it make a whole lot of difference? Also your homebrew is incredible in execution. I love all the fancy tricks used to pull off some of the graphics in ztreme.
It would be slower, so it's not an option. Plus it's niche enough as it is, adding restrictions wouldn't be helpful.
Most impressive thing I've seen on the Saturn and I've been a Sega fan since 96 so cool. With the release of Sonic will there be a little FAQ on some of the engine features for Z-Tream and Saturn hardware. Its really interesting to see the Saturn do this sort of thing! Its as impressive as the Quake 2 port on the PSX but more so as a homebrew.
I'd originally been a little resistant to the idea of this as a possibly definitive treatment of Xtreme because of the switch from sprite-based to polygonal models for Sonic and the enemies, but now I prefer this change - especially if getting all that 2D animation into the Saturn's limited memory would have been too difficult for even Sega Technical Institute! Also, it's incredible to see that you managed to pull off a split screen mode, though I'm the most excited to finally explore those four levels only previously seen in video form (if only the other two from the same batch of footage could be somehow added). Here's to the future of your great project, and I can only apologise for initially denying the reasons behind your move to 3D for such a prominent detail...
I forgot to update this topic, but here is the Sage 2018 demo :
https://sonicfangameshq.com/forums/showcase/sonic-z-treme-saturn-sage-2018-demo.161/
You can download it there and burn a copy for your Saturn.

I don't have a capture card, so I'll just link other people's Youtube videos to showcase the gameplay on real hardware :

Absolutely brilliant work XL2, without a doubt.
I have kind of an odd question, but what is your end goal for this project?

Obviously at this point Sonic Z-Treme goes well above and beyond any "tech demo" or "fan project" the Sega Saturn has ever seen, but do you want to take it to the extent of a full-featured game with a story-line, and linear level progression?
To be honest I never really intended to go that far.
I want to focus on a fps engine (and game maybe ), so I'm not sure if I will keep on working Sonic Z-Treme in the near future.
As for story, I won't do it for sure as I really don't care about it at all.
For all of the documentation regarding Sonic Xtreme's possible story, I'd prefer if any recreation simply concentrated on presenting disconnected levels. Similar to the Saturn version of Sonic 3D, it might be good to have short plot-advancing bookends, though I wouldn't spend too long worrying about how everything fits together from the perspective of offering cohesive narrative. Beyond each stage having the same number of acts and boss fights, did you need to know what was happening behind the scenes to get through the original 16-bit trilogy? Sure, every new sequel incorporated an increasing number of short cutscenes, but real character development was mostly left to the imagination of players or those who read the manuals. Z-Treme speaks through its graphics and overall authenticity compared to what fans expected on the Saturn back in late '96 - I certainly don't expect it to compete with Sonic Adventure in terms of building mythology or following canon.
The progress I see being made with this is truly stunning. A shame it can't be ported to the Dreamcast. Or can it?
Porting to something like the Dreamcast would be very simple in my opinion, given the enormous difference in performance between the two systems. Of course it would still take time, just not time spent on particularly challenging tasks. The basic I/O and rendering engine would need rewriting, as there is no direct-port SGL library for Dreamcast, but with the tools/libraries available on DC it would be quite straightforward IMHO.
For sure it would be much easier than on Saturn, but what would be the point doing it?
I mean, the whole point of this project is that it runs on Saturn.
The Dreamcast is so much more powerful, it wouldn't make sense to spend time porting such game and it wouldn't be fun for me anyway.
100% agreed, the port would be easy but boring to do...
The point would be to have a nice looking homebrew Sonic game on Dreamcast. Sure it would take away from it being exclusive to Saturn but I think it would be fun to play on Dreamcast. Hell people play lots of 2D games on Dreamcast so I don't really see there not being a point to doing it other than preference.

Plus, if this project is open sourced you don't have to be the one to port it per se. I know a few homebrew developers in the Dreamcast community that could potentially give it a shot with your blessing of course.
Sorry for double post, but this is important!



Congrats on getting noticed by DigitalFoundry! Wow talk about epic exposure! I can't believe they are talking about it!
Not a real update on Sonic Z-Treme, but I managed to get real transparency using a technique similar to Burning Rangers working on real hardware.
Instead of swapping the frame buffers or waiting for it to complete its drawing in 2 passes like in BR, I do it all in one pass : I simply draw the transparent objects offscreen in the frame buffer's unused area (160x112) and scu direct DMA it to work ram. At vblank I send it to the vdp2 16 bpp nbg0 layer, zoomed at x: 2.2 and y:2.
It is pixallated, but sadly using the hardware blur function wouldn't work well I think since it disables the transparent pixels.
I simply use a loop and send/retrieve the data line by line to avoid having too much data passing and avoid having a huge buffer to hold the data.
The result is real transparency at little cost.
The game can still reach 60 fps, but less often than before.
In average it's now mostly 30 fps, but drops to 20 in several areas.
It's a cpu issue I guess, so some optimizations would solve the problem.
It's not glitching or anything, it seemed pretty consistent with what I had before.
Of course, sorting is still a very huge issue I will have to solve.
Here are shots from the game running on real hardware.
Also note that using the frame buffer in a sprite is also working, but since I'm using both RGB and palettes, only the RGB pixels get displayed.
Well done!
As far as I remember from my experiments from ages ago, this is precisely what Burning Rangers does, including a lower resolution draw for the transparent layer and the reuse of the same framebuffer for both the transparent layer and the background layer in a single frame, before swapping. The only difference may be the exact timing of the copies between the framebuffer and the VDP2 ram, and whether BR goes through work ram or elsewhere, which I don't actually recall right now.

Original thread: https://assemblergames.com/threads/homebrew-sonic-z-treme.66231/