• Rise from your gwave!

(Saturn homebrew) Sonic Z-Treme

Discussion in 'Saturn' started by XL2, Jul 5, 2017.

  1. XL2

    XL2 Member

    Hi all!

    I'm currently learning c language on my own and game developpment as an hobby.
    I decided to start with the Sega Saturn (yes, I didn't start with the easiest machine!) and a 3D game (yes...).

    I've been working part-time on my project, that I named Sonic Z-Treme, since the end of march. The game is a remake of Sonic X-Treme, but I'm not aiming for a 1:1 reproduction. And unlike Sega's game, it runs fine on the Saturn!

    You can take a look at the game running on emulator here :


    EDIT : I attached the demo from october 2017, it's not the latest version (which is half-working now since I'm rewriting a lot of code) and contains bugs, but if you feel like trying it, be my guest!
     

    Attached Files:

    Last edited: Apr 9, 2018
  2. RLS89ZX likes this.
  3. ROS

    ROS New Member

    :wideyed: WOW!!!
     
    SegaSaturnShrine likes this.
  4. XL2

    XL2 Member

    Thank you!
    The Saturn homebrew scene is quite dead, so I guess this forum is one of the only places where people have technical knowledge about the console.
    I'm now struggling trying to decide where to go next : I need some sorts of level loader to load other maps, which means I need to write the files in .bin format. Jo Engine doesn't support that yet and has no ETA, so the alternative is the official Sega 3D editor tool, which is really dated and hard to use.
    Anyone got a suggestion for that?
    And if I do use the official tool and export the files in SG3 (which I guess is a binary file), how do I even load it?
    Thanks!
     
  5. vbt

    vbt Staff Member

    well, you have multiple choices, you can try the blender plugins from rockin'-b or those by mrkotfw. there was another way by using a dxf converter.
     
  6. XL2

    XL2 Member

    Thanks for the reply. I figured that I should just invest time in creating my own tools since it would take a while trying to understand someone else's code and adapting it. I succesfully created a collision detection generator tool and have made some progress with converting Obj files to Jo Engine files and binary files. I will try to implement an automatic mesh subdivision (BSP) for better performance as well.
     
    SegaSaturnShrine and cafe-alpha like this.
  7. mrkotfw

    mrkotfw Member

    Hopefully this helps: <https://github.com/ijacquez/blender-tools>. This won't export to anything Saturn related, but it should help as a template.

    Antime's site has a doc or two I believe on the .SG3 format.
     
    XL2 likes this.
  8. XL2

    XL2 Member

    Demo attached to the first post (july 7th version, I didn't even test it on real hardware but it should be fine), if someone wants to give it a try...
     
  9. mrkotfw

    mrkotfw Member

    I may have understand your other posts, but are you refactoring the Jo Engine to no longer use SGL? Could you elaborate?
     
  10. XL2

    XL2 Member

    Johannes Fetz, the maker of Jo Engine, is aiming to fully remove SGL.
    But it's currently using it since Jo Engine uses functions wrapping SGL for the 3D part.
    Since my game is a bit far in development, depending on the future implementation, I might keep SGL if it's not worth the effort of changing everything (tools, 3d models, animation, etc.).
    I think if I do keep SGL, I might simply "fork" Jo Engine by adding functions from newer versions but keeping SGL 3d implementation, which might not be super efficient, but is sure easier.
    Since I'm using Sega's IP, I will never make any money out of this game, so I don't mind keeping SGL, but future versions of Jo Engine will allow homebrew games to be sold.
     
    RLS89ZX likes this.
  11. I'll give the demo a go on my hard-modded Saturn when I get a chance. I'll be away for a couple of days, but when I get back, I'll burn it to a disc and make a quick video for you :)
     
    XL2 likes this.
  12. itsstillthinking

    itsstillthinking New Member

    Recorded some gameplay in crappy composite, this is amazing work! the only bug i found (which you probably fixed in the newer version) is that Sonic gets stuck on the loop, again you fixed it i bet. Keep up the good work!
     
  13. XL2

    XL2 Member

    Yeah, the new collision implementation broke the loops, I haven't bothered to put it back yet since it's a bit complicated and turns the code into a total mess, making debugging harder. Someone on the Jo Engine forum showed me a way to load maps from the CD without binary files and to load it to specific RAM areas.
    Right now I'm only using 1 MB of RAM (High Work RAM), but I'll be able to load bigger maps... but I must write a tool allowing me to convert the current .h/MDL files to the new format... fun times ahead!
    I still don't know how different the speeds are for the LWRAM and HRRAM, so I'm not sure putting the map in the LWRAM is the most efficient way to go.
    I guess we'll see!
     
    SegaSaturnShrine likes this.
  14. Sorry for the delay. I will make the video today after work :)

    EDIT: Also a side note to anyone that wants to run this on real hardware. XL2 packed the audio tracks with this as .mp3 files, however the .cue file refers to them as .wav files instead. You must convert the audio files to .wav before burning this otherwise the audio tracks won't work. This was common practice for distributing saturn games back in the day when people had slower connections (so I decided to check it before burning haha)

    UPDATE 7/31/17: I did actually make the video. Did some basic editing on it as well. Now I'm just waiting for it to upload over my crappy internet connection XD. Will post a link here once its good to go

    UPDATE 2 7/31/17: As promised here's the video:
     
    Last edited: Jul 31, 2017
    XL2 likes this.
  15. XL2

    XL2 Member

    It's nice to see it working nicely on other people's consoles! So far the demo as been pretty stable except for some small glitches, which is great! Hopefully I will have something nice to show before next month!
     
    SegaSaturnShrine likes this.
  16. vbt

    vbt Staff Member

    SegaSaturnShrine likes this.
  17. vbt

    vbt Staff Member

    nice new video

     
    SegaSaturnShrine likes this.
  18. XL2

    XL2 Member

    Thanks!
    I tested it on a real Saturn, the framerate goes between 30 and 60 fps (while using SGL culling solution, which is slow). I've coded my own culling function, I'm pretty sure it will be faster, but I doubt I'll get a solid 60 fps.
    That being said, I need some advises on a problem I'm currently facing.
    I'm currently starting to work on a proper octree for both collision and 3d drawing.
    One issue I have is that subdividing a map for culling increases the vertices count, slowing down the Saturn.
    Like, if you take a cube (8 vertices), subdivide it in 6 objects, you end up with 24 vertices (just an example of this effect, but applied to a whole map you see the problem ).
    I noticed there is an Object struct in SGL 3.0 which contains child/parents data and polygon data.
    I never saw any SGL 3.0 documentation, so sadly I can't find answers there, and I've seen no examples.
    Anyone knows how to use it and if it would help?
    Another option I guess could be to store polygon data in the octree's leaf and all vertices in one list, then just DMA the polygons to one single temporary mesh, but I'm not sure if it would be a pratical solution and fast enough (and if it would even work).
    Any ideas to solve that issue?
    Thanks !
     
  19. itsstillthinking

    itsstillthinking New Member

    [Youtube][/Youtube]
    new 3d models!
     
    SegaSaturnShrine likes this.
  20. itsstillthinking

    itsstillthinking New Member



    Jade Gully & Crystal Frost!
     
    SaturnTeam, XL2 and SegaSaturnShrine like this.

Share This Page