Start

heckmeck!

Nerd content and
cringe since 1999
Alexander Grupe
Losso/AttentionWhore

Blood Sugar Rises

Or: How we accidentally the Amiga competition* at Revision 2023! Well, not totally by accident, but getting the first place was a huge surprise for sure!

For context: Back in December 2022, Batman Rises by Batman Group was all the rage in the demoscene. And justly so!

The whole Batman obsession over so many years (“Batman Vuelve” in 1995, “Batman Forever” in 2011, “Batman Rises” in 2022; see prodlist) was a little bit funny, though. At Zenta 2022, we came up with a stupid idea for a special hommage (or respectful parody) to all this Batman business – only with the Powerpuff Girls instead of Batman!

No stupid gag is stupid enough to not put in three months of hard work to make it happen! So, off we went…

“Batman Rises” has 100 more scenes, of course

After the release, main coder Rhino/Batman Group took it like a champ and even had some kind words to spare:

This demo was a pleasant surprise for me. A lot of fun and with a lot of work behind it for the short time I presume they had to make it. Very grateful for the parody and winks. I don't know if it's the one that deserves the first prize, I think I'm not objective in this case, but it was the one I liked the most. Thanks!

Thanks, too, and respect!

Video

Note: This is a rather crappy screen recording at 30 fps. For a more authentic feel, watch the official Revision capture taken from real hardware!

Shortcuts

Given the rather short time frame (13 weeks from idea to deadline), some concessions had to be made:

  • Render everything in the so-called wide-screen mode originally introduced for AGA demos (and not in glorious full-screen and overscan) – 320×180 pixels everywhere! Less graphics data, less frame time headaches.
  • Hand-pixelling all the graphics with manual anti-aliasing and dithering seemed unfeasable. Instead, most graphical elements were done with a scale-down approach (see below).
  • Everything must fit on one disk – no disk change handling, no additional syncing/timing issues: What music do we play when we wait for the disk change? Loop a special pattern? Use a different .mod for the second disk? What if the overall timing changes? etc.
  • Since “Batman Rises” uses a lot of fancy polygon-streaming techniques for complex 3D scenes (the topic of heated debates since forever and especially since Eon by The Block Lotus), “Blood Sugar Rises” had to include some of that stuff as well. How we would achieve that was to bee seen…

Scale-down graphics

To get this out of the way first: No, the graphics in the demo are not just ripped and converted Powerpuff Girls images scraped from the interwebs – I wish!

However, I did make heavy use of references, of course. A Powerpuff Girls demo has to stay true to its origin!

All graphic assets were sketched out and then hand-traced in double or four times the size of the target resolution, then scaled down with bilinear interpolation and reduced to 8 or 16 colors or less:

So, while this saved a lot of low-level pixel work, you could still say all the graphics are hand-pixelled – just not in the original resolution. Of course, there was still a lot of back-and-fourth to get the scaled-down versions to look nice.

However, I can see where the “ripped graphics” impression comes from. The Amiga graphics do come out a little mushy and look nothing like hand-drawn images – maybe a better scaling and color reduction method would have helped? Or, well, more time of course…

One disk

At first, using “just” one disk seemed not much of a problem. With the built-in doynamite68k packer of Axis’ trackmo demo framework, I had been struggling to fill even one disk in earlier productions.

However, this time around things got tight near the deadline, but all went well and the final disk even has a whopping 1,552 bytes left!

+ added bootblock             size    986  free space     38
+ added launcher              size   9092  free space 890492
+ added startquote.dat        size   2476  free space 888016
+ added music1.dat            size  83725  free space 804288
+ added grouplogo.dat         size  53632  free space 750656
+ added city.dat              size 105060  free space 645596
+ added ship.lz4data          size  53834  free space 591760
+ added revisionship.lz4data  size 116896  free space 474864
+ added title.dat             size   6336  free space 468528
+ added dots.dat              size  19324  free space 449204
+ added hotline.dat           size  23336  free space 425868
+ added mayor.dat             size  45788  free space 380080
+ added blockfly.dat          size  24176  free space 355904
+ added gross.dat             size  32436  free space 323468
+ added flying-sprites.dat    size  41660  free space 281808
+ added party.dat             size  57340  free space 224468
+ added punch.dat             size  18920  free space 205548
+ added tooth.dat             size  73392  free space 132156
+ added endscene.dat          size  97920  free space  34236
+ added credits.dat           size  32684  free space   1552

The total uncompressed size of all files comes in at 2,594,828 bytes, so that’s an impressive overall compression ratio!

Polygon streaming (or rather, faking)

To put smooth-moving, complex, filled 3D objects into our demo, we could… sit down and code and see what we can achieve – the way the Amiga gods intended.

To put smooth-moving, complex, filled 3D objects into our demo with a tight deadline and without any shame… we need:

  • 3D models.
  • A tool to manage camera movement and keyframes.
  • A way to get take the rendered frames in 2D and play them back on the Amiga.

Instead of learning Blender for once, I decided to write my own tool, so I can have exact control over the keyframes, surface colors, clipping areas and the export format. I also built the simpler models (delivery truck, space ship, tooth) with that tool, which was… painful. (Note to self: Do learn Blender some day.)

Regarding the vector player, I wasn’t too optimistic: I had tried it once (at the beginning of plnx), and failed miserably. Getting this right is hard if you want to:

  • avoid bleeding (pixel-perfect seams between polygons),
  • do the line drawing and filling on the Amiga, and
  • have a compact, efficient data format that compresses well.

IMHO many critics of pre-rendered 3D scenes on the Amiga tend to underestimate the amount of work that goes into a task that only looks like “just playing back an animation”. The pouet comments for “Batman Rises” mention some of the dirty details, or go read TBL’s Eon tech blog on scene packing and the playback routines.

Long story short: I avoided the coordinate encoding, delta packing, buffering and separate data streams altogether and worked with fully rendered bitmaps instead. The dirty route, if you will :). Then it was merely a question of which algorithm was best suited for the job, with a reasonable compression level and the ability to decompress each frame in real time – all cheating aside, I wasn’t ready to give up 50 Hz rendering!

I chose lz4 in combination with leonard’s optimized 68k decoder for that, which worked great: The frames for this truck, for example, are about 2K in raw bitmap size each and get compressed to some 500+x bytes per frame. A sweet spot to put in the checkmark at: Good enough!

Side note: I did try out to just pack the polygon edges and do at least the Blitter fill myself, but that compressed way worse.

So much win

How much did the first prize catch me off guard, you ask?

Let’s put it this way: Due to my first COVID infection, I only could come to Revision on Sunday, and had to “catch up” with the party a little. When the prize giving ceremony started on Monday, I was sleeping in my bathrobe on some inflatable mattress in the toilet tunnel. Half-awake, I opened up the party stream on my phone and was confused: Why is our demo being shown?! Wait a minute… Does that mean…? Can it be…? And off to the stage I rushed.

Special thanks to John Hertell a.k.a. Chucky/The Gang for sponsoring a maxed-out ReAmiga 1200 for the first prize!

So much win, so tiny eyes: Losso and bod
What a prize!

Links

*) “How we accidentally”: The omitted verb was intentional, I thought this would come out as a reference to a famous Razor 1911 intro, but that one was having a verb in the title all along?! Weird

previous next close
eie