Introduction:
Outline has typically been the party for us where all the development time and focus is going to our yearly Trepaan demo with our friends. As has been the case this edition. Both myself and Blossom were heavily involved in the production of our demo "Wondere Wereld" and we were still working on that at the party place on thursday and friday-morning putting the final touches on the demo.
This ment that any sizecoded releases were of secondary concern, but as Outline is one of the few parties that hosts a 128 byte intro competition ment that any time left went to a 128 byte production. For Blossom that ment partycoding a ZX Spectrum intro live at the partyplace using Bazematic to help her minimize the turnaround time (See here for the result) where i was picking up and finishing a 128 byte intro that i started the year before.
Design:
After porting over Silos to the MicroW8 and releasing Microlair at Inercia 2022, i had had some experience under my belt with writing tiny raymarchers on the MicroW8. So when on a vacation to Cornwall/UK late 2023, I wanted to see how small I could get a basic raymarcher by utilising all optimisations i learned when converting a bunch of our fantasy console intros over the MicroW8.
Visuals:
So raymarching experiments in smaller sizes, you only have a few choices in terms of geometry Cylinder (usually the cheapest option in terms of size), Sphere or a gyroid type distance function
As I already used Cylinder in Silos, a clipped inverse-sphere in microlair, I tried experimenting with a gyroid shape with this one, which had the added benefit that it doesn't need additional domain repetition. After some experimentation with 'cranking up the shape' i was able to get a more 'rounded blocky' structure look.
Most of the default colors on MicroW8, despite being thought about are somehow never cutting it (no white top color, hues either too candy or too codercolored, etc.), except for the sandy colors around 96 which i liked. I then added a bit of 'texture' to the thing by using vertical + depth ray direction/hitpoint for some coloring (vertical because it will keep the thing symetrical which i always find pleasing)
At the end of our vacation, the intro was sitting in at 135-140 bytes.
Saturday morning at Outline 2024: Trepaan demo has just been delivered, time for some party coding. I picked up the deserty raymarch project again and was able to optimize it down further to about 128-131 bytes.
Changed color to blue to save a few bits on compression, renamed to Atlantis Rising Then in played with perspective by dividing X/Y to uv with different values and changing the direction vectors until i found something that gave a good view/perspective.
Camera now tilting to one side only, leaving just enough room for a droning sound. Sort of took the 'risk' of starting with the camera in the wall and revealing the 'temple entrance' later, but i think it worked out nice. Delivered just in time for the deadline.Optimisations:
So here are the different optimisations tactics i used on the intro to get everything within the size limit:
* Have a single label to jump to with branch_if for all 3 loops (x,y,z).
* Both the x and y loops use a modulo structure to automatically reset the value. ( branch_if x:=(x+1)#%320:drawloop;
)
* Both the x and y loops have the same iteration counter ( 320
), so technically its overdrawing.
* Using the same divider for extracting u,v ray directions from the x,y loop.
* If possible use as few different float values as possible.
* If possible use as few different i32 values as possible.
* If possible use 'intvalue as f32' to represent float values.
* Use inline variables/code as much as possible.
* Don't initialise any variables unless you really have to.
Audio:
This intro uses the bare minimum audio I could muster in such a small size. This was done by mashing the MicroW8 soundregisters (located at 80 and up in memory) with different values.
These can either be based of a variable or calculation or in this case a constant as i was looking for a single note sound. After a process of trial and error I landed on this low humming sound that I think worked well with the intro.
somevar?80 = constantvalue;
Conclusion:
Had a blast at outline party where i was able to meet up again with many dutch sceners, teadrinker, plex, 42bastian, NR4 and many others. Our demo and both our intros did well in the compos, so our weekend couldn't have been better.
For more information, you can check out the intros at Outline 2024 here