andylatham82 [Lexaloffle Blog Feed] Full screen mode not working properly on Linux (Ubuntu) <p>Pico-8 on Linux is having problems in full screen mode. When launching full screen, 3 out of 4 times the screen flashes and the programs sits in the background, but can't be accessed and has to be killed. The same thing happens when switching from windowed to full screen mode. Everything works fine in windowed mode.</p> <p>It seems like this was a problem <a href="">back in 2016</a>, but was reported fixed. However I am experiencing this in 2021 on Ubuntu with the Xfce desktop environment.</p> Tue, 26 Jan 2021 11:08:52 UTC Black Death <p> <table><tr><td> <a href="/bbs/?pid=68925#p"> <img src="/bbs/thumbs/pico8_blackdeath-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=68925#p"> blackdeath</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=68925#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hello!</p> <p>I'd like to present a little game I made called Black Death. It's an action game in which you play as The Plague. You have infected a rat and your goal is to kill all of the villagers with your putrid bite.</p> <p>However your rat only has limited health. You must maintain your ability to infect the villagers by transferring yourself to other rats.</p> <p>Beware the attacks of the villagers. They will try to kill you. Use the rat holes if you must.</p> <p>Watch out for The Doctor. Though he will not harm you, his goal is to heal infected villagers. Ensure that he cannot reach them before the infection has had time to kill them.</p> <p>Control your rat with the arrow keys. Bite by touching a villager or rat with your nose. If a villager touches you on any other side then you will be hit.</p> <p>I hope you enjoy the game!</p> Wed, 16 Oct 2019 07:42:27 UTC bouncingballs <p> <table><tr><td> <a href="/bbs/?pid=68022#p"> <img src="/bbs/thumbs/pico8_bouncingballs-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=68022#p"> bouncingballs</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=68022#p"> [Click to Play]</a> </td></tr></table> <br /> Not really anything special, just an old physics experiment.</p> Mon, 23 Sep 2019 06:49:41 UTC Bezier Ball <p> <table><tr><td> <a href="/bbs/?pid=62950#p"> <img src="/bbs/thumbs/pico8_bezierball-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=62950#p"> bezierball</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=62950#p"> [Click to Play]</a> </td></tr></table> <br /> Edit: Above is a new version with better collision. Many thanks to <a href=""> @bridgs</a></p> <p>Original below:</p> <p> <table><tr><td> <a href="/bbs/?pid=62950#p"> <img src="/bbs/thumbs/pico8_bezierball-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=62950#p"> bezierball</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=62950#p"> [Click to Play]</a> </td></tr></table> <br /> Hello! I recently created a [bezier curve.] <a href=""></a></p> <p>I decided to see if I could make a ball interact with it, and it turns out I can! It's not perfect - it's possible for the ball to move through the curve in certain circumstances. I think my collision detection needs to be more robust.</p> Fri, 22 Mar 2019 09:12:09 UTC Bezier Curve <p> <table><tr><td> <a href="/bbs/?pid=62928#p"> <img src="/bbs/thumbs/pico8_bezier-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=62928#p"> Bezier</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=62928#p"> [Click to Play]</a> </td></tr></table> <br /> Hello! I knocked this up in a few hours and I hope it's useful to someone. It draws a bezier curve based on the positions of four points: a start and end point, and two bezier handles.</p> <p>The user can move any of the four points around by using Z to cycle between them and the arrow keys to move.</p> <p>I have wrapped up the bezier into a single object so hopefully it should be easy to re-purpose.</p> Thu, 21 Mar 2019 08:32:42 UTC Map Creation help <p>Hi,</p> <p>I'd like to create a top-down adventure game with a map that will exceed the dimensions of the map editor, so I'd need to create and store the map by other methods. The problem is that I'm a bit clueless about how to best go about this and wondered if anyone could send me down the right path.</p> <p>I'm guessing that I'd basically have to store the map in an array (well a table). Does anyone have any experience with doing this kind of thing?</p> <p>Thanks!</p> Wed, 03 Aug 2016 06:32:26 UTC Platformer Test <p> <table><tr><td> <a href="/bbs/?pid=26325#p"> <img src="/bbs/thumbs/pico26324.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=26325#p"> Platformer Test</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=26325#p"> [Click to Play]</a> </td></tr></table> <br /> Hi!</p> <p>I'm trying to make a reusable platform game engine in the style of Super Mario Bros or Sonic the Hedgehog etc. I've just finished putting something together and I'd love to get any opinions on how it feels or ways to make it better. The graphics are extremely basic because I'm just focusing on the mechanics for now.</p> <p>My biggest problem with it is in making jumping through platforms feel nice. Currently if the bottom of the player is intersecting a floor tile, the player is moved above it to stand on it. However this results in the player being put up on a platform when it doesn't feel like he should be. I'd like to make it so that a platform is only detected when the player's feet just slightly intersect it by up to half a tile.</p> <p>Controls:<br /> Arrow keys to move<br /> &quot;Z&quot; key to jump</p> <p>Features:<br /> -Horizontal and vertical acceleration<br /> -Friction<br /> -Gravity<br /> -Capped speeds<br /> -Floor detection<br /> -Variable jump height based on length of time button is held<br /> -Variable jump height based on horizontal speed of player at time of jump</p> <p>It seems to run slower in a browser than in Pico-8. My code isn't currently very efficient, perhaps that's the reason.</p> Tue, 02 Aug 2016 11:01:56 UTC Ideal Mario Bros Jumping method <p>Hi,</p> <p>I'm trying to put together the physics of a classic platform game in Pico-8. I want to achieve something that behaves like Super Mario Bros.</p> <p>I have coded a jump system where when the player presses jump, the character rises by a set number of pixels each frame, with that number decreasing every frame, so the character slows down as he gets to the top of his jump. This works well, but I run into problems when I try to implement a variable jump. Like Mario, I'd like my character's jump height to depend on how long the jump button is held down. I did achieve this simply by cancelling the vertical climb when the button is released, but this means that the jump doesn't slow to a halt unless the button is held long enough to see the full jump.</p> <p>I suspect I'm going about the whole thing in the wrong way and wondered if someone can tell me how the guys at Nintendo did it with Mario. I'm sure there are lots of ways of achieving something similar, but I'd like to know how it was achieved on the NES if possible as I'm as interested in the technique as I am in the end result.</p> <p>Some Googling suggests that the best method to use is by setting up forces acting on the character. Is this how it would have been accomplished back in the 1980s?</p> <p>Thanks for any help! :)</p> <p>Andy</p> Mon, 01 Aug 2016 08:44:18 UTC Sprite sheet &amp; map sharing memory <p>Hi, I've been looking through the Pico-8 manual, and found this:</p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ffeedd><span style="color: #101010;">The bottom half of the spritesheet and bottom half of the map occupy the same memory.<br></span></td></tr></table></p> <p>What uses can this have? I can't really think of anything personally but there must be some.</p> Wed, 20 Jul 2016 09:03:55 UTC 3-layer Parallax Code for Side Scrolling Games <p> <table><tr><td> <a href="/bbs/?pid=25598#p"> <img src="/bbs/thumbs/pico25597.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=25598#p"> 3-layer Parallax Code for Side Scrolling Games 1.0</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=25598#p"> [Click to Play]</a> </td></tr></table> <br /> I made this bit of code for creating a parallax effect for side-scrolling games. It uses three layers of infinitely repeating maps. I've set it up so that all the code is in a self-contained section that can be copied and pasted below your own code, with just an initialise, update and draw function needing to be called from the respective functions in your game.</p> <p>More complete instructions can be found in the header of the code.</p> <p>I hope somebody finds it useful!</p> <p>:)</p> Wed, 20 Jul 2016 04:33:31 UTC Tile Streaming Advice Needed <p> <table><tr><td> <a href="/bbs/?pid=25547#p"> <img src="/bbs/thumbs/pico25546.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=25547#p"> Tile Streaming</a><br><br> by <a href="/bbs/?uid=13824"> andylatham82</a> <br><br><br> <a href="/bbs/?pid=25547#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hi,</p> <p>I'm a bit of a beginner where programming is concerned, but I'm trying to work out how best to create an infinite scrolling background for a side-scrolling shooter game.</p> <p>I figured that the way to achieve this would be to make a screen full of sprites and move them to the left, deleting them once they are off the screen and replacing them with new sprites on the right. I have managed to achieve this, but I don't think the performance is that great. It doesn't feel very smooth.</p> <p>Am I doing it the right way? Is there a better way?</p> <p>Thanks for any help you guys can give!</p> <div> <div class=scrollable_with_touch style="width:100%; 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> --tile scrolling function _init() tile_h={} --horizontal tile strip --spawn 16 tiles in strip for i=0,16 do spawn_tile(i*8,0) end end function _update() foreach(tile_h,update_tile) end function _draw() cls() for i=0,16 do foreach(tile_h,draw_tile) end end function update_tile(t) t.x-=1 --move tile to left --if tile off edge of screen if t.x&lt;-8 then del(tile_h,t) --delete tile --add new tile to right spawn_tile(16*8,0) end end function spawn_tile(x,y) local t={} t.x=x t.y=y add(tile_h,t) end function draw_tile(t) --draw 16 tiles vertically for i=0,16 do spr(1,t.x,t.y+i*8) end end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> Tue, 19 Jul 2016 10:10:54 UTC