Watch sand fall in interesting patterns.
Looking for advice on optimising (and profiling?) this. On my old macbook pro it runs at around 10fps at best. I can't see any profiling tools built in to p8 but maybe I missed something? What's generally considered slow? I've sped this up by reducing the size of the simulation and mirroring, so it's really only running a 45x64 sim.
Things I'm thinking about:
- some sort of "active islands" system for not updating the whole sim every update
- not clearing the screen but remembering the part of the screen that are unstable, to reduce rendering costs, but I think (again, no way to measure) that it's update-bound.
This is something I haven't been happy about in PICO. There is a command called FLIP() which maintains perfect speed - and yet to update every 128x128 pixel on the screen is actually slow no matter how fast your computer may truly be.
I would like to see a future command called RELEASE() or something which will let your program run flat out top speed slowed down only by FLIP() or functions designed for time splicing.
Then your Sand Toy, TENPN, and other great programs like this will run full speed.
@tenpn Blokatt did exactly that a few weeks ago, have a look:
Sandbox-8 by Blokatt
curiosity is what I'm talking about, dw. Blokatt's sandbox runs fast. there might be a trick or two in there.
Fair enough. I know years ago, Richard Garriott had released ULTIMA for the Apple computer. At the time I was using Floating Point BASIC to draw my own tiles and images.
He, however, was using machine-language. Were it not for me looking to his code and understanding it, I might've delayed my entry into the world of machine-language coding and hindered my game writing process.
As it was after looking at his, I was able to write my own, and it in turn was faster than his by determining what tiles were already updated and didn't need to be redrawn.
A year later Richard released Ultima ][ using the very method of speeding up tile plotting that I developed.
And no, he couldn't have known about it as I never posted it. It was just - great minds run in the same channel. :)
Thanks for the link @ultrabrite!
Kinda bummed that someone's already made such a polished sand toy thing, but eh, whatever. I'll see if I can figure out how they got it so slick.
[Please log in to post a comment]