Log In  

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.

Cart #23335 | 2016-06-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

P#23338 2016-06-20 22:20 ( Edited 2016-06-21 02:24)

I've been using your screenhandler framework on recent prototypes! I like how robust and safe it is. Once it's in place, I have an easy time working with it, and it speeds up my workflow.

P#106211 2022-02-02 14:26

Cash is not reset per starting over, @kjaegers ?

P#106234 2022-02-02 22:00 ( Edited 2022-02-03 02:48)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 06:06:17 | 0.012s | Q:20