kjaegers [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=13087 PICO Poker (and Framework) <p>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.</p> <p>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.</p> <p>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.</p> <p>The screenhandler's job is to manage game screen objects that compartmentalize any aspect of the game that the user interacts with directly.</p> <p>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.</p> <p>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.</p> <p>I'm using movAX13h's P8Coder, and you can download the .P8C file for the game from my blog at <a href="http://www.twentysidedblog.com/pico-poker/"><a href="http://www.twentysidedblog.com/pico-poker/">http://www.twentysidedblog.com/pico-poker/</a></a></p> <p>(oh, and there is no sound, because I'm terrible with the sound effects editor...) :)</p> <p>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.</p> <p> <table><tr><td> <a href="/bbs/?pid=23338#p"> <img src="/bbs/thumbs/pico23335.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=23338#p"> PICO Poker 0.1</a><br><br> by <a href="/bbs/?uid=13087"> kjaegers</a> <br><br><br> <a href="/bbs/?pid=23338#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=3664 https://www.lexaloffle.com/bbs/?tid=3664 Mon, 20 Jun 2016 22:20:43 UTC [WIP] Ultima-style RPG <img style="margin-bottom:16px" border=0 src="http://www.twentysidedblog.com/wp-content/uploads/2016/06/pico8_rgp_wip.gif" alt="" /> <p>I bought PICO-8 after I learned about it via PocketCHIP. I've been playing around with it for a couple of weeks now, and finally got started on my first real project. Just a GIF of the current state so far. I've been putting together the various components and systems I'm going to need to complete the game. So far, I've got:</p> <ul> <li> <p>Game Component system, including independent components for button handling, timing, and utilities. The whole game is handled via components. The _update() method is 2 lines. _init() and _draw() are 3 lines each. This system is actually based on XNA's game component design (I used to do quite a bit with XNA).</p> </li> <li> <p>Screen Management system - This is one of my game components. It allows me to create separate code entities for various game states and determines which ones should be updated and drawn at any given time. Currently, I have the following screens implemented: splash screen (not in the GIF), title screen, character generation screen, text edit window, pop-up menu, world map screen, and town map screen. Several more still to implement.</p> </li> <li> <p>Save/Load system - The title screen will check for valid save data and offer the &quot;Journey Onward&quot; option if present. I've got about 8 bytes left in my cartdata after accounting for character info, equipment, and story flags.</p> </li> <li>Compressed map system - Towns and dungeons are stored as simple RLE compressed strings. All of the maps are stored as ascii drawings in a text file. I've put together a powershell script that reads the text file and generates LUA for pasting into the game to include the maps themselves and other data about the map (world location, name, encounters, etc).</li> </ul> <p>I'm still working on a few of the base systems, including character sheet/inventory system, merchant screen, NPC dialog screen, the combat system, and the dungeon screen.</p> https://www.lexaloffle.com/bbs/?tid=3564 https://www.lexaloffle.com/bbs/?tid=3564 Tue, 07 Jun 2016 18:52:14 UTC