How a blue ladybug earns world domination devlog

Just this once

Ive fixed the Exit door Code

We only need to check if every “button” is gone whenever we push a block so i placed this at the bottom of that function

this code reads:
if there are no “buttons” left (a length of zero total spaces with buttons)
then replace all locked doors with the opened ones

i also replaced the 4 diffrent doors with just this one lock as ive never liked repeating similar code just for visuals
you can just copy this again 3 times for the other doors but im not doing that (keep the for element inside the same boolean you dont need to copy that)

ive also compacted the level select

insted of copy and pasting the same template with diffrent values we can just refrence the current value we selected and offset it by that
I always found it fun that settings are strings

converting intagers and floats to strings and vise versa is quite useful

I changed how levels are setup aswell

Firstly on the tilemap side

ive added a ladybug tile that the player will start on its a lot easier in my opinion then hardcoding it each time

as for setting up new levels. . .

it may seem like alot but lets break it down

We start by starting O:
then because we were able to enter the level lets unlock it with a setting
after that we need to set the tilemap
we can achive this with you guessed it ARRAYS
Please learn em ive made a topic about it in the past

after that we need to set the background color to what we want for the area we are in
and finaly place our player on our starting point

ive also created some Comments inside the Game to explain further

3 Likes