Skip to main content


Did a bit of optimizing this morning.

Animating 8000 rabbits in #uxn before at 60 FPS, on a 12 years old laptop. 🐰

#uxn
This entry was edited (1 year ago)
Unknown parent

Devine Lu Linvega
@tty only just ported to immediate opcodes, the optimization was to the dei/deo opcodes.
in reply to fox

@fox it looks like one of those early AI picture "deep dream" I think they were called.
@fox
in reply to fox

@fox it should crash at around 8037 bunnies because then it starts to write bunny locations over the program's memory.

64kb ;)
@fox
in reply to Devine Lu Linvega

@fox that’s is amazing!

trying to run it on X11 circa 1998 (Solaris 7) and it’s few FPS :< patches are coming. but first, writing my first tal program to scroll an image over a screen to test videospeed
@fox
in reply to atsuko

@yottatsa @fox Oh, you're using uxn11? It's missing a few crucial speed patches, would you like me to put them on now?
Unknown parent

Devine Lu Linvega
@tty the DEO opcode doesn't do a function call for most ports, so when you set Screen/x DEO2, for example, it writes the short, but does not do a emu_deo() call.

It turned out that this is where the emulator wasted most of its time.
Unknown parent

Devine Lu Linvega
@tty

#1234 .Screen/x DEO2:

deo(0x28, 0x12)
deo(0x29, 0x34)

the deo function is super heavy to begin with, but not only that, it's just not needed in this case, all we want is to write 2 bytes in memory, no need to call any function because not screen event will trigger anyways.
Unknown parent

in reply to floatvoid

@floatvoid I was originally aiming for 100, I can't imagine anyone needing to animate more than one hundred rabbits at any one time.

Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.