(Homebrew) Sonic Z-Treme

Discussion in 'Sega Saturn Programming and Development' started by XL2, Jul 20, 2017.

  1. speedyink

    speedyink Site Supporter 2016

    Joined:
    Apr 10, 2015
    Messages:
    1,221
    Likes Received:
    485
    It's very interesting watching your progress. Awesome job, keep it up! :)
     
  2. d123456

    d123456 Site Supporter 2015

    Joined:
    Jan 10, 2015
    Messages:
    18
    Likes Received:
    4
    That framerate is just excellent for a saturn game engine!
     
  3. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    Just a small update video. I had the feature for a couple of weeks already, but I never made a video to show it.
    Anyway, here is split screen multiplayer working ingame (don't mind the players' models, they are just a placeholder) :


    I've also managed to use the VDP2 transparency (not shown in the video) instead of the depth gouraud shading. It should be faster than gouraud shading and will allow backgrounds to fade in and out of view, but the main issue is that I need to use CRAM for all the sprites (only 2048 colors, but each bank is taking 16 colors and these can't always be shared).
     
  4. Anthaemia.

    Anthaemia. The Original VF3 Fangirlâ„¢

    Joined:
    Jun 4, 2004
    Messages:
    1,590
    Likes Received:
    117
    I'd be interested to see how well the frame rate holds up with more complex levels from Saturn Quake loaded in split screen mode, or would that require too much of a reduction in the overall polygon count of stages?
     
  5. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    I would guess around 15-30 fps on real hardware.
    I also stopped using depth gouraud shading and I am now using vdp2 transparency, which should be a bit faster.
    The real issue is that I haven't found a solution to prevent overdraw.
    I'm leaning toward either a portal system or a pvs system, but I still have several things to do before that so I haven't put much time on this.
    The 2 maps in the video are actually Saturn Quake maps.
     
    AUSTIN PEYTON likes this.
  6. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    Here are the results : 20 to 30 fps.
    Most Quake levels go from 15 to 30, but the draw distance is the same as single player mode and the 3d model doesn't have a level of detail reduction. I guess sprites would be better.
    You can also see the fade in/out transparency in action.

     
    Last edited: Apr 22, 2018
    DSwizzy145, pwl, Yakumo and 3 others like this.
  7. Anthaemia.

    Anthaemia. The Original VF3 Fangirlâ„¢

    Joined:
    Jun 4, 2004
    Messages:
    1,590
    Likes Received:
    117
    That's just phenomenal! You're managing to equal the frame rate of Lobotomy's single player work in split screen while pulling off that distance fogging effect their SlaveDriver engine didn't even support (to my knowledge, at least)! Also, there are points where these levels really remind me of GoldenEye 007 for the Nintendo 64 - I'd love for someone to port that onto the Saturn, PlayStation or any other console not so limited by a lack of memory for its textures, not to mention compression and filtering that always made it look as if someone had smeared grease all over your screen. Four-way multiplayer is almost certainly out of the question, but I'm sure a 2PVS mode would be within the Saturn's capabilities, especially based on these incredible results...
     
  8. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    I wrote a model converter for entities and added per-vertex normals and realtime gouraud shading.
    It just looks great, I think I will downgrade Sonic Z-treme from 60 to 30 fps and add more effects.

    The VDP1 could keep up with 7 onscreen models (185 quads each) at 60 fps, while the CPU struggled (so it ran at 30).

    The main problem with realtime lightning is memory (each vertex takes 24 bytes (12 bytes for the vertex normals), so with maps having some 25 000 vertices, you can see it's very expensive!).

    In the first picture under, you can see Sonic's model (with realtime gouraud) in front of a part of the Saturn Quake title screen (per face lightning, so not as smooth). The other one is a test with 7 models.
     

    Attached Files:

    Last edited: May 16, 2018 at 9:46 AM
    DSwizzy145, Yakumo, LuizNai and 2 others like this.
  9. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    Slowly getting there!
    I still haven't put back the gameplay in the new version of the engine and I want to add some graphical effects, but I think the draw distance is pretty good so far.
    I got the audio part OK (I think), graphics are getting close to be done, so I still need to put gameplay back in and work on the collision system and entities management.
    If all goes well I'll have a demo in 2 months, ready in time for SAGE 2018 (fingers crossed).

    Sonic Z-Treme Preview.png
     
    Ivan GR, dark, Traace and 3 others like this.
  10. dark

    dark Intrepid Member

    Joined:
    Sep 2, 2011
    Messages:
    697
    Likes Received:
    96
    Wow it looks like the sonic game sega wished it had circa 1990s.
     
  11. jollyroger

    jollyroger Peppy Member

    Joined:
    Oct 18, 2008
    Messages:
    336
    Likes Received:
    56
    Nicely done. I wish I had as much free time as you do... :)
     
  12. XL2

    XL2 Active Member

    Joined:
    Jul 20, 2017
    Messages:
    34
    Likes Received:
    76
    Not having kids (yet) and working most of the time away from home certainly helps! ;)
    That being said, I just keep small objectives for each week (last week was to implement CD audio, this week was to integrate my model converter, next week will be global lightning or model animation or controls, etc), so I progress slowly overall but with quick visible results which keeps me motivated.
    I've been talking about implementing a PVS system for months but I haven't even started as it's a huge task requiring to rewrite huge portions of the code, so that's the kind of stuff I won't be doing until all the pieces start fitting together.
     
    takeshi385 likes this.
  13. jollyroger

    jollyroger Peppy Member

    Joined:
    Oct 18, 2008
    Messages:
    336
    Likes Received:
    56
    Very nice, I have too many projects and zero time, I am still not sure how I found the time to work on the X-treme code in the first place. At any rate, it is always nice to see what the Saturn can do with enough time and good programming...
    This summer I have some tentative plans for some experiments on Saturn, I will get in touch with you at some point.
     

Share This Page