brent [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=15357 PICO-8 Links <p>Going to use this post to keep track of PICO-8 related links I may want to reference later</p> <p><strong>INPUT</strong><br /> <a href="https://www.lexaloffle.com/bbs/?pid=28819#p28819">Input layout</a></p> <p><strong>TEXT</strong><br /> <a href="https://www.lexaloffle.com/bbs/?pid=29023#p29023">Special characters in PICO-8</a></p> https://www.lexaloffle.com/bbs/?tid=27713 https://www.lexaloffle.com/bbs/?tid=27713 Thu, 22 Sep 2016 08:02:47 UTC Shadow Techniques <p> <table><tr><td> <a href="/bbs/?pid=28517#p"> <img src="/bbs/thumbs/pico28633.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=28517#p"> Shadow Techniques</a><br><br> by <a href="/bbs/?uid=15357"> brent</a> <br><br><br> <a href="/bbs/?pid=28517#p"> [Click to Play]</a> </td></tr></table> </p> <p><span style="text-decoration: underline;">OVERVIEW</span><br /> This cart is a bit of a demo of a few shadow methods I've given some thought to. The first two techniques work best at 60fps, but the final technique I think is suitable at any speed.</p> <p><strong>UPDATE</strong><br /> The original cart had an issue where the &quot;peek/poke merge&quot; technique could not draw starting at odd numbered X coordinates. This has been fixed (but made things a bit more complicated)</p> <p><span style="text-decoration: underline;">METHODS</span></p> <p><strong>1 ON/OFF SPRITE</strong>:<br /> This method uses a solid shadow sprite that cycles between on/off every frame</p> <p><strong>2 ALTERNATE PATTERNED SPRITE</strong>:<br /> This method uses two sprites with an alternating pattern that is cycled every frame</p> <p><strong>3 PEEK/POKE MERGE</strong>:<br /> This is what I really wanted to get to :) This method uses a defined palette of darker colours. Each PICO-8 colour is given a darker alternative. For some, that is full black, but for 8 (red), it is given dark purple (2).</p> <ul> <li>The shadow sprite is read in from PICO-8's memory and every pixel that is not black is considered shadow, and black is ignored.</li> <li>The draw coordinates for the shadow are read from memory in the graphic area, the existing colour values are determined and are replaced with their darker version wherever there is shadow pixel in the sprite</li> <li>The new darker pixels are poked back into memory</li> </ul> <p><span style="text-decoration: underline;">CONTROLS</span></p> <p><strong>O</strong>: Cycle shadow method<br /> <strong>X</strong>: Cycle background</p> <p><strong>Down</strong>: Toggle background scrolling</p> https://www.lexaloffle.com/bbs/?tid=27653 https://www.lexaloffle.com/bbs/?tid=27653 Wed, 14 Sep 2016 19:11:58 UTC Freecell <p> <table><tr><td> <a href="/bbs/?pid=28347#p"> <img src="/bbs/thumbs/pico28715.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=28347#p"> Freecell 1.13</a><br><br> by <a href="/bbs/?uid=15357"> brent</a> <br><br><br> <a href="/bbs/?pid=28347#p"> [Click to Play]</a> </td></tr></table> </p> <p><span style="text-decoration: underline;">OVERVIEW</span></p> <p>Welcome to <em>exciting</em> world of <strong>Freecell</strong>! Oft overlooked for the <em>also-bundled-with-Windows</em> Solitaire, <strong>Freecell</strong> is the thinking man's card game. Reorganize your eight cascades from King to Ace by making use of your free cells and return them to foundations to clear the board.</p> <p>As an aside, this is the first game I've written. I wanted to take on something relatively simple to get a handle on PICO-8 and learn a little bit about organizing a game. If you encounter any bugs, let me know. I'm on twitter too - <a href="https://twitter.com/somebrent">@somebrent</a></p> <p><span style="text-decoration: underline;">GAMEPLAY</span></p> <p>The goal is to fill your four foundations with each suit starting with the Ace and ending with its King.</p> <p>The board consists of</p> <ul> <li>four free cells (upper left)</li> <li>four foundation pools (one for each suit, upper right)</li> <li> <p>eight cascades of cards</p> </li> <li>Cascades are dealt at random, but cards can be reorganized by alternating colours in descending value. (e.g., a red 2 can put moved to a black 3)</li> <li>Any single card can be moved to any free cell.</li> <li>A group of cards (a tableau) in valid order can be moved to another cascade if there is enough free cells or empty cascades to facilitate the move, and if the final card at the destination keeps the tableau in valid order.</li> <li>By reorganizing the cascades and moving cards to their foundations, <em>nearly</em> any board can be cleared.</li> </ul> <p><span style="text-decoration: underline;">FEATURES</span></p> <ul> <li>Entire tableaus can be moved in one fell swoop (does not take advantage of intermediary cascades, only free cells and empty cascades)</li> <li>Unlimited undos are provided to help you out of a jam</li> <li>Sweet, minimalistic SFX. Woah.</li> <li>A two-frame selection animation!</li> </ul> <p><span style="text-decoration: underline;">CONTROLS</span></p> <p><strong>U/D/L/R</strong>: Navigate the board</p> <p><strong>O</strong> <em>(No card/tableau selected)</em>: Select card/tableau (if valid)<br /> <strong>O</strong> <em>(Card/tableau selected)</em>: Move card/tableau (if valid)<br /> <strong>O</strong> <em>(On top of the currently selected single card)</em>: Move card to foundation</p> <p><strong>X</strong> <em>(No card/tableau selected)</em>: Undo last move<br /> <strong>X</strong> <em>(Card/tableau selected)</em>: Cancel selection</p> <p><span style="text-decoration: underline;">UPDATES</span></p> <p><strong>v1.13</strong></p> <ul> <li>Fixes</li> </ul> <p><strong>v1.12</strong></p> <ul> <li>Added left/right and up/down pointer wrapping</li> </ul> <p><strong>v1.11</strong></p> <ul> <li>Fixed drawing shadow at screen bounds. Thanks <a href="https://www.lexaloffle.com/bbs/?uid=13485">Vectorguy</a> and <a href="https://www.lexaloffle.com/bbs/?uid=11901">LRP</a> for the bug report</li> </ul> <p><strong>v1.1</strong></p> <ul> <li>Added <a href="https://www.lexaloffle.com/bbs/?tid=27653">shadow blending</a> for the pointer's shadow</li> </ul> <p><strong>v1.0</strong></p> <ul> <li>Initial release</li> </ul> https://www.lexaloffle.com/bbs/?tid=27637 https://www.lexaloffle.com/bbs/?tid=27637 Sun, 11 Sep 2016 19:13:00 UTC Freecell: First game won! <p>I took some time to rewrite things so that a more deliberate architecture was in place before moving forward with more changes. I wouldn't exactly call it &quot;clean&quot; at this point, but it's better. I'd happily listen to feedback on architecture once I've released it.</p> <p>For now, a screenshot of my first finished game in Freecell for PICO-8. Lots to do still! I'd like to strike a balance that saves button presses without turning the game too much into &quot;autopilot.&quot; As it stands right now, it requires far too much input though.</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/15357/PICO-8_0.png" width=580 height=540 alt="" /> https://www.lexaloffle.com/bbs/?tid=27610 https://www.lexaloffle.com/bbs/?tid=27610 Mon, 05 Sep 2016 17:18:58 UTC Freecell: Moving cards <p>Had a little bit of time last night to add in moving cards around as well as selection animation. Anything can be moved anywhere right now, but with that out of the way I think it's time for logic next</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/15357/PICO-8_2.gif" width=256 height=256 alt="" /> https://www.lexaloffle.com/bbs/?tid=27593 https://www.lexaloffle.com/bbs/?tid=27593 Fri, 02 Sep 2016 09:18:20 UTC Freecell! <p>Just got my PocketC.H.I.P. and figured it was time to dive in and give creating something a shot. Figured a card game would be within my skillset to create, so here it goes</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/15357/PICO-8_0.gif" width=256 height=256 alt="" /> <p>Have the deck randomization, board dealing and cursor working so far. Cards can be moved (in code), but I think it's time to start working on a bit of the logic that makes Freecell well, Freecell.</p> https://www.lexaloffle.com/bbs/?tid=27588 https://www.lexaloffle.com/bbs/?tid=27588 Thu, 01 Sep 2016 09:18:15 UTC