For emulators, one very useful thing is to be able to render a grid of colors/pixels to the screen, e.g. a 64x32 monochrome screen for Chip8. Now currently you could do the naive approach and render rectangles, but that isn’t perfect scaling wise; and slow (you can render rectangle pretty fast though using flat lines (choose shortest side, set pen size to that, etc etc) but that’s a bit complicated, and still slight slow. You can try to set the sprite to a costume and stretch it - but boom, anti darn aliasing. I hate that. You could also scale it up when you first create it, but that creates more lists and slowness.
you could try using this block to scale the grid up
![]()
Anti-aliasing would make it blurry.
Ah. Still might be slow, I’ll test the speed when I get home.
I’m getting about 50-70 ms when drawing a 64x32 grid of pixels with pen (flat line ends).
I have chosen just to use the flat lines pen method, using @ego-lay_atman-bay 's block, thank you!
That doesn’t seem to work correctly
The issue has to do with you reshaping the output of COLORS OF COSTUME to the width and height of the costume.

Since the COLORS OF COSTUME already reports all the pixels in a grid, you don’t need to reshape it. It looks like you were also trying to flip the dimensions, which don’t work with the reshape block, you’d have to use ([columns V] of @list) . All you need to do to fix the issue is to just use the COLORS OF COSTUME block directly instead of reshaping it.



