Trinitron v0.9 pixel/trail art image/animation viewer

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.


Wow, this project is really mind-blowing and cool! While the questions you ask are out of my knowledge, the project ran good on my device, and I love the animated pixel arts!


Wow! Pixel art is a tedious and difficult process by itself, and yet you were able make three different styles of pixels. And the first debugging…was literally debugging. I always wondered why it was called that.


Woah!! That’s insane! Awesome job @anisotr0py! Definitely following your account!

this project would go great with some sort of seed features (i would totallyyyy pay for that)

Now to answer some of the questions:

Im not sure how u coded the long press, but i have used a variable that increases by 1 every frame that the person is pressing something and the button and resets after the touch ends. You would have the long press’s “action” occur when the variable = 60/x if x = the amount of seconds that you want the long press to be

I used about 4 or 5 of your explanations and they all seemed fine to me.

I didn’t notice any typos, but i wasn’t looking too closely.

Wut. No im just kidding. Well, using variables might be possible (but tedious) and im not sure that would even help. Messages tend to be the best way to do stuff like this with tons of clones.

That rule has been buggy for awhile haha. Tho lemme check ur code rlly fast 2 make sure u didn’t do anything wrong. Nope just hopscotch being weird haha. Might also have to do with the low FPS (i don’t know if you have a counter in the project but it seemed low.

I think at some point i took clones off screen as a test, but im not sure if that worked haha. Try it though! Other than that, no you have to just delete and re clone objects every time haha.

Sorry i only answered a few of the more general questions. I didn’t have time to fully understand your code (something i struggle with in general)



Anyways, great project.


I’m gonna nominate this awesome project


Thanks for the info and kind words!

btw I use this as a variable name all the time, including in this project (it’s how the labels along the edges know wut they are selecting for).

yea reading other people’s code is not fun. Good thing there are comments :slight_smile: Actually I do have a few comments (in the tests of empty conditionals). What is your favorite way of doing something like a comment in HS?


well I’m hoping that this project usefully shows the ability to make pixel art by setting up a particularly formatted data string; new data string = new pixel art so less tedious (but maybe not as fast). The individual pixel styles are still hard-coded though.


Yeah I was looking at your variables and saw “Wut”


I figured as much. I hadn’t even heard of a trinitron pixel style until today.


When I first saw Rick Astley it watching MTV in the late 1980s on a Trinitron TV.


woah that’s awesome!!

definitely looking forward to your next few projects :)


Had no idea :joy: shows how little I searched through your code haha

Yes! I create a variable called comment then i set comment to whatever i want the comment to be! This does nothing to the project because im not using the comment variable for anything other than commenting! You could even create a text object to display the current comment too!


I hope you’re patient :slight_smile: In the mean time you can try a trail art geometry game (figure out how to get a score above 200) and learn about prime numbers; those are what I’d call my finished projects.


Thanks. I appreciate your consistently kind and constructive words here on the forum, and I remember your friendly welcome to me a few months back.


I think that it’s a really good project and I can’t even work out how to do one type pixel art and you have done three


the rick-roll tho :joy:


How do you manage to convert the image into a string/array? i have tried to but only managed to do it with 8 colours. what do you use to convert the images? great project!

1 Like

I wrote a script, based on some command-line (unix, laptop) image processing tools that I maintain, which quantizes the 256 8-bit RGB values down to just 10 values, and then formats the output string. Then I transfer the string to my iPad for inclusion in the project.

Quantizing 256 values down to 10 is not magic, I bet something could be cobbled together based on the imagemagick tools that would work the same. Forming the Trinitron data string might be a little fussy


:exploding_head: woahh that’s cool
That really feels like an old TV (though something tells me the rgb lines were vertical)
also I never ever ever used a script to make a pixel art of rick astley and plugged it into a system in hopscotch that uses the individual pixel data stored on a string a couple months back without publishing it because it would be good for april 1st


In the app they are vertical, no? If you tap, and then long-press “Trinitron” on the bottom edge, you’ll get a little history lesson about CRT technology, including the Trinitron tubes you’re remembering. More HS projects should include history lessons :slight_smile: