Version 0.5.1 is out now!



Hello, folks! Version 0.5.1 of Sonic XA is finally here!

And, guess what: THIS IS ALSO THE VERSION THAT WILL BE IN SAGE 2025, ONE MONTH FROM NOW! So you're basically getting an early access while SAGE hasn't begun yet.

This is a major update from the last version (v0.1), and with lots, lots, LOTS of changes. I will try to highlight the most important ones in the sections to follow. Of course, v0.5.1 means that there was a v0.5, which was supposed to be released, but I found some bugs afterwards, so might as well generate a revised version already, right?

Improved character looks with offscreen rendering

(View of PlayStation 1 VRAM with 16bpp mode. Notice that Sonic is drawn to the right, with no rotation)

One of the first features implemented for this release was the use of offscreen rendering. Back in v0.1, character sprites were drawn by blitting 8x8 texturized quads directly onto the screen. While this worked, there were visual bugs with this approach: rotating the player also meant rotating every single quad with respect to an origin point of the animation. This made things much more complicated than they should, and the distortion that came with fixed point precision rotation introduced "gaps" between each of these tiles.

This does not happen anymore. I reserved a small portion of VRAM to render the player character offscreen. Basically, this means that each 8x8 piece is rendered at a correct position with no rotation and no distortion, not even flipped on the X axis if the player is facing the left direction. This uses a sub-ordering-table technique, and the result is a little square containing the character frame, as can be seen above. And now in turn, that same drawn animation frame can be used as a texture for another quad, which will be drawn on screen. And even better: with this single frame, any rotation or distortion is just nowhere to be seen (okay, just a little, notice how Sonic seems to be slightly floating above ground, but that's fixable too).

Oh, and I also took care of a weird distortion created by an off-by-one mapping of textures on this player quad, after some time. It would present in some emulators, but definitely presented itself on console. I'm glad I fixed it before this demo was released.

Red book quality audio

Do you know why Sonic XA uses "XA" on its name?

It's very simple: there is an audio format for the PlayStation that uses the .xa extension. It is versatile, it can have up to 4 or 8 channels that can be swapped mid-play for various effects. I've experimented a lot with it, and it was very fun. There was only one catch: It was compressed 22.05kHz audio. So the quality... was not the best that the PlayStation could offer.

So I ended up dropping .xa background music entirely on this build, in favor of... Red Book audio. This means that Sonic XA now uses CD-quality (44.1kHz) tracks for its background music, and the difference is clear as day, especially if you play the game on a PlayStation 1 and a CRT TV. It also means that I was able to improve the music engine by removing really bad practices and adding proper looping through callbacks and hardware interrupts.

Level-specific objects


This change paved the way for some of the changes to follow, and is probably the one that I spent most time building, in general: Levels can now have their own objects! This means that custom objects can be created on a per-level basis, and these sets of objects have their own palettes.

Another thing that this change brought is that I was able to isolate some common behaviors for many kinds of objects. This means that objects that are solid, floating platforms, "spawnable" and even enemies have common interactions depending on single parts of code, that can be tweaked or improved as needed.

I also added code for object hierarchies and some very interesting bits related to doors and switches, so not you will find proper puzzles on Amazing Ocean Zone that mirror its original release, back in Sonic Worlds Level Collab, many years ago...

Oh, and speaking of enemies...

Enemies


Technically these are also level-specific objects, but they may be stationary or moving. More than that, enemy positioning for moving enemies is basically positioning a spawner; and spawned objects also de-spawn if too far; if destroyed, they also don't spawn anymore. But more than the technical aspect, enemies give life to a level. Having enemies to fight helps shape the level design and adds actual challenge.

This is why enemies were very requested before, and they were probably the first thing I implemented with the new framework for level-specific objects. Sonic XA became an entirely different game after that.

Bosses


These can also be somewhat considered enemies, but they are dramatically different because they have their own space in memory, with their own counters, palette and special variables. Bosses were very fun to program -- and even though I only did two of them, I'd say they look pretty good. The part related to how they glow on hit is some clever palette manipulation that I didn't even know I could do so easily!

Other changes

Some other,  relevant changes in a non-exhaustive list:

  • Improved memory management. Now most, if not all, memory related to levels are allocated within the screen arena allocator, removing unnecessary static memory laying around in the application;
  • Added code to grant 1-ups when collecting cents of rings (up to 800);
  • Added controls to change audio to stereo/reversed stereo/mono, and change master, background music and sound effects volume (the latter defaults to 50% so it doesn't sound too loud at the beginning of the game);
  • Added a pause menu;
  • Removed debug mode on the release build.

Future perspectives

So this is it! I hope you like playing this demo. I will also come back with another announcement when SAGE 2025 starts, or if I release another small revision for the game, if any breaking bug appears in the meantime.

After SAGE 2025, I believe I will take a few weeks off from developing Sonic XA's major features for a while. However, the game has a number of known issues, one of which I will need some extra time to attend to: I still need to rewrite the way that collision detection works. Unfortunately, the game still doesn't have proper 360 degree collision, and whatever code it has goes unused because it is defective.

There is also a number of new features which I am very excited to work with, such as finally doing something to implement special stages in "real" 3D. But this will take more time since I still have to learn a lot of Blender and I will also have to write tools to export 3D models. The game already has rudimentary support for 3D models, but that will need to be rebuilt as well. It is a lot of work, but I'm sure I can tackle the task.

See you again soon!

Files

Sonic XA v0.5.1 [beta] (J), BIN+CUE format 268 MB
Aug 06, 2025
Sonic XA v0.5.1 [beta] (U), BIN+CUE format 268 MB
Aug 06, 2025
Sonic XA v0.5.1 [beta] (E), BIN+CUE format 268 MB
Aug 06, 2025
Sonic XA v0.5.1 [beta] (J), CHD format 170 MB
Aug 06, 2025
Sonic XA v0.5.1 [beta] (U), CHD format 170 MB
Aug 06, 2025
Sonic XA v0.5.1 [beta] (E), CHD format 170 MB
Aug 06, 2025

Get Sonic The Hedgehog XA

Leave a comment

Log in with itch.io to leave a comment.