General code refactoring


In this update not much has changed gameplay wise other than one of my friends has started to develop a level which he wants to be really hard but idk if it is hard yet, guess we'll find out when he finishes (his level is level 4) but that aside, this update entails just a really big fix to how the code would run.

Originally, the code would do a lot of coupling between the child and parent as well as run on a lot of promises and understanding that you can run if this condition is met and wait for that condition, so very unstable and made the code really huge, I mean just for LOADING 4 levels we were looking at like 50 lines of code but now I just a much simpler way via signals which allows me to send a message from the child to the parent without coupling which is much more efficient taking the code down from 50 lines to about 8 lines to load a level so big changes. Next to do with the main coupling error the level scenes would often consult the parent to receive a sibling, the player, so it could detect if the player collided but now instead I just test if something has entered the area of the buttons and flags and evaluate if its the player or not so overall the code is much nicer and cleaner now, other than that not much has changed but thank you for reading this till its end, 'till next time,

Bailey.

Get Platformer 2.0

Buy Now£2.00 GBP or more

Comments

Log in with itch.io to leave a comment.

my arm hurts from writing all that