Apple II Bubble Universe


Background

This is the Bubble Universe effect, recently discovered (?) by yuruyrau on twitter. I thought it looked interesting and worked on an Apple II version based on some BASIC code of the algorithm found on pouet.

I started in Applesoft, them moved to 6502 assembly. For speed I have a super-unrolled screen clear and also a custom HPLOT routine using a lot of lookup tables. I was using 8.8 fixed point for the math and a lot of tricks but only could manage around 5fps with I=24,J=24.

I ended up discussing this on the sizecoding discord and it turns out some other people were working on it too (and we all independently found the trick that 1/6.28 is roughly $41). However Serato Fig ended up with the best implementation. From a TIC-80 proof-of-concept to a C64 final version, a lot of clever optimizations but the most important was that the effect could be done using only 8-bit integer math, and that a lot of the scaling/centering could be pushed into the sine tables.

Videos

A hastily grabbed version of the effect, running in the AppleWin emulator:



System Requirements


How can I run this?


Downloads

Disk Image

Source


Development Notes

18 February 2024

Got Serato Fig's code going with my Apple II routines. Had some interesting glitches until I figured out that the sine tables had to be duplicated, otherwise it would wrap into un-initialized data.

Code is currently not size optimized.

31 December 2023

Initial work on getting things going. Basing it off of BASIC implementation posted on Pouet. Despite a lot of graphics code optimization, my version only getting around 5 fps using 8.8 fixed point math.


Other VMW Software Demos
Other Apple II Projects
Back to the VMW Software Productions Page