Paul Knight [Lexaloffle Blog Feed] Crabdash <p> <table><tr><td> <a href="/bbs/?pid=59424#p"> <img src="/bbs/thumbs/pico8_dijikehutu-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=59424#p"> Crabdash</a><br><br> by <a href="/bbs/?uid=14711"> Paul Knight</a> <br><br><br> <a href="/bbs/?pid=59424#p"> [Click to Play]</a> </td></tr></table> </p> <p>Very basic!</p> <p>Avoid the crabs and collect the gold to get the highest score.</p> <p>Simple :-)</p> <p>Thanks for looking</p> Wed, 28 Nov 2018 20:02:49 UTC Project Scheduler/Spend profile calculator <p> <table><tr><td> <a href="/bbs/?pid=59273#p"> <img src="/bbs/thumbs/pico59272.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=59273#p"> Project Scheduler/Spend profile calculator 1.0</a><br><br> by <a href="/bbs/?uid=14711"> Paul Knight</a> <br><br><br> <a href="/bbs/?pid=59273#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is very much a work in progress, and is really to try out a few ideas.</p> <p>Basically, it allows you to see the impact on total spends of a project portfolio (fixed to 3 at the moment) at a particular time, if individual projects are moved within the overall scheduling of the projects.</p> <p>To move projects along the timeline, use the up/down cursors to move the orange pointer to the project you want to move, then the left/right arrow keys to move it back and forwards on the timeline.</p> <p>Once the projects have all been scheduled, move the orange pointer up to the &quot;Timeline Zone&quot; and the left/right arrow keys will move the red &quot;timeline now&quot; line along the project schedule. The total cost of the projects at that point will be show at the bottom of the screen, together with the total project cost when all projects have been completed.</p> <p>A spend profile (the rate at which money is spent) is overlaid on the project timelines, and moves in real time as the individual projects are moved.</p> <p>For now, individual projects have a fixed duration (hard coded), and it is assumed that the total cost of each project is spend linearly. I want to add flexible cost rates so for example, a project spend rate can be set to relatively low at the beginning and end of a project, with a higher spend rate in the middle of a project, when the work is really in full swing.</p> <p>Lots more to do including autoscaling of the project spend profile, individual project spend profiles (rather than assume linear spend), on-the-fly changes to individual project parameters e.g. total value, duration etc...</p> <p>Anyway, this cart will likely have very limited appeal to most, but I thought I'd post it anyway!!</p> <p>Thanks for looking,<br /> Paul.</p> Wed, 21 Nov 2018 15:03:30 UTC Radiation Sources <p> <table><tr><td> <a href="/bbs/?pid=50557#p"> <img src="/bbs/thumbs/pico50556.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=50557#p"> Radiation Sources 1.0</a><br><br> by <a href="/bbs/?uid=14711"> Paul Knight</a> <br><br><br> <a href="/bbs/?pid=50557#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is my first posted cartridge.</p> <p>Its just a concept at the moment, to see if a fun game could even be made from it.</p> <p>Basically, you need to collect the sample vials (much better collision detection needed) before you are irradiated by too much radiation.</p> <p>As you move around, you build up a radiation map to help you avoid radiation &quot;hot spots&quot;. </p> <p>There are 3 radiation sources, and you can also mark them up by clicking on them using the mouse when you think you know where they are.</p> <p>Pressing Z actually shows where they are (this would not be enabled if I made a game from it) and X hide the sources again.</p> <p>Anyway, all comments much appreciated :-)</p> <p>Thanks for looking!</p> Sun, 18 Mar 2018 05:49:57 UTC Placed sprites <p> <table><tr><td> <a href="/bbs/?pid=42683#p"> <img src="/bbs/thumbs/pico42682.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=42683#p"> Placed sprites 1.0</a><br><br> by <a href="/bbs/?uid=14711"> Paul Knight</a> <br><br><br> <a href="/bbs/?pid=42683#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hi,</p> <p>I was hoping someone might be able to help me with a 'newbie' question please.</p> <p>I want to be able to move a mouse pointer around, and then when the mouse is clicked, record the x and y position and place a sprite in that position. The next time the mouse button is pressed, a second sprite is displayed at the new mouse position, and then finally, a third upon another mouse button click. Further mouse button clicks will then re-position the first sprite and so on......</p> <p>This should leave 3 sprites on the screen, and record their positions.</p> <p>The current code does this, and displays the x/y position of each sprite. The problem I have is that a single &quot;mouse click&quot; event is hard to make and the code loops round very quickly making discrete sprite positioning difficult.</p> <p>Can anyone please suggest a way to remedy this?</p> <p>Any help would be much appreciated.</p> <p>Kind regards,<br /> Paul :-)</p> Fri, 21 Jul 2017 15:57:56 UTC Strange PGET results! <p>Hi all.</p> <p>A newbie question!</p> <p>I am using the PGET command to read the value of a pixel as you move a point around the screen.</p> <p>The code I have written seems to work fine in the X axis, but the y-axis is offset for some reason.</p> <p>If you move the point over the yellow square from left to right, the PGET command successfully reads the pixel colour value.</p> <p>If you move the point over the yellow square from top to bottom, the PGET command is offset by approx 6 pixels.</p> <p>Strange.</p> <img style="" border=0 src="" width=160 height=205 alt="" /> <p>Am I missing something?</p> <p>Any advice would be very much appreciated.</p> <p>Many thanks</p> <p>Paul :-)</p> <p>PS:</p> <p>Code pasted below.</p> <p>x={}<br /> y={}<br /> x=50<br /> y=50<br /> cls()</p> <p>function _update()<br /> if btn(1) then x=x+1 end<br /> if btn(0) then x=x-1 end<br /> if btn(3) then y=y+1 end<br /> if btn(2) then y=y-1 end<br /> a=pget(x,y)<br /> end</p> <p>function _draw()<br /> rectfill (0,0,124,124,0)<br /> rectfill (50,50,70,70,10)<br /> pset(x,y,7)<br /> print(a)<br /> end </p> Sat, 20 May 2017 10:46:41 UTC Frustrated by coding problem! <p>Hi,</p> <p>I've been dabbling in Pico-8 since yesterday and am loving it so far! However, I have come up against a really frustrating problem and have spent hours trying to figure out why my code doesnt work. I keep getting a<br /> &quot;then&quot; expected near &quot;=&quot; error up, for the line highlighted in the code below. Any ideas of why this isn't working would be very much appreciated!!!</p> <p>All the best,<br /> Paul.</p> <p>player = {}<br /> player.x = 5<br /> player.y = 5<br /> player.sprite = 0<br /> player.speed = 2<br /> crab = {}<br /> crab.x = 50<br /> crab.y = 50<br /> crab.sprite = 9<br /> crab.ran = 1</p> <p>function mover()<br /> player.moving = true<br /> player.sprite += 1<br /> if player.sprite &gt; 4 then<br /> player.sprite = 0<br /> end<br /> end</p> <p>function movel()<br /> player.moving = true<br /> player.sprite -= 1<br /> if player.sprite &lt;4 then<br /> player.sprite = 8<br /> end<br /> end</p> <p>function crabmov()<br /> crab.ran = flr(rnd(2))<br /> if crab.ran = 0 then<strong></strong> &lt;------------------<br /> crab.x -= 1<br /> end<br /> if crab.ran = 1 then<br /> crab.x += 1<br /> end<br /> end</p> <p>function _update()<br /> player.moving = false</p> <p>if btn(0) then<br /> player.x -= player.speed<br /> movel()<br /> end<br /> if btn(1) then<br /> player.x += player.speed<br /> mover()<br /> end<br /> if btn(2) then<br /> player.y -= player.speed<br /> movel()<br /> end<br /> if btn(3) then<br /> player.y += player.speed<br /> mover()<br /> end<br /> if not player.moving then<br /> player.sprite = 0<br /> end</p> <p>-- decide if the crab moves left or right<br /> crabmov()</p> <p>end</p> <p>function _draw()<br /> --cls()<br /> rectfill (0,0,128,128,13)<br /> spr(player.sprite, player.x, player.y)<br /> spr(crab.sprite, crab.x, crab.y)</p> <p>end</p> Fri, 29 Jul 2016 09:05:13 UTC