eriban [Lexaloffle Blog Feed] Martian Dice <p>Do you want to play PICO-8 games online with others? Yes? Then Martian Dice might be the game for you.</p> <p>It is an online multi-player dice game. It lets you:</p> <ul> <li>Play with your friends</li> <li>Play with strangers or</li> <li>Play against a bot</li> </ul> <img style="" border=0 src="/media/25524/MartianDice-Collage-0_9_2-528x528.png" alt="" /> <p>This is a reproduction of the physical dice game <a href="">Martian Dice</a>.</p> <p><strong>Unfortunately, this game cannot be played from the BBS</strong>. For different clients to talk to each other the game needs to connect to a cloud-hosted service, which requires additional Javascript code. You can play the game from my <a href="">homepage</a> though. The in-game QR code also takes you there.</p> <p> <table><tr><td> <a href="/bbs/?pid=91199#p"> <img src="/bbs/thumbs/pico8_martiandice-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=91199#p"> martiandice</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=91199#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Still planned</h2> <p>Nothing really. If you have any last-minute requests or find any bugs, please let me know.</p> <h2>History</h2> <p>This PICO-8 game really evolved by accident. After playing Martian Dice with friends I wondered what the optimal play was and how much points you can expect to score each turn. So I built a bot in Python that maximises the expected score each turn. Next I figured it would be a good vehicle for me to try out WebSockets. As I also wanted some experience with React, I first built a React client. Then I started dabbling with sprites for the die faces and realized it's a good fit for PICO-8. And here we are...</p> <p>Version 0.9.3 - 16 May 2021</p> <ul> <li>Allow player to resign game</li> <li>Let player win immediately after all other players have left the game</li> <li>Let other client take on host role when host does not trigger bot moves</li> <li>Suppress play reminders when playing against a bot</li> <li>Recover from network problems by handling WebSocket disconnects</li> <li>Fix: Also show winning bot avatar when observer joined</li> <li>Fix: Stop die roll sounds when exiting room</li> <li>Fix: Room label was not always showing correctly</li> <li>Fix: Occasional wrong room join message was shown</li> <li>Fix: Rejoin room with ghost client fails</li> <li>Fix: Ranking fails when number of clients is one</li> </ul> <p>Version 0.9.2 - 9 May 2021</p> <ul> <li>Improved color palette (by using colours from the secret palette)</li> <li>Various minor UI improvements</li> <li>Fancier celebration animation</li> </ul> <p>Version 0.9.1 - 2 May 2021</p> <ul> <li>Handle unresponsive/slow players. Options: Wait/Skip/Remove</li> <li>Track results of players in room and show ranking</li> <li>Fancier text editing and chat selection</li> <li>Add dialogs</li> <li>Improve stability</li> </ul> <img style="" border=0 src="/media/25524/MartianDice-SlowPlayer-256x256.png" alt="" /> <p>Version 0.9 - 27 Apr 2021</p> <ul> <li>Initial release</li> </ul> <h2>Implementation details</h2> <p>The backend is an AWS-hosted lambda service in Python. Clients connect to this via WebSockets. The client-side communication is managed by Javascript code. This code interfaces with PICO-8 via GPIO.</p> <p>For those interested, all source code is available on <a href="">github</a>. This includes:</p> <ul> <li>The PICO-8 game</li> <li>The client-side Javascript code that interfaces with the backend</li> <li>The server-side Python code, which runs as a lambda service on AWS</li> <li>The AWS CDK script for deploying the service stack</li> <li>The earlier HTML client built using ReactJS</li> </ul> Tue, 27 Apr 2021 19:14:09 UTC PICO-8 screen can exceed bounds of its div in HTML page <p>On Firefox and Safari, the PICO-8 screen can go beyond the bottom boundary of the div that encloses it. When this happens, the bottom part of the PICO-8 screen can be masked/covered by elements below the player. On Chrome it always renders okay.</p> <p>This screenshot shows what goes wrong:</p> <img style="" border=0 src="/media/25524/PlayerOutsideDiv.png" alt="" /> <p>This is the HTML template as exported by PICO-8 (0.2.0e). I only changed it to add some text below the player, and changed the background color of the &quot;p8_frame_0&quot; div to red.</p> <p>The page is accessible <a href="">here</a> for anyone who wants to quickly try and reproduce it. Whether or not the problem occurs depends on the size of the view port. You may have to resize your browser window.</p> Wed, 27 May 2020 17:16:52 UTC Tracker port to Gamebuino <p>I'd just like to share that I implemented a tracker for the <a href="">Gamebuino</a> inspired on PICO-8's tracker. It is a bit more primitive, as the Gamebuino console only supports 10-bit audio. Furthermore to keep CPU load acceptable, some pragmatic choices had to be made in generating the audio samples. For example, all calculations are integer-based and only 8-bit multiplications are used. Custom instruments are also not fully supported. In particular, you cannot layer effects, e.g. apply a Vibrato effect on top of a Slide, or vice versa.</p> <p>However, my tracker supports all instruments and effects available in PICO-8. With that, it is able to reproduce most PICO-8 songs. At least, I successfully managed to render all the songs that I tried to port.</p> <p>In particular, I want to thank the following PICO-8 users for sharing their carts/music under a Creative Commons license:</p> <ul> <li><a href=""> @Domarius</a>: <a href="">Alex Kidd</a></li> <li><a href=""> @Gruber</a>: For his music in <a href="">The Lair</a> and <a href="">Winter Golf</a></li> <li><a href=""> @jobe</a>: <a href="">Rock for Metal</a> and <a href="">Techno Utopian Edict</a></li> <li><a href=""> @Krystman</a>: <a href="">porklike</a> and <a href="">Mai-Chan's Sweet Buns</a></li> <li><a href=""> @lucatron</a>: <a href="">Neon</a></li> <li><a href=""> @pahammond</a>: <a href="">Bubble Bobble</a></li> </ul> <p>Your music has been used to test the tracker and to show off its capabilities in a <a href="">Music Demo</a>:</p> <img style="" border=0 src="/media/25524/MusicDemo.gif" alt="" /> <p>For those interested, the source of my tracker can be found on <a href="">github</a></p> Thu, 21 May 2020 16:07:59 UTC Bumble Bots Re-Pair <p> <table><tr><td> <a href="/bbs/?pid=73101#p"> <img src="/bbs/thumbs/pico8_bumble_bots_re_pair-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=73101#p"> bumble_bots_re_pair</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=73101#p"> [Click to Play]</a> </td></tr></table> </p> <p>Bumble Bots Re-Pair is a difficult action puzzle game. In the game you need to re-unite (re-pair) bots by fixing the paths they traverse. Can you complete all ten levels?</p> <img style="" border=0 src="/media/25524/repair_1.gif" alt="" /> <h3>Credits</h3> <p>The idea for this game was created during this year's Global Game Jam, where the theme was &quot;repair&quot;. It's a spin-off of the <a href="">Robo Re-Pair</a> game that we created during the jam.</p> <p>The music was created by my brother and first used in my original <a href="">Bumble Bots game</a> (<a href="">Low Rez</a>).</p> <h3>Tips</h3> <p>The tiles that you are offered are randomly selected. However, you will always be offered tiles that fit somewhere on the grid. Furthermore, the tiles on offer will be unique. The order in which you place tiles and where you place them therefore matters. Exploit this to increase the odds that you get favourable tiles.</p> <p>It helps to hedge your bets. Have a fallback plan in case you do not get tiles that match your perfect route.</p> <p>At the start you may want to keep many open ends, so you can place &quot;undesired&quot; tiles somewhere. Towards the end you may want to reduce the number of open ends, to increase the probability that you are offered the tiles that you still need to complete your route.</p> <h3>Updates</h3> <p><strong>23 May 2020 - Version 1.0</strong></p> <ul> <li>Added two new levels</li> <li>Added hi-score tracking</li> <li>Fancier title screen</li> <li>Fancier Help screen</li> <li>Penalty points for open ends</li> <li>Enable toggling music on/off</li> <li>More juicy animations</li> </ul> <p><strong>18 Feb 2020</strong></p> <ul> <li>Added two new levels, both with two pairs of bots</li> <li>Score remaining lives at end of game</li> <li>Improved title screen</li> <li>Improved pair animation</li> </ul> <p><strong>16 Feb 2020</strong></p> <ul> <li>Added three new levels</li> <li>On completing a level gain a life</li> <li>Added tiny bots to title screen</li> </ul> Fri, 14 Feb 2020 19:58:38 UTC Sudoku <p> <table><tr><td> <a href="/bbs/?pid=57701#p"> <img src="/bbs/thumbs/pico57841.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=57701#p"> Sudoku 0.2</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=57701#p"> [Click to Play]</a> </td></tr></table> </p> <p>No points for originality here, but it's a fun programming exercise. I plan to port this to my Gamebuino device next.</p> <p>v0.2</p> <ul> <li>Solved celebration</li> <li>&quot;Reset&quot; menu option</li> <li>&quot;New puzzle&quot; menu option</li> <li>Fancier graphics</li> </ul> <p>v 0.1<br /> The basic functionality is all there:</p> <ul> <li>Generation of random puzzles</li> <li>Ability to solve it</li> </ul> <p>Still pending</p> <ul> <li>Final touches</li> </ul> <p>Possibly:</p> <ul> <li>&quot;Hint&quot; menu option</li> <li>Difficulty indication</li> </ul> Mon, 08 Oct 2018 17:25:21 UTC Bumble Bots Low Rez <p> <table><tr><td> <a href="/bbs/?pid=52898#p"> <img src="/bbs/thumbs/pico53076.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=52898#p"> Bumble Bots Low Rez 2.1</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=52898#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Less is more!</strong><br /> Here's a low resolution version of my <a href="">Bumble Bots</a> game. Fewer pixels, but a better game.</p> <p>When <a href="">porting the game to Gamebuino</a> I had to reduce the resolution. Doing so forced me to remove some screen clutter as every pixel counts at 80x64. Also, I had to zoom into the levels. On the one hand, this made the game play slightly harder, as you cannot always see all enemies. On the other hand, it made the game play more immersive. In the original game, more than half of screen was black pixels. I actually liked the game better at the lower resolution, so decided to revamp the original PICO-8 version. This is the result.</p> <p><strong>Features</strong></p> <ul> <li>Sixteen levels, with a lot of variation!</li> <li>Isometric 3D views</li> <li>Wave animations</li> <li>Enemies</li> <li>Pick-ups, boxes, teleports and gaps</li> <li>Tracking of level progress, hi-score and level hi-scores</li> <li>Level selection menu</li> <li>Four musical tracks (by my brother)</li> <li>Supports touch controls (see <a href="">Bumble Bots for touch devices</a>)</li> </ul> <p><strong>Changes in v2.1</strong></p> <ul> <li>Added support for custom touch controls</li> <li>On game completion score remaining lives</li> <li>Simplified title screen</li> <li>Bug fix: Restored last level (v2.0 included a debugging variant)</li> </ul> <p><strong>Changes in v2.0</strong></p> <ul> <li>Changed resolution to 64x64</li> <li>Smoother bot movement</li> <li>More immersive gaming experience: <ul> <li>Zoomed-in-view with camera following player</li> <li>Replaced message boxes with fancier text</li> <li>Added more sound effects</li> </ul></li> <li>New title screen</li> <li>New end screen</li> </ul> Mon, 21 May 2018 09:31:04 UTC Porting Bumble Bots from PICO-8 to Gamebuino <p>Recently I have been busy porting my PICO-8 <a href="">Bumble Bots</a> game to the <a href="">Gamebuino</a> game console. Gamebuino resembles PICO-8 in that it is also a console for making and playing retro-games with the emphasis on making them. Unlike PICO-8, the Gamebuino is a physical console based on an Arduino board. Here is a picture of a Gamebuino featuring my Bumble Bots game. (Btw, I &quot;shopped&quot; the picture to increase the brightness of the screen, but it's not a mock-up. This is a picture of the game actually running).</p> <img style="" border=0 src="" width=800 height=600 alt="" /> <p>Porting my game has been a fun project. So far, I have ported all the game-play elements, and re-created nine of the sixteen levels. The coding is effectively done. The main work pending is porting the last seven levels. I am sharing my experiences here, as I hope that some of you find them interesting.</p> <p>Gamebuino's resource limitations follow from its physical implementation and are mostly more tight than PICO-8's artificial limitations. The screen resolution of the Gamebuino is 80x64. Although it also supports 160x128, this resolution is not recommended. The details would be too small and drawing to the screen would require more CPU. CPU speed is anyhow a limiting factor. Just drawing an empty screen of 80x64 pixels at 25 FPS loads the CPU for 50%. On the PICO-8 I had no problem achieving 30 FPS, but realizing 25 FPS on the Gamebuino (with a more limited resolution) required a few optimizations. Also, unlike PICO-8, RAM-memory is scarce and you cannot really dynamically allocate memory. You are effectively restricted to global variables and the stack. This requires you to be more conscious of memory usage while you develop. Similar to the PICO-8, there are also limits to the size of the program, but Gamebuino games can be a bit larger. My game is near PICO-8's token limit, but will be less than 50% of the maximum size on the Gamebuino.</p> <p>I found it very useful to first have created the game on the PICO-8 and then port it to the Gamebuino. For prototyping the PICO-8 is a much more friendly environment. PICO-8's code-run-debug cycle is faster. Lua is also a friendlier language than C/C++ which you need for the Gamebuino. A silly mistake in the C/C++ code can easily lead to a crash or (undetected) memory corruption. Also PICO-8's built-in sprite, sound and music editors make it easy and quick to create and adapt graphics and sounds. Creating images and sounds on the Gamebuino is more cumbersome. Fortunately, it was quite easy to port PICO-8 images to the Gamebuino. I was also able to port the sound effects I created, although this required a bit more work as Gamebuino's sound effect support is a bit more primitive.</p> <p>In short, I found PICO-8 and Gamebuino to nicely complement each other. PICO-8 is an excellent environment to quickly prototype and evolve a game idea, and to get it out on the web. However, after that, it's great to port it to a physical device that you can hold in your hands and hand-over to friends to let them try it out.</p> <p>See <a href="">my post</a> on the Gamebuino site for more details about the porting process.</p> <p>Cheers,<br /> Erwin</p> Sat, 14 Apr 2018 15:07:28 UTC Bumble Bots <p> <table><tr><td> <a href="/bbs/?pid=46245#p"> <img src="/bbs/thumbs/pico46244.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=46245#p"> Bumble Bots</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=46245#p"> [Click to Play]</a> </td></tr></table> </p> <p>Bumble Bots is a difficult puzzle action game. It features sixteen levels, ranging from pure action to challenging puzzles and anything in between.</p> <p>The game is self-explanatory. You will encounter new elements and learn new tricks as you go along. </p> <p>Be warned, this is a tough game. I expect only few players to reach the end. Are you one of them?</p> <p>Challenges:</p> <ul> <li>Complete all 16 levels</li> <li>Beat the hi-score</li> <li>Beat the virtual hi-score</li> <li>Complete all 16 levels in one go</li> </ul> <p>Did you reach the end? If so, feel free to share a screenshot of the end screen to proof it.</p> <img style="" border=0 src="" width=800 height=800 alt="" /> Mon, 13 Nov 2017 15:03:53 UTC Bumble Bots <p> <table><tr><td> <a href="/bbs/?pid=44246#p"> <img src="/bbs/thumbs/pico45248.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=44246#p"> Bumble Bots v0.6</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=44246#p"> [Click to Play]</a> </td></tr></table> </p> <img style="" border=0 src="" width=384 height=384 alt="" /> <img style="" border=0 src="" width=384 height=384 alt="" /> <img style="" border=0 src="" width=384 height=384 alt="" /> <img style="" border=0 src="" width=384 height=384 alt="" /> <img style="" border=0 src="" width=384 height=384 alt="" /> <p>After wetting my toes in the Pico-8 pool with my <a href="">Tile Swap game</a>, I figured I should try a bigger game. It's still a WIP, but playable already, so I thought I'd share it.</p> <p>The game is called Bumble Bots. The idea of the game is &quot;stolen&quot; from the <a href="">Rolmops</a> game developed by the team that I was part of in this year's Global Game Jam. The Jam's theme was &quot;waves&quot;.</p> <p><strong>v0.1:</strong> The game is still basic. Each level has an identical, tiny map. I am planning to add much larger levels, with other building blocks and enemies. Nevertheless, the game is quite fun to play already. I especially like the emergent dynamics of the game that follow from the waves in combination with the enemy AI. Even though the level looks fully symmetrical, as you start to play, you will notice that one of the four spheres is much harder to pick up than the others. Level two with only two enemies is already tricky. I have not managed to finish the levels with three or more enemies. Are you able to?</p> <img style="" border=0 src="" width=256 height=256 alt="" /> <p><strong>v0.2:</strong></p> <ul> <li>Support large tile height differences: improved rendering and player/enemy move logic accordingly</li> <li>Define levels from maps</li> <li>Created various different tiles including: bridge, pillar and tower</li> <li>Added level 2, &quot;Pillar Maze&quot; (now: &quot;Barsaman&quot;)</li> <li>Added level 3, &quot;Bridge and Channel&quot; (now: &quot;Gutter and Stage&quot;)</li> <li>Made level start, player death, and level end fancier</li> <li>Let pick-ups block enemy movement</li> </ul> <p><strong>v0.3:</strong></p> <ul> <li>Added teleports</li> <li>Added Level 4, &quot;Telerium&quot;</li> <li>Added score and high score</li> <li>Added name for each level</li> <li>Improved title screen and label</li> <li>Added support for large maps, with auto-scroll</li> <li>Bug fix: Fixed possible null-pointer exception when falling of the map</li> <li>Minor improvements to tile rendering</li> </ul> <p><strong>v0.4:</strong></p> <ul> <li>Added Level 5, &quot;The Race&quot;</li> <li>Added movable boxes</li> <li>Added fillable gaps</li> <li>Added Level 6, &quot;Mind the Gap&quot;</li> <li>Added (fancy) level menu so you can start at any level you have reached</li> <li>Storing high score and level reached in cart data</li> </ul> <p><strong>v0.5:</strong></p> <ul> <li>Added three new levels, each revolving around a new game mechanic: <ul> <li>Added Level 7, &quot;Beam me Up&quot;</li> <li>Added Level 8, &quot;Tea Party&quot;</li> <li>Added Level 9, &quot;Besieged&quot;</li> </ul></li> <li>Added fall interactions: a box or enemy is now destroyed if something falls on top of it</li> <li>Improved player control by adding instant retreat</li> <li>Improved &quot;Drop in gap&quot; animation</li> <li>Improved &quot;Caught&quot; interaction. Enemy needs to be at similar height as player</li> <li>Improved Enemy AI to avoid it getting stuck</li> <li>Improved level resume. Allow restart at new levels after upgrade</li> <li>Added hard reset for levels where continuing does not make sense</li> <li>Fixed isoline-based drawing code</li> </ul> <p><strong>v0.6:</strong></p> <ul> <li>Added new box type and associated level-ending condition</li> <li>Added three new levels, with some fancy new tiles: <ul> <li>Added Level &quot;Down the River&quot;</li> <li>Added Level &quot;Boxing Day&quot;</li> <li>Added Level &quot;IC Trouble&quot;</li> </ul></li> <li>Pimped message box</li> <li>Added Auto-Destruct menu item</li> </ul> Sat, 16 Sep 2017 17:25:54 UTC Tile Swap Game <p> <table><tr><td> <a href="/bbs/?pid=43688#p"> <img src="/bbs/thumbs/pico43811.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=43688#p"> Tile Swap Game v0.2</a><br><br> by <a href="/bbs/?uid=25524"> eriban</a> <br><br><br> <a href="/bbs/?pid=43688#p"> [Click to Play]</a> </td></tr></table> </p> <img style="" border=0 src="" width=256 height=256 alt="" /> <p>I'd like to share my first PICO-8 project. It's a puzzle game of my own design. You need to restore the puzzle by swapping pairs of tiles. The difficulty is that not all tiles can be swapped. It's up to you to discover which tiles can be swapped. Figuring this out is only the first step. The real challenge has then only just begun!</p> <p><strong>v0.2</strong> After solving the puzzle (within a reasonable amount of moves) you now get a solve key, which grants you entry into the game's <a href="">Hall of Fame</a>. Capture it. You can reply to this thread with the screen capture. The keys are unique, so don't &quot;re-use&quot; the key of someone else. Furthermore, you really need to solve the puzzle. You cannot cheat by inspecting the source code either.</p> <p><strong>v0.1</strong> This cart was hacked together in a weekend. It's already playable and quite polished at places, but is not yet finished.</p> <p>Still on my TO DO list:</p> <ul> <li>A celebration tune after solving the puzzle. This will be tough, given that my musical skills are quite limited. I may need to call in the help of my brother here.</li> </ul> Sun, 27 Aug 2017 14:15:52 UTC