kevinthompson [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=34825 Castlebots <p> <table><tr><td> <a href="/bbs/?pid=72185#p"> <img src="/bbs/thumbs/pico8_castlebots-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=72185#p"> Castlebots v0.1.1</a><br><br> by <a href="/bbs/?uid=34825"> kevinthompson</a> <br><br><br> <a href="/bbs/?pid=72185#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Castlebots</h1> <h2>Controls</h2> <p>Use any button to charge the cannon. Release the cannon to fire at the attacking robots.</p> <h2>Random Game Generator Criteria</h2> <p><strong>Environment</strong>: Castle<br /> <strong>Goal</strong>: Remove All Enemies<br /> <strong>Genre</strong>: Adventure<br /> <strong>Rules</strong>: One Life Only<br /> <strong>Wildcard</strong>: Robots</p> <h2>About</h2> <p>Last night I wanted to try making a game in an hour so I opened up a <a href="http://ygd.bafta.org/resources/game-idea-generator">game idea generator</a>, got a random game idea and went to work. It ended up taking closer to five hours between last night and this evening, but for making a game within a day I'm happy with the result. </p> <p>I'd like to do more of these self-imposed 1-day prototypes to break the habit of fiddling with game ideas for far too long.</p> https://www.lexaloffle.com/bbs/?tid=36582 https://www.lexaloffle.com/bbs/?tid=36582 Thu, 23 Jan 2020 01:30:56 UTC Autotile Demo <p> <table><tr><td> <a href="/bbs/?pid=71349#p"> <img src="/bbs/thumbs/pico8_autotiledemo-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=71349#p"> Autotile Demo</a><br><br> by <a href="/bbs/?uid=34825"> kevinthompson</a> <br><br><br> <a href="/bbs/?pid=71349#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Controls</h2> <ul> <li>Left Click: Draw Tiles</li> <li>Right Click: Erase Tiles</li> <li>Z/X: Switch Tileset Theme</li> </ul> <h2>Description</h2> <p>Lately I've been playing around with procedurally generated platformer levels and as part of that I started exploring an autotiling function. The goal was to be able to generate a level layout using one algorithm, then apply autotiling to theme the level.</p> <h2>How It Works</h2> <p>The autotile function has a signature similar to map. It accepts six arguments, an x and y coordinate of the map, the width and height in map tiles to apply the autotiling to, the sprite to use as a rule tile for tiling, and a table containing bitmask data for each rule.</p> <p>The bitmask rules look like this, {0b00000000, 2}, where the first value is the mask and the second value is the sprite id to replace the rule tile with. The second argument can also be a table of tiles to randomly choose from if you want to have a variety of tiles for a give position.</p> <h3>Bitmasks</h3> <p>Each bit of the bitmask corresponds to a possible surrounding tile starting from the top left, down to the bottom right. Here's an example of how a bitmask translates to the relative tiles:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>-- Given A Bitmask 0b01011010 -- Where X is the tile being evaluated ------- |0|1|0| ------- |1|X|1| ------- |0|1|0| ------- -- The current tile has tiles above, below, and on either side. </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>Project Status</h2> <p>I'm not sure yet what else I want to do with this but I figured I'd post it and see if anyone had any questions or ideas. The entire cartridge is more verbose than it needs to be to help with understanding, but I'd be happy to hear how you all would change it.</p> <p>Thanks for taking a look!</p> https://www.lexaloffle.com/bbs/?tid=36346 https://www.lexaloffle.com/bbs/?tid=36346 Mon, 23 Dec 2019 18:40:19 UTC