Log In  

Hey y'all :) I'm currently working on a game where you look through various objects cluttering up your space & scrub them out of existence if you don't want them. Objects are placed onto the screen, one at a time, for you to observe & erase. The screenshots here show a rough draft of the mechanic--the brush goes to the right side of the screen, having come over from the left & "cleaned" a line through the box.

I've gotten a functional brush up & running (thanks to carts like shodo for reference!), but I want the game to be able to check if the object has been "erased" or not, aka if the object has been completely covered up by the brush drawing over it.

Because the background will be black, and the object is being drawn over in black, I'm thinking something that checks to see if the screen data equals 0 might work. I'm not really sure if that's how I should be approaching it, or even how to format it properly. There's also the fact that the brush will still be on the screen after erasing the object, so I don't know if there's a way to check for screen data while it's there, or if I also need to make sure that disappears too.

A blank screen!...almost.

I'm proud of the amount of progress I've made up to this point, but I'd love some help here if folks have any ideas! Still learning how the memory layout works with pico-8 & how much can be done with it, so I'm not sure how to check the screen data.

Thanks!

P#62886 2019-03-29 03:47 ( Edited 2019-03-29 03:56)

You could instead count how many pixels have been erased.
When that count reaches screen width * screen height, the entire screen has been cleaned.

P#63105 2019-03-29 11:28 ( Edited 2019-03-29 11:28)

@steveRoll I like that idea! Been playing around with how to code that, but it's a bit outside my wheelhouse...

I've been trying to use screen data (0x6000-0x7fff) to solve this, but is there another way to count pixels?

P#63235 2019-04-04 18:25

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 08:58:57 | 0.017s | Q:10