PROJECT Z-TREME Sage 2019 tech demo
Homebrew full 3d first person shooter for the Sega Saturn!
Including for the first time on the Sega Saturn, splitscreen first person coop and deathmatch gameplay!
UPDATE 2019-11-11 : New map compiler, allowing bigger maps made much faster. I added a new test map made using Trenchbroom (third map), which is bigger and more complex than the previous maps I made. I also added options and a new portal rendering - not full portal rendering, but it's a start. It might lead to problems, so please report them if you find any.
UPDATE 2019-10-27 : Added realtime lighting on the entities! It has a small impact on the framerate in some cases, but I made the entities auto-gib to decrease the load on the slave cpu. Also fixed a bug in Deathmatch where you spawned in a void. A bug where turning around was slow was also fixed. And 2019-10-29 : Fixed a visibility bug where you wouldn't see the other player in deathmatch/coop.
UPDATE 2019-10-22 : Lens flares! It does impact the framerate a little, but the effect is quite good looking. Disabled in multiplayer. I also improved the collision detection (from the tests I made at least).
UPDATE 2019-10-04 : Added Quake's E1M7 map and Saturn Quake's secret Test map. Also improved collisions in Quake's E1M1 map and reduced the overall BSP complexity. The Quake maps should be playable in deathmatch (UP+START to skip levels), but I didn't do much testing. And again, it shouldn't even work (Saturn Quake->NOESIS->Blender->My own BSP compiler -> Z-Treme Engine map..yeah..) so it's mainly for fun and to see how my engine compares with the Slavedriver engine. I also fixed a bug with the planes' bounding boxes, which made some triangles disappear when they crossed the bottom frustum plane.
Expanding on my Sonic Z-Treme's engine from Sage 2018 (https://sonicfangameshq.com/forums/showcase/sonic-z-treme-saturn-sage-2018-demo.161/), this new iteration of the engine is almost fully rebuilt from the ground up in order to allow much better graphics.
This is a tech demo : it only includes 2 small test maps with one enemy type/model - I just didn't have time to make more and my map/bsp compiler (which works with polygon soups instead of brushes - very bad choice in retrospect) made the task hard and painful. But it's fully playable and the deathmatch mode should be nice enough to warrant replaying the demo once you finished it a few times.
Some of the things present in the new engine :
-Gouraud shading lighting everywhere! (Sonic Z-Treme had flat palette lighting for the maps)
-Fully 3D enemies with AI and animation.
-High res textures (for the Saturn) at 64x64 (vs mostly 16x16 in Sonic Z-Treme - higher res = harder on the VDP1).
-Much much faster rendering code/techniques.
-Full BSP based engine with a PVS occlusion culling system : very similar to the technology used in Quake on PC, but fully running on the Saturn. Yep, PC Quake (with a lots of modifications obviously) would have probably been possible on the underated Saturn.
-The highest (AFAIK) 3d enemy count for a FPS on the Saturn : 8+ enemies on screen x 2 in coop mode! (On Saturn Quake, you get perhaps 5 max)
-Way improved culling and low distortion (no more polygons disappearing in your face, no more polygons dancing in your face à la PS1).
-No draw distance limit : the engine doesn't even have a far plane.
-New and fully original matrix, vertex transformation, lighting calculation, polygon creation and polygon sorting code, mostly in C. I don't use the Sega Graphic Libraries anymore for rendering, which allows me to push the system much more.
-Coop and deathmatch with no compromises (except lower framerate obviously).
-High amount of particles everywhere.
A small word on the engine :
It's a BSP based engine using a PVS for occlusion culling. It doesn't eliminate overdraw, but reduces it enough for the VDP1 to be able to display it all at 30 fps. But that overdraw causes a heavy burden on the cpus, mainly the poor slave Cpu which is currently doing 100% of the T&L work (but the main is busy with everything else, which is also a lot). I am currently rewriting huge chunks of the engine to turn it into a portal based engine instead for rendering, which will make the map creation process easier while also improving performances. The engine isn't optimized yet, so please keep that in mind when the framerate drops in some busy areas. I plan to make a game like a terrorist hunt mode from R6 with a focus on multiplayer/deathmatch. And, if I really stick to it long enough (and get some good map designers and artists), I would like to make a full campaign à la Powerslave, but I won't promise anything now as it's a lot of work obviously and I won't do it alone.
ALL THE ASSETS ARE TEMPORARY!
Known issues :
-Not PAL optimized : The PAL version (50 hrz) will play slower, I plan to fix that in the future, I just didn't have enough free time.
-Sound FX sometimes don't play. I need to write my own sound driver or figure out what needs to be done to make the old Saturn sound tools working.
-Realtime light might overwrite another light source. Hopefully I will have the scu dsp calculate multiple light sources per face to solve this.
-Sometimes some weird polygons appear on the enemy models. It's probably a slave/main cpu synch issue.
-Framerate drops : the precalculated nature of the engine means that you often have more overdraw than needed. The goods news is that it's not even the VDP1 which causes slowdown most of the time, it's the CPUs, so I will fix it in the future (the slave cpu does all the T&L work, so it will be easy to improve that).
-Polygons sometimes get the wrong sorting order.
Using digital controls, if you ever played one of Lobotomy's Saturn FPS, you will feel right at home!
The analog controls are based on the 'Jevon' controls in Saturn Quake, aka Turok style controls, instead of the traditional 'joystick to move/rotate'.
It will feel weird at first since the face buttons aren't in a traditionnal 4 buttons '+' shape, but once you get used to it you might prefer it : YZBC are for movement, the analog stick for look, L to jump, R to shoot, D-pad to switch weapons.
Start to 'suicide' your player (if you ever get stuck)
To return to the main menu, like usual for the Sega Saturn, press ABC+Start!
Some future things I am working on right now :
-Portal based engine instead of a BSP engine (BSP are just a real pain to work with : one small mistake and the map can't compile, and even when it compiles, the small quads nature of Saturn games mean that you get sometimes weird results..).
-New maps (duh)
-4 players link cable and/or online support (maybe, but probably using a USB dev cart for online gameplay)
-3D weapons models (maybe, it will depend on performances)
-Find something to do for the VDP2 (skyboxes maybe)
Cheat codes (all ingame) :
-L+START/R+START : Switch between wireframe and normal mode.
-UP+START : Skip to next level
-DOWN+START : Cycle the max framerate. It will get very very low (for testing collision), then get back up to a target of 60 (target, it will still be around 20-30 most of the time)
-B+START : Cycle debug stats on and off
-I do not accept any game making requests or port requests (don't bother asking for Doom or Quake 2, I am not interested in porting them)
-And on a final note, no, Vasectomy Software is not a real thing! It's just meant to be a nod at Lobotomy's software, who inspired me to make this engine/game.
The Sega Saturn approach is what I consider a ‘semi-solved’ case. The VDP1 doesn’t implement any VSD function: You either feed the geometry in the correct order or you get a mess. However, Sega provided a graphics library called ‘SGL’ that implemented a solution called Z-sort or Painter’s algorithm which performs polygon sorting. Genesis/Mega Drive, Sega Master System, Game Gear, SG-1000, Sega/Mega CD eke-eke Hugo-Wii: Turbo Grafix 16/PC Engine eke-eke JzintvWii: Intellivision jenergy NeoCD-Wii: Neo-Geo CD Wiimpathy Nintendont: GameCube 'emulator' Crediar, FIX94 O2em: Odyssey 2 /Videopac Consolius PCSX-Revolution: Playstation 1 Firnis SMSPlus: Sega Master System. Retro dad and modern lad presents footage from real sega saturn hardware of three homebrew games to watch out for in 2021. These games were entered in to the. Transfer of Sega Saturn Game-Saves between the Saturn and a Windows PC. Transfer Sega Saturn Game-Saves created by emulators (SSF and Cassini) between the Saturn and a Windows PC. Download Homebrew games to the Sega Saturn from a Windows PC. Dump the Saturn's BIOS to a. To run the ROM, load the MegaXmas89.bin file with a Sega Genesis / Mega Drive emulator or place the ROM on a flash cartridge to run on real hardware and FPGA or clone consoles. We love the holidays and we love Sega. We’re bringing the two together with new holiday games for the Genesis / Mega Drive starting with MegaXmas’89!
Sega Saturn Homebrew 2017
Code and engine by XL2.
Thanks also to the folks at Segaxtreme for their support and help.
Sega Saturn Homebrew DevelopmentEdit on Github Updated:
Sega Saturn Homebrew27th June 2020
There are multiple ways to create your own Homebrew for the Sega Saturn, one is to use the official SDK but a much better way is to use one of the open-source modern development kits available.
LibYaul is an open source SDK based on GCC 8.2.0 and is supported on Windows, Linux and MacOSX, although I couldn’t fully run it on OSX but the toolchain executables themselves build fine.
Basic Specification of this Toolchain
Compiler name - GCCCompiler Version - 8.2.0
We need to clone the repository and initialise the submodules before building the SDK.
MacOSX Specific Initial Setup
For Mac OSX make sure you have brew install and run the follopwing in a new terminal window:
Building the toolchain
Before building the rest of the SDK you have a choice, you can either downloads the pre-build SDK if its available for your platform or compile it yourself. Honestly I would just download the pre-built version if OSX was supported but sadly I had to go through these steps:
How to fix gpq missing issue
If it fails with missing dependencies such as
gpg then use your platforms package manager to install it, for example on OSX:
Sega Saturn Homebrew Emulator
How to fix isl function missing issue
If it fails with errors about
isl functions missing then you will need to apply this patch by finding the downloaded gcc source (normally in tmp) and using this diff:
This fix is from the official GCC Bugzilla 86724 – Compilation error with new isl 0.20 (missing includes)
Lets build the rest of the SDK
To build run the following command:
Unfortunately I couldn’t get this to work on OSX but for anyone interested in getting further I have added some notes below.
env.mk:12: *** Path YAUL_INSTALL_ROOT (install root directory) does not exist. Stop.
Strangely even when you have clearly defined
$YAUL_INSTALL_ROOT to a valid non-relative path such as
/opt/tool-chains/sh2eb-elf it will still give this error. Citrix for workspace mac.
Even running mkdir to make sure it exists doesn’t help but you can try if you want:
Sega Saturn For Sale
Not sure how to fix this yet, apparent from commenting out the check for this in
env.mk. Or just changing the
sh2eb-elf tool-chain has not been installed properly
If you get the following error:
Then you need to make sure you have followed the Toolchain build instructions above and it is able to find the environment variables.