So I've been playing around with PICO-8 for a few weeks now (I've got an Ultima I style game in progress, but that's slow going!). As part of that development, though, I've been putting together a framework based on the old XNA system of game components and the screen manager demo that was part of the XNA demos.
I decided to put together a simple video poker game to demonstrate/test/troubleshoot the framework, and this is the result of a few hours of playing around.
The idea is that there is are a handful of useful components that can be used to perform various utility functions (button handling, timer, etc) as well as a component called the screenhandler.
The screenhandler's job is to manage game screen objects that compartmentalize any aspect of the game that the user interacts with directly.
Basically, this means that instead of tracking game states throughout the code, I can create self-contained screens and pop them onto the screenhandler's stack. It controls what gets displayed and where input gets directed.
Screens can choose to be drawn (or not) when another screen is above them in the stack. The example here is that when the player pops up the betting window to alter the amount they are betting on a hand, the poker screen is still displayed behind it, even though it is not accepting any input from the player.
I'm using movAX13h's P8Coder, and you can download the .P8C file for the game from my blog at http://www.twentysidedblog.com/pico-poker/
(oh, and there is no sound, because I'm terrible with the sound effects editor...) :)
I'm using a modified version of YellowAfterlife's ord/chr code (though not used in PICO Poker) in my framework, but otherwise all of the code (and the terrible artwork!) is by me. Feel free to use it however you like.
[Please log in to post a comment]