https://www.segasaturno.com/portal/viewtopic.php?f=33&t=9456&p=105289#p105289 ----------------------------------- Ryo Suzuki 26 Agosto 2018, 07:22 PM Re: Sonic Z-Treme rompiendo barreras gráficas en Sega Saturn ----------------------------------- Pues ya la tenemos lista: [quote]Attention : I couldn't test the game on a PAL console, so it might not work correctly! Be aware of that! For PAL users (Europe and other areas), burn the PAL version. For all the others, burn the NTSC version (North America, Japan, etc.). For emulators, choose the NTSC version. Sonic Z-Treme is a new game for the Sega Saturn inspired by the ill-fated Sonic X-Treme. While Sonic X-Treme relied on sprites and the fisheye view camera and worked correctly only on pc, this game relies heavily on 3D, including the player's model and enemy models, while also aiming for a stable 30 FPS on the Sega Saturn. This game also includes a splitscreen multiplayer mode where you can either play the full game versus or coop! Keep in mind that little time was put on the gameplay/controls/physics since most of the time was put on the engine itself and all the different tools I needed (SDK...) to create the game and making it work on Saturn. As such, the SAGE 2018 demo is more a tech demo than a full game, but as the engine becomes more mature I will focus more on the gameplay and levels. Also, the game is supposed to be played as a sidescroller (d-pad friendly), unlike a game like Super Mario 64. The whole control system is designed to keep momentum, so it's normal you can't turn 90 degrees right away when you're running at full speed and you're not supposed to rotate the camera all the time to keep it behind you! Q&A Q : Is the game using the Sonic X-Treme prototypes' code? A : No, it's all original code. The engine - that I just named the Z-Treme engine - is using the Sega Graphic Libraries (kind of OpenGL for the Saturn) and the Sega Basic Libraries (for accessing the hardware for things like audio, cd access, etc.) , while the rest of the engine (rendering, collision detection, loading functions, 3d animations, controls, etc.) is coded from scratch. Same thing for all the tools needed (converting models, map partition, image conversion, auto-LOD generation, texture generation, 3d animation generation, etc.). It is still a work in progress engine. A few words on the engine. The levels were shared by Andew75 (best known for Project AXSX). I wrote a converter to take Wavefront .OBJ files, convert them to my custom binary file format, generate the distant low-quality models automaticaly (which is also the collision model), generate mipmaps for textures and generate the merged quads' textures, generate flat lightning (using 2 different techniques...more on that later), the collision, the octree (for rendering and collision on the Saturn) and places the entities based on the texture's name. All this allows importing levels to the engine very quickly, as long as the geometry is Saturn-friendly (small quads as much as possible with as few triangles as possible). I also had to create a custom converter for the 3d entity models (Sonic, badniks, etc.) as the .OBJ files don't support animation and other files formats (DAE comes to mind) are quite complicated to work with. The model converter takes the Blender solution for .OBJ animation (a serie of files with different vertices positions) and then does the following : reads the files (obviously), compresses the keyframes (from 12 bytes per vertex to 6 bytes and from 12 bytes per normal to 1 byte) and outputs a binary file format. On the Saturn side of things, to keep the ram usage low, the animations are played with linear interpolation. The Sonic's idle animation, as an example, only has 2 keyframes, but with interpolation it looks smooth enough. Different interpolation factors can be selected, allowing different playback speeds and allowing good scaling with the framerate - all that without using any divisions to keep the game fast. All this allows ultra-smooth animations per-vertex at low-RAM usage. The only thing preventing the animations from being better are my own limited skills! Another crazy thing I had to do is to import audio. Sounds easy, right? Well the Saturn audio tools were released around 1994-1997 for Mac computers. Mac computers back then used a very different cpu architecture, a Motorola 68k cpu and then a Power PC cpu, while the modern computers use the usual x86 cpu. So the only way (that I know of at least) to use the sound ram to store audio without the proper hardware was to use an emulator for the Mac OS 7.5, run the Saturn sound tools within the emulator and create my sound maps and tone data there. That saves me quite a bit of ram as I would have otherwise used the main ram to transfer pcm audio (way easier). Some features also don't seem to work in the Mac emulator without the proper hardware (sound box), so I couldn't convert midi audio, but it might still be possible. Many more things had to be done to make it work on Saturn. Q : Where is the fisheye lens? Why is there no fisheye? Just give us the fisheye!!!! A : Won't happen. It's super CPU-intensive, plus SGL controls the matrix transformations, so adding that on top of SGL's own calculations would just make everything terribly slow. You can rotate the camera around and the field of view is large, so it shouldn't affect the gameplay. You can also try the pseudo fisheye in the options. If you truly want fisheye view, try the leaked Sonic X-Treme v.40 demo and tell me seriously that's what you want! Q : Why Sonic X-Treme? Why not ... insert another game ... instead? A : Because the assets exist and the axis-aligned nature of the game make it simple enough for a single person. That auto-generated LOD model needs polygons on the same plane to work well, so maps like Sonic X-Treme or even Quake are perfect for it, while maps such as these in Nights or Mario 64 wouldn't work well. Manually modeling different quality models would just be impossible for a single person, so it has to be automated. Sonic X-Treme is just perfect for that. Q : Ok, but can you make the maps more like Sonic Jam / Project Condor? A : I'm working on better collisions and physics and to add VDP2 tile planes (I used to have them, but they were hardcoded), but that will take a while since I need to write new tools for better VDP2 support (right now it's limited to bitmaps layers only). Q : Is this game the same as Project AXSX? A : No, both are separate projects with different "teams" and aiming different platforms. The only comon things they have are the maps, which were shared to me by Andrew75, who faithfully recreated these maps from scratch. Some modifications were done to better fit the engine. Q : How does the metal effect on the metal Sonic works? A : It uses a hardware bug. According to all the Saturn official documentation, the Saturn doesn't support gouraud shading on paletted sprites (the textured polygons on the Saturn) or paletted polygons. The gouraud shading works by modifying the pixel's color directly, so with RGB sprites, if you increase red by 1, it will just increase that pixel's red value by one. On paletted sprites, the data sent to the framebuffer is actualy the index of the color in the color RAM. But the hardware still processes the gouraud and send the data to the framebuffer. So by using red (bit 0), you increase the index by 1! Which means that if you carefully map your color palette, you can create pseudo-bump mapping effects or metallic effects. So the metallic Sonic uses that red gouraud shading trick. The 2 drill/badniks use the same trick, but without realtime lightning. But that's not all. By increasing the green gouraud value (bit 5), you increase your color bank index by 32. So you can actually even put different banks entirely and easily swap between them. This is what I use when the metal Sonic is invincible, in addition to the red gouraud trick. The green gouraud trick doesn't work in any emulator as far as I know. I might try using the green gouraud bug on the LOD model in the future to have both transparency and gouraud shading, which would allow me to keep lightning without gouraud when all 4 vertices have the same color value (flat lightning), which is faster to render. Q : What's the point of the multiplayer mode? A : You decide. Coop, racing, deathmatch, it's all up to you. The entities reset only when player 1 dies and if player 1 loses all its lives it's game over. Player 2 can also "steal" these lives. I suggest vs gameplay. Q : How does the transparency works? A : The polygons close to the screen use RGB code (16 colors look-up tables), while the further away polygons use 256 color banks (VDP2 palette). The VDP2 has no problem with transparency, so all I need to do is send the color calculation ratio based on distance to create a smooth fade-in/fade-out. And since the VDP2 takes care of it and the VDP2 is really overpowered compared to the VDP1, it comes at no cost at all. Take that PS1! The metal Sonic also uses some VDP2 transparency (a low ratio) + gouraud shading for a pseudo-environment mapping (the color will change with the background). The player's shadow is using a VDP1 function, sprite shadow, which works fine since the shadow itself is just a scaled sprite. Q : How many people worked on this game? A : That's mainly a solo work. But I do want to give credit to the following persons : Andrew75 for sharing the Project AXSX maps, Dany for the development environment and coding tips, Jollyrodger for his tips and for answering my numerous questions, Johannes Fetz (the maker of Jo Engine) for bringing me in Saturn development (the project started on Jo Engine after watching a video of his work!) and for his cue maker! Oh, and thanks to whoever from Assemblergames who did that cool cover art for the leaked Sonic X-Treme prototype, I couldn't find you but thanks! Also, of course, huge thanks to SEGA (who, of course, are in no way affiliated with this project) and the Sega Technical Institute team who worked so hard on the original game! (continued at tab 2) Enjoy! Maxime, AKA XL2.[/quote] https://sonicfangameshq.com/forums/showcase/sonic-z-treme-saturn-sage-2018-demo.161/ Me pillais volviendo de Alemania así que no la puedo probar en hardware real. Aquí están todos: https://sonicfangameshq.com/SAGE/games Ya me contaréis, pinta de lujo y más tras leer todo.