Log In  

Cart [#jajewugupa-0#] | Code | 2019-08-29 | License: CC4-BY-NC-SA | Embed

A little while ago, I got some help in making state switching easy to understand and carry out without (too) many issues. Since I've been trying to get back into the swing of things, I decided to begin documenting the things I learn and turning them into proof-of-concept demos. My hope is to be able to come back to the code and understand why it was useful to me.

The eventual goal is to build and/or showcase some code that makes building PICO-8 games easy and fun for me.

The Closure State Demo is simple:

  • There are two states: ring, and FOE (kudos to those who get the reference)
  • You swap between the states using X
  • The same variable name is used ("message") to display different text in each of the game states
  • The FOE starts in the same place every time you begin its phase

I threw in a few extras, like movement and bounds-checking for the FOE sprite so it feels a little more "real".

More detailed notes are contained in the cartridge's comments. Let me know if it makes sense or is useful for you!

P#67004 2019-08-29 04:20


[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-21 07:08 | 0.014s | 4194k | Q:20