I’ve mostly finished a program called Trinitron for viewing images and simple animations:
The main idea is to demonstrate a pixel-art viewer that reads image/animation data from a data string (a few pre-defined, or paste in your own), and then can display it in a variety of ways. I’ve included some historically important pixel art from the 1970s, with the hope that fans of pixel art will find it interesting.
- If you long-press an already-selection choice for image, pixel style, or transition, you get an overlay with more info. How have others coded “long-press for more info”? Do my explanations make sense? Any typos?
- I made a per-pixel clone, and each pixel is responsible for drawing itself (in response to a “draw” message, or touching a trigger object). Are there ways of making all of this go faster, while keeping the flexibility to display an arbitrary image supplied at run-time?
- Why why why does the “Sound” transition (based on “when ipad hears loud noise”) sometimes work, and sometimes not work?
- The constant loop of retriggering a draw once the last frame is done involves a somewhat elaborate/fragile dance of a “stage” variable going between two different values (rather than trying to clock it to any particular frame rate), with stage starts announced by message. Is there a way to speed this up, while preserving the ability to use all three different transitions?
- It is possible to freeze the redrawing by changing the image/style/transition at the right (wrong?) time, but I’m having trouble tracking it down. Can anyone help isolate a redraw problem that can be reliably recreated? Or advise on how to simplify the stage transition dance?
- Sometimes frames (like in Space Invaders) are skipped, but I’m not sure why.
- Any tips on speeding up the initialization of the pixels (not simply making a clone; have to process the data so pixels know how to draw themselves)?
- I’ve noticed that simply having created more clones slows down the frame rate, even when the clones aren’t doing anything (try: Hopper, Square, At-once; look at redraw rate, then switch to Space Invaders, then back to Hopper, look again at redraw rate). Why is this? Is there a way to hibernate unneeded clones so that I don’t have to take the time to reclone them later, but I don’t pay a performance price of them sitting around?
I’m guessing that for speed-ups I could be doing more with additional rules (and fewer nested conditionals inside blocks), but I can’t quite see how. Thank you in advance for any feedback or ideas.