Left Lane [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=68763 Help with coding enemies in a 2D Platformer? <p> <table><tr><td> <a href="/bbs/?pid=139735#p"> <img src="/bbs/thumbs/pico8_gibuyeyak-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=139735#p"> gibuyeyak</a><br><br> by <a href="/bbs/?uid=68763"> Left Lane</a> <br><br><br> <a href="/bbs/?pid=139735#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hello! I was working on a 2D platformer, and I was wondering about how to make enemies. The cartridge that is attached above (I hope it is attached) shows a small demo of the game thus far.</p> <p>(NOTE: this is based off the Nerdy Teachers 2D platformer tutorial) </p> <p>As you can see, there is collision, semisolid platforms and even some spikes that can kill the player however, I am focused on the &quot;frog&quot; on the middle left platform. So far I have gotten it to walk forward and change directions when hitting sprite 2 (left turns) and sprite flag 3 (right turns). But I cannot for the life of me get the frog sprite to flip when turning. More importantly I cannot get the frog to kill the player like the spikes do. If you have any ideas or advice about the enemies or just in general please crack open my code and take a look. </p> <p>(NOTE: this is built off an older project of mine that I never finished, that is why there is code for &quot;Glide&quot; and &quot;Slamming&quot; and &quot;Glidingdash&quot; that seemingly does nothing and also why the thumbnail reads &quot;Flemingo Quest&quot;)</p> <p>P.S I am looking for a name for the little bird guy you play as, any ideas?</p> <p>EDIT: Forgot to mention that the number follows the player it your current speed, used for debugging n' such</p> <p>EDIT 2: After implementing the tuning code I am struggling with the frog killing the player so far I got this but<br /> the death part does not seem to function properly.</p> <pre><code> function frog_update() if collide_map(frog,&quot;up&quot;,2) then frog.turning=true elseif collide_map(frog,&quot;up&quot;,3) then frog.turning=false elseif frog.x == player.x and frog.y == player.y then _draw=death_draw _update=death_update _init=death_init end end</code></pre> https://www.lexaloffle.com/bbs/?tid=55648 https://www.lexaloffle.com/bbs/?tid=55648 Sun, 07 Jan 2024 10:19:05 UTC Pet Game in PICO-8? <p>So I recently had an idea for a pet game on PICO-8 akin to Tamagotchi, or nintendogs. where you take care of pets, and you would use a cursor and buttons. My ideas was to have 2 main areas, one area for just watching and feeding your pets, another for mini games and for training your pet. My idea was once you feed a certain pet enough it would lay an egg and give you more pets My idea for the mini games would be something simple like button mashing or something easy to do. I'll also have to figure out how to make the pets move around on their own (I already have the pet sprites). I'm still pretty new to PICO-8, and have only made short top-down adventure games, so sorry for my lack of knowledge. Comment how you would go about this idea. Thanks!</p> <p>P.S if I use your code or ideas I'll give you full credit where it's due.</p> https://www.lexaloffle.com/bbs/?tid=50480 https://www.lexaloffle.com/bbs/?tid=50480 Mon, 05 Dec 2022 03:24:30 UTC