Danjen [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=13648 [1.0.6] Bug: Alt+left/right moves code editor cursor <p>Holding alt and pressing left or right to tab through the different editors will also move the code editor cursor left/right.<br /> Can be somewhat annoying when you're looking at sprite indexes and going back and forth rapidly.</p> https://www.lexaloffle.com/bbs/?tid=3712 https://www.lexaloffle.com/bbs/?tid=3712 Mon, 27 Jun 2016 00:22:48 UTC Feature Request: Don't hide mouse cursor when out of focus <p>Topic.</p> <p>I usually run Pico-8 maximized (but not full screen) so I can move between windows and tabs more easily. It's mildly annoying to have to find my mouse again because I moved it onto my main screen, and Pico suppresses it when I'm going for another window.</p> https://www.lexaloffle.com/bbs/?tid=3700 https://www.lexaloffle.com/bbs/?tid=3700 Sat, 25 Jun 2016 15:32:19 UTC Working with audio? <p>Just wanted to make sure I understood how things worked before diving into it too deeply.</p> <p>So I understand the idea behind the pattern editor, I've used it to make short sound clips and stuff (and then these are obviously arranged within the music editor to make different instrument tracks, etc)</p> <p>From what I can tell at a surface glance though, is that the music editor only supports one song. Is that correct? I get the impression that I can set the loop start/end points to choose between different pattern sets to allow for multiple songs (eg 0-7 might be song 1, 8-16 could be song 2, etc). Additionally, I assume that I can create my own pattern arrangements on the fly by means of poke()</p> <p>Anyone know for sure?</p> https://www.lexaloffle.com/bbs/?tid=3683 https://www.lexaloffle.com/bbs/?tid=3683 Fri, 24 Jun 2016 01:50:51 UTC Convert string to number? <p>Lua's standard library has a pair of handy functions called &quot;tonumber()&quot; and &quot;tostring()&quot;, but they don't seem to be present with Pico8, which is unfortunate. I realized that you can get a lot more storage space by using strings, rather than sprite byte encoding, but passing it back into usable number data is challenging.</p> <p>At best, I've got this so far:</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 str2hex(str) local dd={} dd[&quot;0&quot;] = 0 dd[&quot;1&quot;] = 1 dd[&quot;2&quot;] = 2 dd[&quot;3&quot;] = 3 dd[&quot;4&quot;] = 4 dd[&quot;5&quot;] = 5 dd[&quot;6&quot;] = 6 dd[&quot;7&quot;] = 7 dd[&quot;8&quot;] = 8 dd[&quot;9&quot;] = 9 dd[&quot;a&quot;] = 10 dd[&quot;b&quot;] = 11 dd[&quot;c&quot;] = 12 dd[&quot;d&quot;] = 13 dd[&quot;e&quot;] = 14 dd[&quot;f&quot;] = 15 local obj={} for i=1,#str do obj[i]=dd[sub(str,i,i)] end return obj 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>Basically, for each character, convert it to a number (and then build a second result set where values are actually hexadecimal)</p> <p>Is there a better way I'm not aware of?</p> https://www.lexaloffle.com/bbs/?tid=3674 https://www.lexaloffle.com/bbs/?tid=3674 Wed, 22 Jun 2016 14:33:02 UTC Mining Game <p>Working on a little demake of MinerVGA. </p> <p>Currently sitting at 15 ore types, 488 tokens, and 1 sprite page used. Most of the ores are loaded via peek() at sprite data. I want to keep it to one sprite page and 0 map pages, but we'll see how much I get done.</p> <img style="" border=0 src="http://i.imgur.com/5TPrnR1.png" alt="" /> <img style="" border=0 src="http://i.imgur.com/oil7njA.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=3672 https://www.lexaloffle.com/bbs/?tid=3672 Tue, 21 Jun 2016 22:25:18 UTC String-handling functions? <p>Is it possible to take a string and index it or get individual characters from it? Ideally, I would like to convert to/from bytes to ascii characters. It looks like Lua 5.1 supports this in the standard library, but as far as I can tell, Pico-8 doesn't include it.</p> <p>EDIT: I notice that I can use the # symbol preceding a token to get its length, such as a table or array or string, but I still can't directly index it.</p> <p>EDIT2: After thoroughly reading the manual as much as possible, it looks like my answer is to use the sub() function.</p> https://www.lexaloffle.com/bbs/?tid=3628 https://www.lexaloffle.com/bbs/?tid=3628 Fri, 17 Jun 2016 20:25:36 UTC