Matt's Prototypes

Thanks Scott! Your compliments mean a lot :yellow_heart:

I just updated the GIF for the racing game to feature a better car sprite. Next I want to redo the controls to allow drifting/skiding.

Anyway, you can define your own fill patterns with playdate.graphics.setPattern(pattern) I saw a use of that in the Asheteroids example. I used macOS calulator binary mode (click the digits inside the red highlight to "set pixels") and you'll see the number 0xF0 corresponds to 1111 0000. Do this 8 times to define 8 rows of pixels.

Screen shot 2020-05-22 at 19.32.16

So this sort of pattern means you can do "marching ants" quite easily with the following pattern applied to narrow lines.

pattern = { 0xF0, 0xE1, 0xC3, 0x87, 0xF, 0x1E, 0x3C, 0x78 }	-- diagonal lines

if ticks % 10  == 0 then
	table.insert(pattern, 1, table.remove(pattern))  -- rotate rows to animate pattern
end

playdate.graphics.drawRect(10,10,380,220) -- draw single pixel rect

Example:
ants.opt

12 Likes