Nenga [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=62648 Space Rogue! (Update 1.3) <p><strong> <strong><strong>____</strong></strong> SPACE ROGUE! ____</strong></p> <hr /> <p>Embark on a mission to destroy the enemy aliens!!!!!</p> <p>Upgrade your ships weapons as you power up in this Space Invader/Roguelite mash-up!</p> <h2>How many enemies can you defeat before re-upgrading your ship?</h2> <p>UPDATE 1.3:</p> <p>The new update for Space Rogue! adds more core mechanics to make the game be the roguelite that it is! This update adds replay value and provides a foundation for future upgrades &amp; enemies!!!</p> <p>-- NEW post run shop upgrades!!! Continue your run after your death with an upgraded ship!</p> <ul> <li>Triple shot!: Fire three bullets at once!</li> <li>Upgrade your maximum shield capacity!</li> <li>Unlock a power-up that will re-fill your shields to max level. Handy for long runs!</li> </ul> <p>-- Balanced enemy spawns and added a NEW enemy type!!! (this one shoots back!)<br /> -- New sprite for the ships bullets. Adds little more imagination than a yellow brick :)<br /> -- New soundtrack!!! (This one has a bass line! :O)</p> <p>Also changed up the coding for the way the game handles enemy collision, weapon collision, upgrade logic etc... This will make adding more upgrades &amp; enemies in the future less of a task!</p> <p>Have fun!</p> <p> <table><tr><td> <a href="/bbs/?pid=146180#p"> <img src="/bbs/thumbs/pico8_spacerogue_2324-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=146180#p"> Space Rogue! V1.3</a><br><br> by <a href="/bbs/?uid=62648"> Nenga</a> <br><br><br> <a href="/bbs/?pid=146180#p"> [Click to Play]</a> </td></tr></table> </p> <p>(Previous updates)</p> <p>UPDATE 1.2:</p> <p>-- increased bullet starting speed &amp; slightly decreased amount of cooldown per upgrade<br /> -- slightly decreased starting bomb cooldown<br /> -- decreased XP gems movement</p> <p>Small little tweaks to the game play to make it more engaging &amp; a bit more fast paced. Hope you guys enjoy!!!!</p> https://www.lexaloffle.com/bbs/?tid=141583 https://www.lexaloffle.com/bbs/?tid=141583 Tue, 09 Apr 2024 17:07:51 UTC Making upwards &amp; downwards animations <p>So I've created this code to make walking animations:</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>if plr.walking then if time()-plr.anim&gt;.1 then plr.anim=time() plr.sp+=1 if plr.sp&gt;5 then plr.sp=2</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>also added this for idle sprite:</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>if not plr.walking then plr.sp=1</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>However I can't figure out a way to change the sprite to the upward/downward movement sprites (spr 6-9, sprite 10-13) without having the code overwirte the plr.sp eachframe</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>if plr.upmove then plr.sp=6 #Do anim function</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>as far as I've gotten is making the sprite change to the correct movement sprite and then have it iterate back to the idle animation or animate to the very next frame and revert back to the first forward sprite</p> https://www.lexaloffle.com/bbs/?tid=46480 https://www.lexaloffle.com/bbs/?tid=46480 Sun, 06 Feb 2022 19:10:51 UTC Wall/Tile Collision not properly working <p>Hello!<br /> I've started learning how to do some programming with Pico-8 and am following a youtube tutorial (<a href="https://www.youtube.com/watch?v=T9z6RPvyypE">https://www.youtube.com/watch?v=T9z6RPvyypE</a>)</p> <p>I've been typing the same code more or less and have encountered a problem with wall collision.</p> <p>It seems that my player character will move through certain tiles I've flagged as walls and there are also invisible walls on tiles that are not flagged at all. </p> <p>code for collision:</p> <p>function is_tile(tile_type,x,y)<br /> tile=mget(x,y)<br /> has_flag=fget(tile,tile_type)<br /> return has_flag<br /> end</p> <p>function can_move(x,y)<br /> return not is_tile(wall,x,y)<br /> end</p> <p>and the code for player movement/wall detection:</p> <p>function move_player()<br /> newx=plr.x<br /> newy=plr.y</p> <p> if (btnp(⬅️)) newx-=1<br /> if (btnp(➡️)) newx+=1<br /> if (btnp(⬆️)) newy-=1<br /> if (btnp(⬇️)) newy+=1</p> <p> if (can_move(newx,newy)) then<br /> plr.x=mid(0,newx,127)<br /> plr.y=mid(0,newy,63)<br /> else<br /> sfx(0)<br /> end<br /> end</p> <p>not sure this happens, the youtubers character is able to move and hit the proper tiles and I haven't changed much in my code compared to his. </p> https://www.lexaloffle.com/bbs/?tid=46370 https://www.lexaloffle.com/bbs/?tid=46370 Sat, 29 Jan 2022 21:03:24 UTC