rupees [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=80228 Beam <p> <table><tr><td> <a href="/bbs/?pid=150377#p"> <img src="/bbs/thumbs/pico8_beam2_91-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=150377#p"> beam2_91</a><br><br> by <a href="/bbs/?uid=80228"> rupees</a> <br><br><br> <a href="/bbs/?pid=150377#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Beam</strong> is a top down puzzle adventure and is meant to be mysterious, relaxing and pretty. If you get stuck read the signs around you! It is inspired by the Zelda series, Myst, The Witness, Tunic, Hyper Light Drifter,etc and is my first attempt at coding/game development. Feedback is very welcome!<br /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam18_2 p8_5.gif" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam18 9_0.gif" alt="" /></p> <h2>Controls</h2> <p>Arrow keys move the player<br /> O (z on the keyboard) various actions<br /> X (x on the keyboard) run if unlocked</p> <h2>New additions in Beam2.0</h2> <p>Graphics updates</p> <ul> <li>Altered some sprites and effects</li> <li>Beams now continue to glow in lightning land</li> <li>Beam colors are similar in day and night</li> <li>Added bird reflections</li> <li>Animated the door openings</li> <li>Added an intro when first launching the overworld</li> </ul> <p>Game updates</p> <ul> <li>Birds now play a larger role in the narrative </li> <li>Added a new area for bird lore</li> <li>Reorganized some events to hopefully make the game more interesting and forgiving</li> <li>Gated off the first task so it can be treated like a tutorial before you advance</li> <li>Added an effect at the end to tie in the birds </li> <li>Updated the water sparkles for more control</li> <li>The map is significantly different</li> <li>added bird idols and functionality</li> <li>added a wave sound</li> </ul> <h2>Ongoing challenges</h2> <p>There is one area that if conditions are right the CPU overloads.<br /> The music and sound effects sometimes clash and cancel each other out.</p> <h2>Credits</h2> <p>Thank_U={<br /> RealShadowCaster,<br /> jasondelaat,<br /> kozm0naut,<br /> SmellyFishstiks,<br /> Ummmm_ok<br /> } --for the help in the forums! </p> <p>Lightning effect taught to me by SAY S&iacute; via this wonderful tutorial:<br /> <a href="https://youtu.be/6EuOc6wu2L4?si=W1k4CSH7YJ293UXa">Custom functions &amp; powers of recursion</a></p> <p>Code, graphics and music by Rupees<br /> Thank you <a href="https://www.lexaloffle.com/bbs/?uid=82211"> @RealShadowCaster</a> for the all the PAL and token saving help!<br /> Music in this game is from my forever music project of the same name:<br /> <a href="https://rupeesmusic.bandcamp.com/track/roundhouse">Rupees Music</a><br /> The overworld music is from the song &quot;Twenty somethings&quot; from The Autumn EP:<br /> <a href="https://rupeesmusic.bandcamp.com/track/twenty-somethings">Twenty Somethings</a></p> https://www.lexaloffle.com/bbs/?tid=142844 https://www.lexaloffle.com/bbs/?tid=142844 Tue, 25 Jun 2024 01:48:37 UTC Variables as Function arguments <p>hello world.<br /> I think I'm missing something in the custom function realm when it comes to using variables as arguments. I'm trying to pass in a variable that defines one of 6 beams to a function so I can use it for all of the beams but it does not seem to be working and I think I'm trying to do something that might not be allowed in Pico-8. For example I have a custom function to light up this beam and it works great:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam5 5_1.gif" alt="" /> <p>..but I need to reuse this to do something similar for 5 more of these beams. I'd like to create a reusable function around the following as I am repeating code:</p> <p>function beam_2()<br /> if mg(35) and p.x&lt;500<br /> then<br /> pal(5,7)<br /> spr(35,384,328) sfx(0)<br /> b2_charge=true<br /> else b2_charge=false pal()<br /> end<br /> if b2_go==true then<br /> pal(5,7)<br /> spr(35,384,328)<br /> pal()<br /> end<br /> end</p> <p>I thought I could get away with using something like the below bm_chg function in place of the beam_2 function but it does not seem to be passing the b2_charge variable when I input it for chg_var.</p> <p>function bm_chg(sp,sx,sy,sc,chg_var,go_var)</p> <p>if mg(sp) and p.x&lt;96 then </p> <p> pal(sc,7)<br /> spr(sp,sx,sy) sfx(0)<br /> chg_var=true </p> <pre><code>else chg_var=false pal()</code></pre> <p>end</p> <p>if go_var==true then<br /> pal(sc,7)<br /> spr(sp,sx,sy)<br /> pal()<br /> end </p> <p>end</p> <p>I was unable to find any documentation of exactly how this works in the manual and any help would be greatly appreciated. </p> https://www.lexaloffle.com/bbs/?tid=140130 https://www.lexaloffle.com/bbs/?tid=140130 Wed, 07 Feb 2024 03:49:10 UTC Animation speed resetting after loop <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam3 2_1.gif" alt="" /> <p>I'm hoping someone out there can help me solve the ever increasing speed of my bird animation. The goal is to have the ability to put these bird sprites (spr 39 is the static resting bird sprite) all over the map and as the player gets close to them they are disturbed and fly away. A counter (&quot;birds&quot;) counts them and this counter is used to alter states later in the game. Everything is working except that every bird that is disturbed flaps it's wings faster than the previous bird. Any attempt to reset this just results in the bird not animating at all and floating away motionless which is kind of comical. :P </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam3 2_2.gif" alt="" /> <p>My update and draw code for these bad bois are below. Any ideas as to how I could get them to fly away at the same animation speed regardless of how many have been disturbed? Newish to coding in general here so I'm probably going about this the wrong way. FYI, sprite 39 and 19 are both static versions of the bird depending on the background they sit in front of. </p> <p>--birds--</p> <p>function u_bird()<br /> -- btimer=0</p> <p> for y = flr(p.y/8)-1,flr(p.y/8)+1 do<br /> for x = flr(p.x/8)-1,flr(p.x/8)+1 do</p> <p> if mget(x,y)==39 or mget(x,y)==19 then<br /> add(fly,{<br /> ex=x<em>8,<br /> ey=y</em>8,<br /> sp=39, <br /> })<br /> if mget(x,y)==39 then<br /> mset(x,y,59)<br /> elseif mget(x,y)==19 then<br /> mset(x,y,38)<br /> end</p> <p> birds+=1<br /> end <br /> end<br /> end </p> <p>for e in all(fly) do</p> <p>e.ey-=.5<br /> e.ex+=.2<br /> e.sp=birdsp </p> <p> if birdsp&lt;43.9 and birdsp&gt;=40.1 then <br /> birdsp+=.1 <br /> else<br /> birdsp=40.1 <br /> end <br /> end<br /> end </p> <p>function d_bird()</p> <p>for e in all(fly) do<br /> spr(birdsp,e.ex,e.ey)<br /> end </p> <p>end</p> https://www.lexaloffle.com/bbs/?tid=55303 https://www.lexaloffle.com/bbs/?tid=55303 Wed, 13 Dec 2023 02:40:15 UTC jittery player sadness <p> <table><tr><td> <a href="/bbs/?pid=132850#p"> <img src="/bbs/thumbs/pico8_kudojowipa-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=132850#p"> kudojowipa</a><br><br> by <a href="/bbs/?uid=80228"> rupees</a> <br><br><br> <a href="/bbs/?pid=132850#p"> [Click to Play]</a> </td></tr></table> </p> <p>I'm new to PICO-8 here folks but absolutely hooked! I'm having a problem with my player shaking during movement as well as getting caught on my flagged sprites that the player collides with. I know some basics and have compiled this code by watching tutorials and scanning forums for code snippets but I think I am mixing some things that don't play well. I am really going for a smooth player movement vibe so I just added some acceleration rather than an abrupt &quot;p.x+=1&quot; movement style. It doesn't appear to show in my GIF but the player shakes violently during gameplay. Any ideas as to what could be causing this would be greatly appreciated! </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/80228/beam1 0 p8_0.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=53691 https://www.lexaloffle.com/bbs/?tid=53691 Tue, 08 Aug 2023 01:13:20 UTC