My journey
- Contemplating my viewers
- Recognizing my talent vary
- Making ready the room and tiles
- Inserting the 4 player-adjacent tiles
- Inserting the poop tile at a random location
- Revealing poop when it’s one tile away
- Resetting the adjoining tiles
- Including a touch
- Why will not this finish?
- Embracing the bug
- Making the title card
- Excellent bugs
- Celebrating my accomplishments
Contemplating my viewers
- My son: a 3.5 12 months previous boy
- Who loves speaking about poop, toots and different gross bodily actions
- And who enjoys fiddling round with my Nintendo Swap and iPhone
Recognizing my talent vary
- I can swap tiles
- I can reply to participant motion occasions
- I can generate random numbers
- I can place textual content on the display screen
- I can generate messages
- I can establish adjoining tiles
I can do that!
Making ready the room and tiles
- Make the room all black
- Swap the colour of the participant
- Make the participant’s background pixels clear
- Create a poop tile
- Create a poop-in-the-dark tile
Inserting the 4 player-adjacent tiles
First, producing the X and Y coordinates:
px = occasion.px
py = occasion.py
above = py
above -= 1
under = py
under += 1
proper = px
proper += 1
left = px
left -= 1
Inserting the poop tile at a random location
Producing the coordinates:
poopX = random 0,24
poopY = random 0,14
Briefly revealing the placement:
inform poopX,poopY to
swap "poophidden"
finish
wait 1 then
inform poopX,poopY to
swap "black"
finish
finish
Revealing poop when it’s one tile away
That is half pseudo-code, since every of the 4 conditionals may be very related:
if [within the room's bounds] then
inform X,Y to
if X==poopX then
if Y==poopY then
swap "poop"
finish
finish
finish
finish
Resetting the adjoining tiles
In participant
, a customized reset
occasion is emitted on every replace
occasion.
The reset
occasion is hooked up to each poop tiles.
It merely swaps the tile for black
.
Including a touch
Whereas play-testing, I’d miss or overlook the place the poop is.
So, I made the A
button briefly present the poop once more:
on verify do
inform poopX,poopY to
swap "poophidden"
finish
wait 1 then
inform poopX,poopY to
swap "black"
finish
finish
finish
Finish after gathering a number of poops
I added an on acquire do
occasion to the poop tile.
Inside it, I known as fin
with a game-ending message.
Why will not this finish?
I play examined within the pulp browser simulator.
All the things labored as anticipated.
The sport-ending message appeared after gathering the poops.
I downloaded the PDX file.
I opened it within the Playdate Simulator.
I collected the poop.
The console spit out a cryptic error.
I spent an hour trying to deal with the error.
I could not determine why the sport crashed when it tried to finish.
Embracing the bug
I made a decision the sport simply would not finish.
As a substitute, the participant simply collects poop that seems in several areas.
Right here is my up to date poop tile acquire operate:
on acquire do
poops++
say "You discovered {poops} poops!" then
inform occasion.recreation to
name "movePoop"
finish
finish
finish
movePoop
is the code you have now seen a number of instances, with a brand new poopX and poopY generated prior.
Making the title card
I exported the font and imported it to be used as World tiles.
I created just a few rounded-corner tiles to make the poop look…cooler?
I duplicated and inverted the three letters, ‘THE’, to seem contained in the poop.
Excellent bugs
- The sport would not finish
- If the poop newly seems actually near the participant, it will not correctly swap the poop and poop hidden tiles instantly
- If the poop seems in the identical place because the overlaid textual content, it’s invisible however nonetheless collectable
Celebrating my accomplishments
- I constructed a recreation nearly completely from scratch in pulp!
- I debugged a problem the place the participant could not transfer to the highest or backside rows. And obtained caught in place!
- I labored round a game-non-ending bug!
I confirmed my son the sport.
Sadly, it did not maintain his consideration for greater than 10 seconds.
Oh nicely. It was nonetheless an awesome studying expertise making it!