Currently we handle everything in the setup() and draw() functions. As the game gets more complex I think we need some kind of state system / state machine to handle the different kinds of states.
I have coded a state system before with a state class: State.js and a state machine class: StateManager.js. Maybe we can use something similar.
Currently we handle everything in the setup() and draw() functions. As the game gets more complex I think we need some kind of state system / state machine to handle the different kinds of states. I have coded a state system before with a state class: State.js and a state machine class: StateManager.js. Maybe we can use something similar.