petpolitics [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=43375 Scale Sprite based on Sprite Number <p>Hi All,</p> <p>I wrote a small function to scale 8x8 sprites using a sprite number instead of using sspr() itself and having to pick out the x and y position each time.</p> <p>I'm using it for the Toy Box Jam 2 where you have a spritesheet already made and you want to quickly resize things.</p> <p>Updated function with feedback from <a href="https://www.lexaloffle.com/bbs/?uid=25532"> @freds72</a> and <a href="https://www.lexaloffle.com/bbs/?uid=10198"> @MBoffin</a>:</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>function xspr(sprt,x,y,w,h) --sprt: sprite number --x: x position --y: y position --w: new sprite width --h: new sprite height local sx=(sprt%16)*8 local sy=sprt\16*8 sspr(sx,sy,8,8,x,y,w,h) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Original function:<div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></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>function xspr(sprt,x,y,w,h) --sprt: sprite number --x: x position --y: y position --w: new sprite width --h: new sprite height local sx=0 local sy=0 for i=0,255,16 do if(sprt&gt;=i) then sy=flr(i/2) sx=(sprt-i)*8 end end sspr(sx,sy,8,8,x,y,w,h) end</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p></div></div></div></p> <p>Probably already exists someplace but thought I'd share my own solution to the problem.</p> <p>Cheers</p> https://www.lexaloffle.com/bbs/?tid=41083 https://www.lexaloffle.com/bbs/?tid=41083 Wed, 06 Jan 2021 00:29:20 UTC Rab Bab <p>To motivate me to continue working on the project I'm uploading a WIP version of a platformer I've been making. </p> <p>Feel free to offer feedback but I know it's rough around the edges!</p> <p> <table><tr><td> <a href="/bbs/?pid=85494#p"> <img src="/bbs/thumbs/pico8_rab_bab-7.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=85494#p"> rab_bab</a><br><br> by <a href="/bbs/?uid=43375"> petpolitics</a> <br><br><br> <a href="/bbs/?pid=85494#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Latest changes:</h1> <ul> <li>Improved jump physics</li> <li>Particle collisions on death</li> </ul> <h1>Check out my other games!</h1> <p><a href="https://www.lexaloffle.com/bbs/?tid=39157">Siege of Darkwood</a><br /> <a href="https://www.lexaloffle.com/bbs/?tid=38135">Striking Thunder</a></p> https://www.lexaloffle.com/bbs/?tid=40832 https://www.lexaloffle.com/bbs/?tid=40832 Wed, 16 Dec 2020 22:18:38 UTC Siege of Darkwood <p> <table><tr><td> <a href="/bbs/?pid=80548#p"> <img src="/bbs/thumbs/pico8_siege_of_darkwood-9.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=80548#p"> siege_of_darkwood</a><br><br> by <a href="/bbs/?uid=43375"> petpolitics</a> <br><br><br> <a href="/bbs/?pid=80548#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is my remake of a long forgotten 68k Mac shareware game of the same name, originally created by Robert Chancellor. I've updated the rules from AD&amp;D to D&amp;D5e and added some extra items.</p> <h1>Aim</h1> <p>You play as Derek Silverhand and are tasked with protecting Darkwood from Torque's approaching hordes.<br /> Survive 10 waves of enemies to win the game!<br /> Darkwood will fall if Derek falls in combat or the advancing hordes destroy the castle!</p> <h1>How to Play</h1> <h2>Prepare yourself</h2> <p>Buy equipment like swords and armour from the 4 item shops.</p> <img style="" border=0 src="/media/43375/Items.png" alt="" /> <h2>Enter the battlefield</h2> <p>Enter the battlefield and engage with your target</p> <img style="" border=0 src="/media/43375/battle.png" alt="" /> <h2>Fight valiantly</h2> <p>The waves of enemies will advance position after the battle is over</p> <img style="" border=0 src="/media/43375/attack.png" alt="" /> <h2>Healing</h2> <p>Don't forget to Heal at the Temple if needed</p> <img style="" border=0 src="/media/43375/Heal.png" alt="" /> <h2>Level Up</h2> <p>Level up and check your stats on the Stats screen</p> <img style="" border=0 src="/media/43375/level.png" alt="" /> <h1>Controls</h1> <p>Z/C - select<br /> X - cancel<br /> Arrow Buttons - control menus or move around the battlefield</p> <p>Up - access Pico-8 menu from the main screen</p> <h1>Stat Bonuses</h1> <p>Str - Extra Damage<br /> Dex - Harder to Hit<br /> Int - Extra Magic Damage<br /> Wis - Extra XP<br /> Cha - Reduced Shop Prices<br /> Con - Extra HP on Level Up</p> <h1>Check out my other games!</h1> <p><a href="https://www.lexaloffle.com/bbs/?tid=40832">Rab Bab</a><br /> <a href="https://www.lexaloffle.com/bbs/?tid=38135">Striking Thunder</a></p> https://www.lexaloffle.com/bbs/?tid=39157 https://www.lexaloffle.com/bbs/?tid=39157 Sun, 09 Aug 2020 13:14:47 UTC striking_thunder <p> <table><tr><td> <a href="/bbs/?pid=77210#p"> <img src="/bbs/thumbs/pico8_striking_thunder-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=77210#p"> striking_thunder</a><br><br> by <a href="/bbs/?uid=43375"> petpolitics</a> <br><br><br> <a href="/bbs/?pid=77210#p"> [Click to Play]</a> </td></tr></table> </p> <p>Arrows move</p> <p>Z/C shoot</p> <p>X switches ship mode. </p> <p>The Robot mode's weapon reflects enemy shots. If a reflected shot takes out an enemy ship, you gain a charge.</p> <p>Decided to have a crack at making a shmup after rolling the name Striking Thunder in the #RNDGAME2020 jam. Kudos to Dan for creating the title screen.</p> https://www.lexaloffle.com/bbs/?tid=38135 https://www.lexaloffle.com/bbs/?tid=38135 Tue, 26 May 2020 02:38:03 UTC