remcode [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=39267 Pico-8 screen fails to refresh when screen power saving ends <p>Edit (30th Dec 2021):</p> <p>I have tested this further, and it happens only when the laptop is running on battery power. On mains power, the Pico-8 window continues to draw new frames.</p> <p>I have looked through the power and sleep options and power plan settings and (other than telling the screen to never turn off) do not see anything that stands out as relevant.</p> <p>Original post below.</p> <hr /> <p>Workaround: Minimise and restore Pico-8.</p> <p>Issue:</p> <p>I recently set my laptop to turn the screen off when it wasn't in use for a couple of minutes.</p> <p>When the screen comes back on, Pico-8 appears frozen. The first couple of times this happened I thought Pico-8 had crashed, but then I realised I could minimise and restore it to get it to start refreshing its screen again.</p> <p>As this can look like a crash, it's probably something that should be fixed if possible.</p> <p>I'm presuming there's a missed screen event handler, but if it's a more complex issue, and if it's any help tracking this down: I'm running pico-8 0.2.4, on a Windows 10 machine. It's a Dell laptop with an i3 processor.</p> <p>I doubt it's relevant but I run Pico-8 with: -windowed 1 -width 520 -height 520 -gif_len 10 -volume 0 -accept_future 1</p> https://www.lexaloffle.com/bbs/?tid=45822 https://www.lexaloffle.com/bbs/?tid=45822 Thu, 23 Dec 2021 16:06:34 UTC Long audio P8SCII prints some of the characters <p>Probably more an undocumented (as far as I know) or unexpected behaviour / feature, rather than a bug, but in case it is a bug, I'm posting it in the bug forum. This is something that people who are constructing long audio strings (&gt;31 or 32 notes) with P8SCII should be aware of.</p> <p>The point at which characters begin to be printed seems to vary; for me it's somewhere around the 40th character, which is likely around the 32nd of the notes in the string. (I feel it should be consistent in this - that always after the 32nd note plays it should drop back to printing text, but unless my tests or count are off this doesn't seem to be the case.)</p> <p>The behaviour likely exists because the sfx playback is written for 32 note sfx lengths. For those who haven't read about the audio P8SCII: &quot;If an sfx index is not specified, a non-active sfx between 60..63 is selected automatically. To fill the SFX with data before playback, the following commands can then be appended.&quot; <a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Audio_">Pico-8 manual</a></p> <hr /> <h4>Examples of the feature</h4> <p>At command line (the last &quot;a&quot; will print):</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>?&quot;\aspv1c0eac1eac2eac3eac4eac5eac6eac7eaeaeaeaea&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Or:</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>?&quot;\aspv1c0eac1eac2eac3eac4eac5eac6eac7eaeaeaeaehello world!&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Or in a cart:</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>function _init() cls() ?&quot;\aspv1c0eac1eac2eac3eac4eac5eac6eac7eaeaeaeaehello world!&quot; end function _update() end function _draw() end </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <hr /> <p>As a feature, I don't know that it gets you anything more than printing text before the audio command, e.g.:</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>?&quot;hello\as9v1c2egcegc3&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Which as expected will print &quot;hello&quot; and make the specified sound.</p> <hr /> <p>I'm running pico-8 0.2.4, on a Windows 10 machine.</p> https://www.lexaloffle.com/bbs/?tid=45820 https://www.lexaloffle.com/bbs/?tid=45820 Thu, 23 Dec 2021 15:50:04 UTC Bug: Music() silences the SFX editor? <p>I've just used the music() command (other than the game loop, that was the extent of my code) to play two music tracks (with 7 sfx).</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>function _init() music() end function _update() end function _draw() 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>When I came back to the sfx editor - silence. Pressing keys on the keyboard entered notes, but without the usual and expected sound.</p> <p>I tested muting and unmuting to no effect.</p> <p>Pressing space bar for playback had a positive effect - the track played back, and I was able to enter notes and hear them after that.</p> <p>Tested running the cart again, with the same resulting silence.</p> <p>I'm running Windows 10 and Pico-8 0.2.4.</p> https://www.lexaloffle.com/bbs/?tid=45642 https://www.lexaloffle.com/bbs/?tid=45642 Fri, 10 Dec 2021 09:41:29 UTC Bug: BBS: Problems with dot in someone's name <p>Just tried to notify someone with a dot in their username.</p> <p>Upon posting, the underlining and link was only for the start of their name, upto the dot, which makes me concerned that the wrong user will have been notified.</p> <p>If the right user was notified, the less serious bug is then that the underlining and linking in the post are in error.</p> <p>Problem can be seen on this thread: <a href="https://www.lexaloffle.com/bbs/?pid=79116">https://www.lexaloffle.com/bbs/?pid=79116</a></p> <p>Thanks. :)</p> https://www.lexaloffle.com/bbs/?tid=38751 https://www.lexaloffle.com/bbs/?tid=38751 Fri, 10 Jul 2020 07:04:10 UTC Pong / Bat and ball <p>A one player bat and ball game in 560 bytes (by Pico-8's count).</p> <p>(The code is of course not particulary readable or maintainable. A note of caution for people new to coding, this isn't a code style to emulate when you're starting out, and is done only to make the code size small.)</p> <p>I'm reluctant to call it a Pong clone (in the exact in every detail sense) or remake because it doesn't try to look exactly like a previous version of Pong (or rather, I know some coders go a lot further in getting their carts to look and play exactly like one or another version), although it is of course derivative of Pong.</p> <p> <table><tr><td> <a href="/bbs/?pid=76893#p"> <img src="/bbs/thumbs/pico8_twtw_bnb_remcode-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=76893#p"> twtw_bnb_remcode</a><br><br> by <a href="/bbs/?uid=39267"> remcode</a> <br><br><br> <a href="/bbs/?pid=76893#p"> [Click to Play]</a> </td></tr></table> </p> <p>You are the right hand player; you control your bat with the up and down cursor-keys/d-pad-buttons.</p> <p>Features:</p> <ul> <li>AI bat as second (left) player</li> <li>Random starting direction for ball</li> <li>Increasing ball speed after a number of bounces</li> <li>Bat speed increases with ball speed</li> <li>Limiter on AI bat speed so it is beatable</li> <li>Score display</li> <li>First to 3, wins</li> <li>Pauses at announcement of winner</li> <li>New game after winner announcement after non-d-pad button press</li> </ul> <p>All in 560 bytes.</p> <p>I don't code tweet(tweet)carts (a. I don't tweet. b. I add features. c. I like more readable code) but I decided to code a couple as a coding exercise.</p> <p>(I keep thinking I've overlooked something. Let me know if I have. Thanks!)</p> <img style="margin-bottom:16px" border=0 src="/media/39267/tw-batnball_0.gif" alt="" /> https://www.lexaloffle.com/bbs/?tid=38032 https://www.lexaloffle.com/bbs/?tid=38032 Tue, 19 May 2020 09:51:26 UTC Edited SFX not always the visible SFX (Shortcut keys) <p>Changing which SFX you are viewing does not always change which SFX is edited by the shortcut keys (for the number of ticks per note, at least). So trying to use the shortcut keys can cause a different SFX's ticks per note to change, which is undesirable.</p> <p>I am presuming this is because a previous SFX has been selected, and the selection has not been updated to the visible one either when the current SFX was changed or when a shortcut key is pressed.</p> <p>Sometimes it seems to work fine, then sometimes the bug occurs - I am unable to determine the exact sequence to reproduce it.</p> <p>pico-8 0.0.0i</p> https://www.lexaloffle.com/bbs/?tid=38020 https://www.lexaloffle.com/bbs/?tid=38020 Mon, 18 May 2020 16:52:49 UTC File lock issue <p>Pressing ctrl+s then ctrl+r in swift succession caused pico8 to freeze.</p> <p>This did not resolve, and as a result the file was not saved, and was corrupted.</p> <p>(I had a very recent backup so only lost a very short SFX. This was actually the third time I've had this issue, although the other two times it either resolved or the file wasn't corrupted.)</p> <p>This was with Windows 10 and pico8 0.1.12c.</p> https://www.lexaloffle.com/bbs/?tid=35504 https://www.lexaloffle.com/bbs/?tid=35504 Wed, 02 Oct 2019 10:26:13 UTC Audio in Chrome on Android <p>On Android, using Chrome, the cartridges (at least those on the BBS - I haven't looked further afield yet) have constantly crackly audio, and the distinction between ticks is very audible so each tick sounds burbly or garbled, and some instruments sound particularly off in tone from what they should sound like.</p> <p>I am using an Android tablet. It's low end, but I believe that to be not the main issue because I can get near perfect audio in Firefox with the same tablet (it could still be a contributing factor if Chrome isn't very efficient with delivery of audio but Firefox is).</p> <p>The tablet runs Android 8.1.0; Oreo go.</p> <p>I am using Chrome (version 77.0.3865.92 - I just updated it to make sure the issue happened with the latest version available to the tablet).</p> <p>I can't say whether this is a general problem or limited to this device (I don't have extras to try it on).</p> <p>I feel this is worth mentioning on the pico8 forum as a bug in case people are expecting everyone accessing their cartridges to be getting a near equal experience. This won't necessarily happen, and the delivery of the audio content that I'm experiencing is so bad that I wouldn't expect anyone to keep a cartridge open for more than 20 seconds.</p> <p>Here is a link to a cartridge with music in if anyone wants to make a comparison on their own device (in Chrome then in Firefox) try:</p> <p><a href="https://lexaloffle.com/bbs/?tid=32774">The Snowman</a> by gradualgames</p> <p>Or hunt around for something more to your taste.</p> <p>I doubt everyone is affected by this, because if they were there would have been a post about it already, but all I find is the occasional mention of crackly audio, with no one noting it as a bug.</p> <p>I'm not expecting perfection here, and appreciate that it's playing via JavaScript on a low end machine, but when the difference in experience between what Firefox delivers and what Chrome delivers is so great, it seems worth mentioning. (Firefox has a couple of crackles at the start, then smooths out and thereafter delivers quality audio.)</p> <p>Even if I suspect the problem lies mainly with Chrome for Android, I would still wonder if pico8 could tweak anything to get better playback.</p> <p>Thanks for reading! And thanks <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> for pico8 which I'm enjoying greatly.</p> <hr /> <p>Editing in some threads which may have noted this or another issue with Chrome sound before:</p> <p><a href="https://lexaloffle.com/bbs/?tid=34129">Android Chrome Audio Stutter (May 2019)</a></p> <p><a href="https://lexaloffle.com/bbs/?tid=30573">Pico-8 Audio on Mobile Web Browsers (Jan 2018)</a></p> <p><a href="https://www.lexaloffle.com/bbs/?tid=29209">Lagging sound on chrome (April 2017)</a></p> https://www.lexaloffle.com/bbs/?tid=35503 https://www.lexaloffle.com/bbs/?tid=35503 Wed, 02 Oct 2019 10:17:06 UTC