dw817 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=15232 The Goat Or The Automobile <img style="margin-bottom:16px" border=0 src="/media/15232/montyhall.jpg" alt="" /> <p>Hello.</p> <p>While this could be worked into a Pico-8 cart I wanted to ask first if someone could explain the answer to this question.</p> <p>The premise is a simple one.</p> <p>You are in a game show and you are given 3-doors to choose from. Behind two of the doors are goats, which I'm assuming you can't take home as a pet, yet the 3rd has a brand new car in it, your prize for choosing correctly.</p> <p>And you don't know which item is behind each door.</p> <p>So let's suppose you choose the first door and as you are reaching for it you are STOPPED by the host who opens the third door revealing a goat. The host then asks you would you like to continue to open the door you chose (the 1st) or would you like to change and choose the 2nd one instead.</p> <p>The answer we are looking for is what is the chance of choosing the car at this point ?</p> <p>Initially you have a 1 out of 3 chance of choosing the car.</p> <p>Yet according to what is considered the most intelligent person in the world, not me, sadly, :) , they said after the 3rd and only the 3rd door is open revealing the goat, that you have a 2 out 3 chance for picking the car.</p> <p>But I can't see this and neither did many other learned and intelligent people I see only a 50-50 chance of getting that car now just as they did.</p> <p>Can someone explain to me, use code if you like, how it is possible that you have a 2 out of 3 chance for picking the car if the last door is opened revealing a goat still leaving two doors, one of which is a goat, and the other of which is the brand new car ?</p> <p>I even considered it psychologically. Suppose the game show host WANTED you to win ? Well then it could be that he chose the 3rd door revealing it to be a goat to WARN the player that they are about ready to pick a goat, too, behind the 1st door, as the host obviously knows where all the prizes are, and they want you to CHANGE and pick the 2nd door where the car is so they win it ?</p> <p>But now let us suppose the game show host wants you to LOSE ? That is the manager of the program said the host can keep the car for himself if the player does NOT choose it. Therefore the host seeing that the player is getting ready to open the correct door with the car, the 1st door, opens up the 3rd door revealing the goat and then asks the player would they like to change their choice from the first door to the 2nd door, hoping it will encourage them to change doors and get the wrong answer.</p> <p>At all times we must assume the HOST knows where all 3-items are, otherwise he would not just willy nilly pick the 3rd door for it - knowing it to be a goat. If he just jumped in and randomly picked, it could've been the car - and then where does the game go ? So no, that option is out. The host clearly knows where the two goats are and the vehicle at all times.</p> <p>So ... how can it be proven, clearly and easily, under these circumstances that the player after the host opens the 3rd door revealing a goat ONLY, leaves the player a 2 out of 3 chance of winning the new automobile instead of what is more to be believed a 50-50 chance for it ?</p> <p>And don't forget the player could've been reaching for the second or third door as well. And we must think that once again the game show host reaches for one of the other doors that contains a goat to reveal it to the player - to either encourage or confuse them.</p> https://www.lexaloffle.com/bbs/?tid=50984 https://www.lexaloffle.com/bbs/?tid=50984 Thu, 05 Jan 2023 00:12:44 UTC Feature Request: Add Mapper Sprite # <p>Hey <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>.</p> <p>Yes, you. The man of the hour.</p> <p>Could you please do three things, please ?</p> <hr /> <img style="margin-bottom:16px" border=0 src="/media/15232/view64-need35.png" alt="" /> <p>If you click on a Sprite that is not on the page, while the # does change, in this case, 35, the sprite page stays on wherever you left it. Suggest it jump to the page where sprite #35 is seen. So clicking would yield:</p> <img style="margin-bottom:16px" border=0 src="/media/15232/yes35.png" alt="" /> <p>This ^^ instead.</p> <hr /> <img style="margin-bottom:16px" border=0 src="/media/15232/hover-sprite.png" alt="" /> <p>The 2nd thing is to add information to show which sprite you are HOVERING over. Not right-clicking, just by having the mouse atop a sprite will tell what # it is. It could be put in the red area below where there is ample space.</p> <hr /> <img style="margin-bottom:16px" border=0 src="/media/15232/map-y.png" alt="" /> <p>The other is to not show the vertical position in the map if the mouse is no longer hovering in the map area or even if you click in the sprite area - it still shows the map vertical position. Instead show the Sprite-Y position.</p> https://www.lexaloffle.com/bbs/?tid=50965 https://www.lexaloffle.com/bbs/?tid=50965 Tue, 03 Jan 2023 02:53:36 UTC Big Daddy Fatkeys <p> <table><tr><td> <a href="/bbs/?pid=123567#p"> <img src="/bbs/thumbs/pico8_bigdaddyfatkeys-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=123567#p"> bigdaddyfatkeys</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=123567#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v01 01-02-23)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #bigdaddyfatkeys</code></p> <p>Hello.</p> <p>Having been chatting with <a href="https://www.lexaloffle.com/bbs/?uid=42335"> @Sosasees</a>, here:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=50920">https://www.lexaloffle.com/bbs/?tid=50920</a></p> <img style="margin-bottom:16px" border=0 src="/media/15232/oversize.png" alt="" /> <p>I noticed that the icon to the left of the post looked like an oversized keyboard that wouldn't fit on the screen.</p> <p>So it got me to thinking ...</p> <p>While I was working on a type of room builder I quickly set that aside and began working on drawing big fat letters that might look perfect in a 24x24 field or 3x3 8x8-pixel sprites and use the 24x24 pixeled box I made.</p> <p>Naturally it would be too big for the screen. So you would use the mouse to SCROLL for the keys.</p> <p>And that is the result I have. Hold 🅾️ to hold down the SHIFT key.</p> <p>Now I don't expect to do anything with this. You can't type with it. I haven't written code for that yet.</p> <p>If you want to experiment move the mouse pointer so it touches every letter of your first and last name -</p> <p>And yeah, you get a headache pretty quickly from scrolling all over the place ! :)</p> <p>Yet I wanted to see if it was possible to do - to make an area so big as it would appear nice and legible on even the smallest of cellphones. Allowing you to drag your finger across and stab at a button to register it in your text entry.</p> <p><span style="color: #a0ffff;">If you found this amusing or have any questions about it, please let me know !</span></p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=50962 https://www.lexaloffle.com/bbs/?tid=50962 Tue, 03 Jan 2023 01:54:41 UTC The hideous dot ! <p>Agh ! It's ... well, maybe hideous is saying too much. In any case it certainly doesn't belong there.</p> <p>Here is a screenshot of the mapper. I was experimenting with a box for a set of rooms that are 3x3 8x8 sprites in size.</p> <img style="margin-bottom:16px" border=0 src="/media/15232/sk-01-02-23_0.png" alt="" /> <p>No problem here.</p> <p>But now watch what happens when I scroll up by one tile.</p> <img style="margin-bottom:16px" border=0 src="/media/15232/sk-01-02-23_1.png" alt="" /> <p>The dot appears ! I know this dot is used to denote that a tile you chose in the mapper may be black but is not the first tile #0.</p> <p>In this case it most certainly is tile #0 so it should not be appearing, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>. And it only appears in this instance.</p> <p>So for it to appear depending upon which part of the map you are viewing is incorrect and definitely an error.</p> https://www.lexaloffle.com/bbs/?tid=50957 https://www.lexaloffle.com/bbs/?tid=50957 Mon, 02 Jan 2023 23:12:24 UTC ERROR: Copying Source-Code <p>Hello.</p> <p>I was just copying the source-code from one of my later projects and ran into an interesting problem.<br /> Here, try this out:</p> <p> <table><tr><td> <a href="/bbs/?pid=123517#p"> <img src="/bbs/thumbs/pico8_dotty-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=123517#p"> dotty</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=123517#p"> [Click to Play]</a> </td></tr></table> </p> <p>Runs great, right ? But now click <code>Code▼</code> click anywhere in the source-code field, press CTRL+A, then CTRL+C, then in a new Pico-8 boot, in the source-code editor, press CTRL+V.</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> cls() repeat るきるきpset(rnd(128),rnd(128),rnd(16)) るきるきflip() untilるきforever </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p><span style="color: #ff0000;">るきるき</span> ⬅️</p> <p>What is happening here ?</p> <p>It looks like SPACES are being replaced by some other characters. This does not just appear for me but any code you try.</p> <p>Clearly it's a bug of some kind.</p> https://www.lexaloffle.com/bbs/?tid=50955 https://www.lexaloffle.com/bbs/?tid=50955 Mon, 02 Jan 2023 18:10:53 UTC 🇵 8x8 Pixel Font Demo <img style="margin-bottom:16px" border=0 src="/media/15232/495_Picotron-8x8-Font.png" alt="" /> <p>Hello !</p> <p>With the arrival of Picotron comes a great system with a great many errors too. :)</p> <p><span style="font-size: 24px;">🇵</span></p> <p>I am using this symbol in my title until the category &quot;Picotron&quot; has been created. If you want to post your own Pictron code, in absence of a category you can use that emoji too. Just double-click it, press CTRL+C, then CTRL+V to paste it out later in your Picotron title.</p> <p>Functions are now working and I did manage to write this to demonstrate how to access a multiarray image both in main code and a function. You are also welcome to use the font and sprites I drew and code I typed in your own Picotron projects.</p> <hr /> <p>Here now is the code you can try out in Picotron for the display above which includes the 1-line function to display custom 8x8 font + sprites in your own code. First highlight all of the code you see in white below. Move the mouse pointer so it is touching just before the first &quot;-&quot; and holding down the mouse button drag the mouse down all through the code. Let go when you reached the bottom line. Then let go of the mouse entirely.</p> <p>Instructions continue after code.</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> -- 128-character 8x8 Pixel Font Library -- Written by dw817 (01-02-23) -- Standard Lexaloffle License (see notes where you found this cart) function _init() -- Clear screen. cls() -- This string contains all 128 8x8 pixeled characters. -- They are in no way compressed. If you want compressed, let me know and I will write -- the code for it. fontz=&quot;000000000000000000000000000000000000000000000000000000000000000000077000007777000077775000077550000055000007700000005500000000000770077007750775005500550000000000000000000000000000000000000000077077007777777007757755777777700775775500550550000000000000000000077000007777700775555500777700000557700777775500577550000055000000000007700770077577550057755000775770077557750055005500000000077700007757700007775770775777557755775007775770005550550000000000077000000775000077550000055000000000000000000000000000000000000000770000775550077550000775000000770000000577000000055000000000077000000057700000007700000077500007755007755500005500000000000000077000770775770777777507777775775775770557750500005500000000000000000000077000000775000777777000577555000775000000550000000000000000000000000000000000000000000007700000077500007755000005500000000000000000000000000077777777055555550000000000000000000000000000000000000000000000000000000000077000000775000000550000000000000007700000777500077755007775500777550007755000005500000000000007777700775557707757077577575775775057750777775500555550000000000077700000077500000775000007750000077500007777000005555000000000007777000775577000555775000775550775550007777770005555550000000007777770005577550007755000005770077007750077775500055550000000000000777000077555007757700775577507777775005557750000005500000000077777700775555507777700005557700770077500777755000555500000000000077700007755500775770007750770077507750077775500055550000000000777777000555775000077550077775000775550077550000055000000000000077777700775577500777755077557700775077500777755000555500000000000777700077557700775077500770775000577550077755000055500000000000007700000077500000055000000000000077000000775000000550000000000000770000007750000005500000770000007750000075500007550000005000000000770000775550775550000577000000057700000005500000000000000000000000007777770005555550777777000555555000000000000000000000000077000000057700000005770000775550775550000550000000000000000000000777700077557700055077500077555000055000007700000005500000000000077700007055700705770707570757575777755070555500077700000055500000777700007577500775775007557750775777507550775005000550000000007777770077557750775775507750770077507750057775500005550000000000077777007755555077500000775000000770000000777700000555500000000077770000775770007750770077507750775077507777755005555500000000007777770077555550775770007750550077500000077777000055555000000000077777007755555077577000775055007750000077500000055000000000000007777000775555007750000077577700775077500777775000555550000000007700770077507750777777507755775077507750775077500550055000000000077770000077550000775000007750000077500007777000005555000000000000777700000577500000775000007750770077500777755000555500000000007700770077577550777755007777500077577000775077000550055000000000770000007750000077500000775000007750070077777750055555500000000770007707770777577777775775757757750577577500775055000550000000007700770077707750777777507757775077507750775077500550055000000000077770007755770077507750775077507750775007777550005555000000000077777000775577007750775077577550775055007750000005500000000000000777700077557700775077500777755000775500077770000055550000000000777770007755770077507750777705507757700077507700055005500000000000077700007755500077500000775000007750007775500005550000000000007777770005555550007700000077500000775000007750000005500000000000770077007750775077507750775077507757775007707750005505500000000077077700775077507757755077775500777550007755000005500000000000077007770775007757750077577570775777777750775777500550555000000000770077000777755000775500007750000777700077557700055005500000000077007700775077507750775007777550007755000077500000055000000000007777770075577550057755000775500077550700777777500555555000000000077770000775550007750000077500000775000007777000005555000000000077000000777000000777000000777000000777000000775000000550000000000777700000577500000775000007750000077500077775000055550000000000000000000070000007770000775770077550770055000550000000000000000000000000000000000000000000000000000000007777770005555550000000000777700000777500000775000000750000000500000000000000000000000000000000000777700000557700077077507755775007777750005555500000000077000000775770007750770077507750775775507777550005555000000000000000000007777000775555007750000077500000077770000055550000000000000077000770775077557750775077507750775007777750005555500000000000000000077770007755770077577750775055500777700000555500000000000007770000775550077777000077555000775000007750007775500005550000000000000777770077557750775077500770775000557750077775500055550077000000777770007755770077507750775077507750775005500550000000000077000000055000077700000077500000775000007750000005500000000000000770000000550000777000000775000007750000077500777755000555500077000000775077007757755077775500775770007750770005500550000000000777000000775000007750000077500000775000007770000005550000000000000000077707700777777707757577577505775775007750550005500000000000000000770770007770770077557750775077507750775005500550000000000000000007777000775577007750775077507750077775500055550000000000000000007777700077557700775077507757755077505500775000000550000000000000777770077557750775077500770775000557750000777700000555500000000077077000777077007755055077500000775000000550000000000000000000000007770000775550007750000077500077755000055500000000000007700000077770000775550007750000077500000077700000055500000000000000000077007700775077507750775077577750077077500055055000000000000000007700770077577550777755007775500077550000055000000000000000000007700077077500775775707757777777507757775005505550000000000000000077007700077775500077550007777000775577000550055000000000000000007700770077507750775077500770775000557750077775500055550000000000777777007557755005775500077557007777775005555550000000000007770007777750777777507777775007777750005777500000555000000000007700000077500000775000000550000077000000775000007750000005500077700000777770007777770077777750777775507775550005550000000000000000000077700007757707705507775000005550000000000000000000000000077700007055700707770707575557575777075070557550077755000055500aa404aa0a4a4a4a00afffa0057bfb7504f3f3f40a4fff4a00a404a00000000000000000084080480084848008484848087cdc7804f1f1f4004fff40000000000000a0000009a9000aaa7aaa004aaa40009a9a9000a404a0000000000000000000444440099999990444444409a979a909a999a909aaaaa909999999000000000000000000220220027828820288888200288e20000282000000200000000000000dcd0000c1c1c00d1c1c1d0cc171cc0d1c1c1d00c1c1c0000dcd0000000000009aaa9009a999a90a99a99a0a9aaa9a0a99a99a09a999a9009aaa90000000000022e22002e2d2e20222e2220ede7ede0222e22202e2d2e20022e220000000000c7c11111111c7c11111111111111111111111c7c1c7c11111111111111111111bbbbbbbbbabbbb3bbb3bbabbbbbbbbbbbbbbbbbbbbabb3bbb3bbbbabbbbbbbbb0000000006777600670707606780876006777600000000000067600000000000055006505845d000548d5d6005dd65050d566a0060d5a59050600900000500000044400000999000097079000a700a000977790000999000004440000000000000000000575000007675000000675000007667600000707000006760000000000067600007d0d70006d0d600dd676dd0d67076d0dd707dd0d66666d000000000077777760766666d06dddddd0000000077760777666d0766dddd06dd00000000000000000000000000555555005777770057777700577666005776000057760000000000000000005555555577777777777777776666666600000000000000000000000000000000555555007777750077777500666775000067750000677500005776000057760000577600005776000057760000577600005776000057760000000000000000000000000075757575000000000000000000000000000000000067750000677500006775000067750000677500006775000067750000677500005776000057760000577666005777770057777700555555000000000000000000000000000000006666666677777777777777775555555500000000000000000067750000677500666775007777750077777500555555000000000000000000000000000000000000000000000d000000000000000000000000000000000000d11111111000000010000000100000001000000010000000100000001000000000000000000000600000d56000d5d560d5d56660d56667706667777000000000444444404000004049000040495900404959594049595940444444400000000044a4406045550660455067604550676045506760444066000000600000000000070000000dddddd00ccccd000cccd0000ccccd000dddddd00700000000000000000000a00000090000dd80000d00d000d0000d00d0000d000d00d00000dd0000&quot; -- Draw out all 128-characters so you can see what they look like. for i=0,3 do for j=0,31 do -- Draw them centered and near the top of the screen. See below for print8() function. print8(chr(j+i*32+32),112+j*8,8+i*8) end end -- Set a sample string to display. Note character #130 for gold stars. -- See original post for key number of all special characters. t=&quot;\130 Welcome To Picotron - Wave Of The Future ! \130&quot; -- Print 16-lines down. for i=0,15 do -- Call custom function print8(). See details at function. -- Notice that x-position gives nice wavy motion. print8(t,56+sin(i/15)*24,i*10+56) end end -- As flip() does not yet work, I have to have this function to make sure our command -- prompt doesn't overwrite the display. function _update() end -- Custom print 8x8 character from included font stored in string fontz. -- t = Text to print. Use \128 to \159 for special characters. -- Each character is separated by 8-pixels horizontally. -- x = X-position pixel on screen. -- y = Y-position pixel on screen. function print8(t,x,y)local a for i=1,#t do a=(ord(sub(t,i,i))-32)*64+1 spr(userdata(&quot;[gfx]0808&quot;..sub(fontz,a,a+63)),x,y)x+=8 end 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>If you haven't already, highlight that code above. Once it is fully highlighted, press CTRL+C. Then go to this website:</p> <p><a href="https://www.lexaloffle.com/picotron.php?page=playground">https://www.lexaloffle.com/picotron.php?page=playground</a></p> <p>From there click the big triangle to start it. Press [ESC], CTRL+V, the ENTER key, and CTRL+R to run it. Press [ESC] twice to return back to source-code view.</p> <hr /> <p>To have this 8x8 font and game sprites in your own original code, you really only need a few lines.</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() fontz=&quot;000000000000000000000000000000000000000000000000000000000000000000077000007777000077775000077550000055000007700000005500000000000770077007750775005500550000000000000000000000000000000000000000077077007777777007757755777777700775775500550550000000000000000000077000007777700775555500777700000557700777775500577550000055000000000007700770077577550057755000775770077557750055005500000000077700007757700007775770775777557755775007775770005550550000000000077000000775000077550000055000000000000000000000000000000000000000770000775550077550000775000000770000000577000000055000000000077000000057700000007700000077500007755007755500005500000000000000077000770775770777777507777775775775770557750500005500000000000000000000077000000775000777777000577555000775000000550000000000000000000000000000000000000000000007700000077500007755000005500000000000000000000000000077777777055555550000000000000000000000000000000000000000000000000000000000077000000775000000550000000000000007700000777500077755007775500777550007755000005500000000000007777700775557707757077577575775775057750777775500555550000000000077700000077500000775000007750000077500007777000005555000000000007777000775577000555775000775550775550007777770005555550000000007777770005577550007755000005770077007750077775500055550000000000000777000077555007757700775577507777775005557750000005500000000077777700775555507777700005557700770077500777755000555500000000000077700007755500775770007750770077507750077775500055550000000000777777000555775000077550077775000775550077550000055000000000000077777700775577500777755077557700775077500777755000555500000000000777700077557700775077500770775000577550077755000055500000000000007700000077500000055000000000000077000000775000000550000000000000770000007750000005500000770000007750000075500007550000005000000000770000775550775550000577000000057700000005500000000000000000000000007777770005555550777777000555555000000000000000000000000077000000057700000005770000775550775550000550000000000000000000000777700077557700055077500077555000055000007700000005500000000000077700007055700705770707570757575777755070555500077700000055500000777700007577500775775007557750775777507550775005000550000000007777770077557750775775507750770077507750057775500005550000000000077777007755555077500000775000000770000000777700000555500000000077770000775770007750770077507750775077507777755005555500000000007777770077555550775770007750550077500000077777000055555000000000077777007755555077577000775055007750000077500000055000000000000007777000775555007750000077577700775077500777775000555550000000007700770077507750777777507755775077507750775077500550055000000000077770000077550000775000007750000077500007777000005555000000000000777700000577500000775000007750770077500777755000555500000000007700770077577550777755007777500077577000775077000550055000000000770000007750000077500000775000007750070077777750055555500000000770007707770777577777775775757757750577577500775055000550000000007700770077707750777777507757775077507750775077500550055000000000077770007755770077507750775077507750775007777550005555000000000077777000775577007750775077577550775055007750000005500000000000000777700077557700775077500777755000775500077770000055550000000000777770007755770077507750777705507757700077507700055005500000000000077700007755500077500000775000007750007775500005550000000000007777770005555550007700000077500000775000007750000005500000000000770077007750775077507750775077507757775007707750005505500000000077077700775077507757755077775500777550007755000005500000000000077007770775007757750077577570775777777750775777500550555000000000770077000777755000775500007750000777700077557700055005500000000077007700775077507750775007777550007755000077500000055000000000007777770075577550057755000775500077550700777777500555555000000000077770000775550007750000077500000775000007777000005555000000000077000000777000000777000000777000000777000000775000000550000000000777700000577500000775000007750000077500077775000055550000000000000000000070000007770000775770077550770055000550000000000000000000000000000000000000000000000000000000007777770005555550000000000777700000777500000775000000750000000500000000000000000000000000000000000777700000557700077077507755775007777750005555500000000077000000775770007750770077507750775775507777550005555000000000000000000007777000775555007750000077500000077770000055550000000000000077000770775077557750775077507750775007777750005555500000000000000000077770007755770077577750775055500777700000555500000000000007770000775550077777000077555000775000007750007775500005550000000000000777770077557750775077500770775000557750077775500055550077000000777770007755770077507750775077507750775005500550000000000077000000055000077700000077500000775000007750000005500000000000000770000000550000777000000775000007750000077500777755000555500077000000775077007757755077775500775770007750770005500550000000000777000000775000007750000077500000775000007770000005550000000000000000077707700777777707757577577505775775007750550005500000000000000000770770007770770077557750775077507750775005500550000000000000000007777000775577007750775077507750077775500055550000000000000000007777700077557700775077507757755077505500775000000550000000000000777770077557750775077500770775000557750000777700000555500000000077077000777077007755055077500000775000000550000000000000000000000007770000775550007750000077500077755000055500000000000007700000077770000775550007750000077500000077700000055500000000000000000077007700775077507750775077577750077077500055055000000000000000007700770077577550777755007775500077550000055000000000000000000007700077077500775775707757777777507757775005505550000000000000000077007700077775500077550007777000775577000550055000000000000000007700770077507750775077500770775000557750077775500055550000000000777777007557755005775500077557007777775005555550000000000007770007777750777777507777775007777750005777500000555000000000007700000077500000775000000550000077000000775000007750000005500077700000777770007777770077777750777775507775550005550000000000000000000077700007757707705507775000005550000000000000000000000000077700007055700707770707575557575777075070557550077755000055500aa404aa0a4a4a4a00afffa0057bfb7504f3f3f40a4fff4a00a404a00000000000000000084080480084848008484848087cdc7804f1f1f4004fff40000000000000a0000009a9000aaa7aaa004aaa40009a9a9000a404a0000000000000000000444440099999990444444409a979a909a999a909aaaaa909999999000000000000000000220220027828820288888200288e20000282000000200000000000000dcd0000c1c1c00d1c1c1d0cc171cc0d1c1c1d00c1c1c0000dcd0000000000009aaa9009a999a90a99a99a0a9aaa9a0a99a99a09a999a9009aaa90000000000022e22002e2d2e20222e2220ede7ede0222e22202e2d2e20022e220000000000c7c11111111c7c11111111111111111111111c7c1c7c11111111111111111111bbbbbbbbbabbbb3bbb3bbabbbbbbbbbbbbbbbbbbbbabb3bbb3bbbbabbbbbbbbb0000000006777600670707606780876006777600000000000067600000000000055006505845d000548d5d6005dd65050d566a0060d5a59050600900000500000044400000999000097079000a700a000977790000999000004440000000000000000000575000007675000000675000007667600000707000006760000000000067600007d0d70006d0d600dd676dd0d67076d0dd707dd0d66666d000000000077777760766666d06dddddd0000000077760777666d0766dddd06dd00000000000000000000000000555555005777770057777700577666005776000057760000000000000000005555555577777777777777776666666600000000000000000000000000000000555555007777750077777500666775000067750000677500005776000057760000577600005776000057760000577600005776000057760000000000000000000000000075757575000000000000000000000000000000000067750000677500006775000067750000677500006775000067750000677500005776000057760000577666005777770057777700555555000000000000000000000000000000006666666677777777777777775555555500000000000000000067750000677500666775007777750077777500555555000000000000000000000000000000000000000000000d000000000000000000000000000000000000d11111111000000010000000100000001000000010000000100000001000000000000000000000600000d56000d5d560d5d56660d56667706667777000000000444444404000004049000040495900404959594049595940444444400000000044a4406045550660455067604550676045506760444066000000600000000000070000000dddddd00ccccd000cccd0000ccccd000dddddd00700000000000000000000a00000090000dd80000d00d000d0000d00d0000d000d00d00000dd0000&quot; end function print8(t,x,y)local a for i=1,#t do a=(ord(sub(t,i,i))-32)*64+1 spr(userdata(&quot;[gfx]0808&quot;..sub(fontz,a,a+63)),x,y)x+=8 end 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>So it is essentially 2-lines of code. Where <code>fontz</code> the string is initialized and the 1-line function named <code>print8()</code></p> <p>Copy those and place in each respective function in your own code and you are all set !<br /> To print in this font call <code>print8(t,x,y)</code> where t is a string like <code>hello</code> and x and y are pixel coordinates to draw this at. Use the backslash \ in the string to create special characters like \130 for gold star.</p> <p>See next section below which details all the special game sprites.</p> <hr /> <p>.<br /> If you stick with 8x8 pixeled sprites, you have 60-tiles across by 33-tiles down yielding 480-pixels across by 264-pixels down. In original Pico-8 you could only have 16-tiles across and 16-tiles down with 8x8 pixels, so it's worth considering using this size if you want to make large play areas like old DOS games did with their 80- or 40-characters across and 25-lines down.</p> <img style="margin-bottom:16px" border=0 src="/media/15232/492_Picotron-special-chars.png" alt="" /> <p><span style="color: #a0ffff;">Here are the special characters ASCII:</span></p> <p>+128 Girl or NPC.<br /> +129 Boy or Player.<br /> +130 Gold Star or Experience Points.<br /> +131 Treasure Chest.<br /> +132 Life Heart.<br /> +133 Jeweled Blue Crystal.<br /> +134 Gold Coin.<br /> +135 Jeweled Red Crystal.<br /> +136 Water.<br /> +137 Grass.<br /> +138 Skull monster.<br /> +139 Spider monster.<br /> +140 Wristwatch or get more time.<br /> +141 Key.<br /> +142 Lock.<br /> +143 Wall.<br /> +144 Up to char #152 is to draw nice boxes and borders.<br /> +148 Good to separate text lines vertically.<br /> +153 Dot to see 8x8 area.<br /> +154 Grid to see 8x8 area.<br /> +155 Stairs leading up.<br /> +156 Stairs leading down.<br /> +157 Open doorway.<br /> +158 Blue flag.<br /> +159 Lit bomb.</p> <p>So if you wanted to draw a Spider at 64,64 that would be <code>print8(&quot;\139&quot;,64,64)</code></p> <hr /> <p>This code is Lexaloffle licensed. This means you can use this code and all images entirely for yourself without giving me any credit at all - provided the code is posted in the domain of <a href="https://lexaloffle.com/">https://lexaloffle.com/</a></p> <p>This is true of all my Pico-8 projects, now, the past, and in the future. They are there for you to take and learn and build from and share in the Lexaloffle website. :)</p> <hr /> <p><span style="color: #a0ffff;">If you find this helpful or have any questions about, please let me know.</span></p> <p><strong>Thanks !</strong></p> https://www.lexaloffle.com/bbs/?tid=50942 https://www.lexaloffle.com/bbs/?tid=50942 Sun, 01 Jan 2023 20:41:24 UTC Defeating Backslash Numbers <p>Hi guys.</p> <p>I'm not going to call this a bug cause it really isn't. However it is pretty inconvenient.</p> <p>In light of the recent data compressor I wrote:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=50713">https://www.lexaloffle.com/bbs/?tid=50713</a></p> <p>I am required to encode characters &quot;0&quot; (zero) to &quot;9&quot; as &quot;\48&quot; to &quot;\57&quot;</p> <p>Why ? Well quite simply the system recognizes that \0 to \9 are read as single characters. So suppose you wanted to have character CHR(4) and character &quot;8&quot; in a string for data.</p> <p>Well normally you would encode that as &quot;\48&quot; but now you see the problem. That also makes chr(48) which is character zero.</p> <p>What I propose is, and you can make it optional, that &quot;\&quot; followed by a digit is disallowed as you can use <code>\&quot;</code> for character 34 and all other non-printables like chr(10) and chr(13) already have equivalents.</p> <p>This is controlled inside the code itself, possibly with an obscure POKE or even the command, <code>nnbd()</code> for &quot;No numeric backslash definitions.&quot;</p> <p>This of course also means that you would no longer have &quot;\0&quot; but a new character as <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_80.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_80"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_80.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_80"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_80" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> to type in your code, or simply use &quot;\z&quot;</p> <p>Achieved and retrieved from <code>printh(chr(0),&quot;@clip&quot;)</code></p> <p>In this with &quot;\digits&quot; no longer being viable, true 256-byte data can be stored with a minimal of fuss and not requiring coders to use \48 to \57 for simple digits 0 (zero) through 9.</p> https://www.lexaloffle.com/bbs/?tid=50927 https://www.lexaloffle.com/bbs/?tid=50927 Sat, 31 Dec 2022 20:26:20 UTC Feature Request: Hide Me In Splore <p>Hello, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>.</p> <p>This is a simple request. I would like a key, perhaps &quot;V&quot; to turn on and off the text that appears on top of a cart's logo in Splore.</p> <p>For instance, you can see HERE:</p> <img style="margin-bottom:16px" border=0 src="/media/15232/shadowsofdunwich-4 p8_1.png" alt="" /> <p>Some very nice art drawn of the soldiers by <a href="https://www.lexaloffle.com/bbs/?uid=29414"> @paranoidcactus</a>. I would like a key to hide the text that appears below the half of the screen so it can be fully seen and appreciated. Bonus if you can still navigate using UP and DOWN arrow keys while hiding the text.</p> <p>A bonus command of <code>showlabel()</code> would also be nice so no-one would need to include code to draw their logo each time. You merely call that and it transfers the LABEL data to the screen. To make sure no-one uses this just for data though you could set it so when you do Show Label, one of two things happens:</p> <ol> <li>Show label, wait for keystroke, clear screen.</li> <li>Show label. No way to read pixels or even memory for it but can draw on top of it, like score, level, information, etc.</li> </ol> <p><span style="color: #a0ffff;">Would anyone else like this ability ?</span></p> https://www.lexaloffle.com/bbs/?tid=50862 https://www.lexaloffle.com/bbs/?tid=50862 Tue, 27 Dec 2022 18:43:14 UTC Fling The Ball <p> <table><tr><td> <a href="/bbs/?pid=123016#p"> <img src="/bbs/thumbs/pico8_flinger-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=123016#p"> flinger</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=123016#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v01 12-25-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #flinger</code></p> <p>Hello.</p> <p>This is especially for <a href="https://www.lexaloffle.com/bbs/?uid=73207"> @Dawnoboo</a> who earlier asked how can launch slime with mouse.</p> <p>From what I can tell they want where you can grab an object and release it quickly with the mouse giving it a &quot;flinging&quot; effect.</p> <p>This then is the heavily documented code I wrote for it this Christmas morning. It also demonstrates how you can pick up an object dragging it with the mouse.</p> <p>If you found this code to be helpful for you or if have any questions, please let me know.</p> <p>Thanks ! 🎅</p> https://www.lexaloffle.com/bbs/?tid=50827 https://www.lexaloffle.com/bbs/?tid=50827 Sun, 25 Dec 2022 18:06:46 UTC New Byte Compressor 2022 <p> <table><tr><td> <a href="/bbs/?pid=122669#p"> <img src="/bbs/thumbs/pico8_newcompress-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=122669#p"> newcompress</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=122669#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v04 12-18-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #newcompress</code></p> <hr /> <p>Hello.</p> <p>I have need of a data compressor for the 2023 project I'm working on now so I wrote one. And it's better than a 6-bit or 7-bit because once again, this is an 8-bit compressor.</p> <p>Now this is different from the picture compressor I wrote which you can find HERE:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=45335">https://www.lexaloffle.com/bbs/?tid=45335</a></p> <p>That compressor is looking for Pico-8 pixels specifically.</p> <p>No, THIS compressor is looking for raw data. While I am demonstrating it with pictures it is in fact geared for byte data, maps, PCM sound, and what have you.</p> <p>Usage:</p> <p>There are 2-functions all squeezed down to a single programming line each.</p> <hr /> <p>The first is the compressor. It can be used 2-ways.</p> <p><code>string=compres8(m,e,s,f)</code><br /> <code>compres8(m,e,s,f)</code><br /> (251 tokens in size)</p> <p>It uses 4-arguments and the <code>string</code> in the beginning is optional. By default it will save your compressed data to the clipboard for immediate use. If you want to save it to a string then put that variable in front.</p> <p>The first is &quot;M&quot; the memory location to start where you want to begin your compression. You can also use 0x8000 high memory if you so choose.</p> <p>The second is &quot;E&quot; the length to read. For instance the screen at 0x0000 is 0x2000 or 8192-bytes in length. You can also use a length greater than 0x2000 if you so choose.</p> <p>The next is &quot;S&quot; for shift. Now by default this is zero. With some fiddling of it you can shave off a few bytes from your string compression. Basically it SHIFTS the value so for instance if you had a bunch of &quot;\0&quot; in your code, by shifting it 128 you would then get █ instead which registers as a single character whereas &quot;\0&quot; registers as 2-characters from your 64k available.</p> <p>However you should never find \0\0\0 beside itself ever in the final compressed data. Everything gets compressed when a pattern is found.</p> <p>If you don't want to mess with it, don't enter a value or if you need the next argument, leave it at zero.</p> <p>The last argument is &quot;F&quot; for flag. If it is anything except NIL then it will not convert to a clipboard friendly string, instead it will save the image to a true 8-bit string that can only be output but not pasted in your code. You will need the starting variable for this.</p> <p>It is for debugging and you shouldn't need it unless you come across some data that is not compressing properly and you need to show this to me so I can isolate the problem.</p> <p>However if you are not debugging and just using the compressor normally, after you have called the compressor it is ready for use !</p> <p>In a line of your code, press CTRL+P, CTRL+V, then CTRL+P again followed by the ENTER key to confirm. That will save your data to the string in your code, and of course, you can rename the variable <code>data</code> to whatever you want.</p> <p>It will look something like this:</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> data=&quot;\0 &yen;たみまたみまたみまたみまたみまたみまたみまたみまたみま█ ... etc &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>Then you are ready to decompress it as described in the next function to follow.</p> <hr /> <p><code>decompres8(string,o,s)</code><br /> (126 tokens in size)</p> <p>The 1st argument is for the string that you created with compres8(). It will be a series of odd characters within 2-quote marks. See code sample above.</p> <p>The &quot;O&quot; (oh) variable is for the memory you wish to start writing it to. You are not limited to 0x0000 or 0x6000, you can also write to 0x8000 if you so choose.</p> <p>The &quot;S&quot; is exactly as above. It SHIFTS the value. So if you recorded using compres8() with a shift of 64, then you need to use decompres8() also with the value shift of 64.</p> <hr /> <p>And that's it ! Please see the sourcecode for the sample cartridge above for further information, especially on usage of the 2-functions.</p> <p>Now I wrote these functions for myself as I need them for the main project I'm working on. However if you find them of use yourself or have any questions to this point, please let me know.</p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=50713 https://www.lexaloffle.com/bbs/?tid=50713 Mon, 19 Dec 2022 02:11:32 UTC Feature Request: X-Cursor + True Len <p>Hello.</p> <hr /> <p>I would like to suggest, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>, please, that you add the cursor's X-location to the editor.</p> <p>There is some screen real estate not being used HERE:</p> <img style="margin-bottom:16px" border=0 src="/media/15232/request-x.png" alt="" /> <p>This would help me as I'm now working on some data tables of different lengths across.</p> <hr /> <p>Additionally a way of getting the true length of a string before converting it to untypables.</p> <p>For instance:</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> a=&quot;\48\0&quot; ?#a ?truelen(a) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>2<br /> 5</p> <hr /> <p>Is there room for a 3rd request ?</p> <p>The other is more technical. I'd like this:</p> <p><code>\07</code> to convert to chr(0)..&quot;7&quot; instead of chr(7).</p> <p>For instance if you want chr(0) and chr(7) it would be: <code>\0\7</code> or <code>\0⁷</code><br /> or chr(7) by itself would be, <code>\7</code> or <code>⁷</code></p> <p><code>\00543</code> would convert to chr(0)..&quot;0543&quot; instead of &quot;63&quot;</p> <p>Quite simply do not allow a prefix zero to be included in a numerical argument &quot;\&quot; for P8SCII or lower ASCII commands. A &quot;\0&quot; always denotes chr(0). This is only true for CHR(0), no other, &quot;\111&quot; for instance does not give chr(1)..chr(1)..chr(1), it gives &quot;O&quot; (letter oh).</p> <p>Naturally normal <code>\</code> without a prefix of zero is fine.</p> <p><code>\48</code> = &quot;0&quot;<br /> <code>\64</code> = &quot;@&quot;<br /> <code>\13</code> = chr(13) or <code>\r</code><br /> etc.</p> <p>But once again something like, <code>\013</code> would not return a CR but chr(0)..&quot;13&quot;</p> https://www.lexaloffle.com/bbs/?tid=50710 https://www.lexaloffle.com/bbs/?tid=50710 Sun, 18 Dec 2022 21:05:32 UTC Big Buggy <p>It seems to me that some of the latest versions you have of Pico-8 are in fact breaking existing previously working Pico-8 carts.</p> <p>May I suggest that the cart be read, especially the 2nd line down:</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> pico-8 cartridge // http://www.pico-8.com version 37 </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 denotes the version and online and in Splore at least, run THAT particular version of Pico-8 so all previously existing carts will run correctly ?</p> <p>Then we can sift through the newest versions of Pico-8, carefully, and deal with whatever problems they are causing - without affecting previously running perfect code.</p> <p>Also to add a new command to Pico-8, <code>ver</code> which will state the version # you are currently running. The latest if you are running the EXE, or a different version entirely if you load it from # or splore or it is online.</p> <p>Also to bring back <code>info()</code> so it can be used in code. Currently it is ignored yet in previous versions it works properly. I used that in my Mildew Manor game to show system specs at the start.</p> https://www.lexaloffle.com/bbs/?tid=50694 https://www.lexaloffle.com/bbs/?tid=50694 Sat, 17 Dec 2022 19:34:22 UTC Feature Request: Scroll To Me <p>Hello.</p> <p>This is what I hope is a pretty simple request, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>.</p> <p>Currently if you click PLAY on any Pico-8 project included in a BBS post, it is up to the user, me, to manually scroll the screen so it all fits as it can definitely be just half-on the screen.</p> <p>Could you please automatically scroll and center the Pico-8 window when you click the PLAY button so we don't have to ?</p> <p>Also to have an option to sleep or not. That is if the cursor ever leaves the Pico-8 frame while being run from a BBS, it could go silent and freeze up or run as normal, through user configuration.</p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=50674 https://www.lexaloffle.com/bbs/?tid=50674 Thu, 15 Dec 2022 18:33:19 UTC Which CHR Is Which <p>Hello.</p> <p>As I'm experimenting with 8-bit compression, I came across an anomaly that I feel deserves some attention.</p> <p>Try this code:</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> cls() a=chr(6) b=&quot;⁶&quot; ?ord(a) ?ord(b) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I created the ⁶ by typing in immediate mode, <code>printh(chr(6),&quot;@clip&quot;)</code> and then in the source-code pressing CTRL+V.</p> <p>My question is how can BOTH of these be the same character and - is this an error of some kind ?</p> <p>Because if you type out in immediate mode, <code>print(chr(6))</code> you won't get that symbol back. You can only get that symbol if you use <code>printh()</code></p> <p>Because if for some reason this is correct, it means that you are NOT saving a single byte per character in your source-code, that you are in fact using an extended unknown set to create that special character of 6, yes ?</p> <p><span style="color: #a0ffff;">The bug is this. You cannot get a visual for printing a character &lt; ASCII of 16, however you CAN if you transfer it solely to the clipboard and then use CTRL+V. There is still no way to print it. It should appear either way you access it for output or at least give you an option of doing so with an obscure poke() or direct extcmd().</span></p> <p>It would also be useful to have total access of 256-characters in a string. Use LENGTH of string for storage instead of locking out chars #0, #9, #10, and #13 which cannot be included even via <code>printh()</code> This is just something requested though, it is not a bug.</p> <p>The extra characters could appear like this:<br /> <table><tr><td width=96> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_78.png" width=96 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_78"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_78.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_78"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [24x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_78" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </p> <p>It would also allow you to use quote &quot; and backslash. So the string itself would be pretty special. Maybe a new command:</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> data=rawstring(&quot;all kinds of characters.&quot;) printraw(data) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>It would require &quot; and ) on the end and likely giving the string length at the front of the definition in memory and you could not use .. or anything else to add to it on the END lest it be accidentally thought of as more 8-bit string for data. Yet the unprintable characters would be completely allowed, #0-15, #34, and #92 allowing true 8-bit storage to a string on a single programming line.</p> <p>So, let's see. You could have this:</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> pet = rawstring(&quot;dog&quot;) memory: p=112, e=101, t=116, ==61, (2-bytes for command type, in this case, `rawstring`), 3 (number of bytes in this string), d=100, o=111, g=103. No CR or zero to denote end, the length in bytes was already given so we are done with this single programming line. </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=50665 https://www.lexaloffle.com/bbs/?tid=50665 Thu, 15 Dec 2022 02:32:14 UTC Slow Down <p> <table><tr><td> <a href="/bbs/?pid=122196#p"> <img src="/bbs/thumbs/pico8_slowdown-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=122196#p"> slowdown</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=122196#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v00 12-10-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #slowdown</code></p> <p>In this demo use the LEFT and RIGHT arrow keys to control actual runtime speed of the cart. Examine the code to see how it is done.</p> <p>Hello.</p> <p>As you know conventional code allows you to run your cart in 30fps or 60fps.</p> <p>However making use of the seldom known command, <code>_set_fps()</code> you can set any of these values or an arbitrary one.</p> <p>Is there a way of setting FPS &lt;30 inside a cart that does make use of _update() or _update60() ?</p> https://www.lexaloffle.com/bbs/?tid=50602 https://www.lexaloffle.com/bbs/?tid=50602 Sat, 10 Dec 2022 23:52:25 UTC Feature Request: Tabber Recall <p>Hello there.</p> <p>No, that's not Total Recall. Tabber Recall.</p> <p>As you may be aware you can press the UP arrow key when you are in immediate mode and it will recall the last commands you have typed.</p> <p>However the feature I would like to request is engaged when you press the TAB key and depending upon what you've already typed, it will match.</p> <p>Example. Let's say you've typed all this in immediate mode:</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> pset(49,49,3) apple=&quot;sauce&quot; sandy=&quot;beach&quot; save exact-12-10-22 bread=&quot;ginger&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>Now if you wanted to save your code again you could press the UP arrow key twice and press ENTER. However suppose you have entered 100 or more commands since then. Well you'd be pressing that UP arrow key quite a few times to find it.</p> <p>What I suggest is this.</p> <p>Much like being able to press TAB when you select, <code>load {filename}</code> instead of showing you the files it shows you the commands. So if you typed out <code>s</code> in immediate mode and the TAB key you would get:</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> sandy=&quot;beach&quot; save exact-12-10-22 &gt; s </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>If you pressed <code>a</code> and <code>v</code> from here and pressed TAB again, as there is only one instance of this, it would auto-complete it for you.</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> &gt; save exact-12-10-22 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Then you just press ENTER to accept.</p> <p>This feature already exists in files. Try typing out <code>load</code> in immediate mode followed by space and a few characters of files you know exist in that directory. This is the feature I would like for immediate mode, not just LOAD but any commands you may have typed.</p> <p>How about it, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> ?</p> https://www.lexaloffle.com/bbs/?tid=50594 https://www.lexaloffle.com/bbs/?tid=50594 Sat, 10 Dec 2022 18:53:41 UTC Request Feature: Reset does not release RUN argument <p>Hello.</p> <p>No this is clearly a <span style="color: #505050;">bug</span> inconvenience.</p> <p>If you make use of <code>RUN(string)</code> where you can recall it with STAT(6) later, If you press CTRL+R anywhere during the cart, or select <code>Reset Cart</code> from the system menu, or even have just <code>RUN()</code> in your code, it will not reset STAT(6) fouling up the results you were using to look for it.</p> <p>It would be helpful if a new EXTCMD() was chosen that could be used to reset the argument specifically for the RUN() command WITHOUT having to RUN().</p> https://www.lexaloffle.com/bbs/?tid=50566 https://www.lexaloffle.com/bbs/?tid=50566 Fri, 09 Dec 2022 00:59:36 UTC Christmas Present Panic 2022 <p> <table><tr><td> <a href="/bbs/?pid=121988#p"> <img src="/bbs/thumbs/pico8_xmaspp-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=121988#p"> xmaspp</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=121988#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v03 12-08-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #xmaspp</code><br /> <span style="color: #a0ffff;"><strong>VVHAT'S NEW ??</strong></span></p> <ul> <li>12-08-22 Thanks to <a href="https://www.lexaloffle.com/bbs/?uid=45608"> @kimiyoribaka</a> for &quot;quick new game&quot; suggestion. In the system menu.</li> <li>12-08-22 Thanks to <a href="https://www.lexaloffle.com/bbs/?uid=41412"> @extar</a> for finding a bug in the name entry. Corrected.</li> <li>12-08-22 Show high-scores after entering your name. Game continues from there.</li> </ul> <p><a href="https://www.lexaloffle.com/bbs/?uid=30036"> @ScrubSandwich</a>: Greeting humanoids, this is the first game release from the group of SORCERY. We hope that you enjoy our humble release filled with Christmas cheer and winter shenanigans.</p> <hr /> <p>12-07-22: Hello ! I thought I would update this joint project Sorcery and myself worked on years ago with new Pico-8 v0.2.5c abilities.</p> <p>For &quot;Quick new game&quot; press &quot;P&quot; anywhere, select it, and go straight to a new game.</p> <p><span style="color: #a0ffff;">Additionally</span> after this you can select &quot;P&quot; then <code>Reset Normal</code> to reset the game to normal boot operation.</p> <p>You can find the original post HERE:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=36318">https://www.lexaloffle.com/bbs/?tid=36318</a></p> <hr /> <img style="margin-bottom:16px" border=0 src="/media/15232/xmaspp-cart.png" alt="" /> <p>Instructions are as follows:</p> <p>Shoot the presents with Santa's teleporter Candy Cane gun to beam them directly to Santa's Sleigh.</p> <p>Use LEFT and RIGHT arrow keys to position Santa's cane gun.<br /> Press 🅾️ to shoot with auto-fire.<br /> Press ❎ for a single well-placed shot.</p> <p>You get a bonus man if you can hit all presents without missing a hit on a level. Use the ❎ key for this for accurate shooting so you don't accidentally shoot again and miss for a close target.</p> <p>Press DOWN for force-field for Santa's cane gun. Only good for the first few levels. If you lose a cane though on any level, you automatically get the force-field back though it vanishes again once you shoot.</p> <p>It is possible to hit a single present and complete that whole level. I'll let you figure out how that is done. :)</p> <p>If you can reach &quot;Ceiling Zero&quot; then the game is won, the wonky robot is destroyed, and you get the big gala ending story with a special note from Santa just for you. And yes, this game is a tribute to an old Apple ][ game called Ceiling Zero with mods to make it Christmas themed.</p> <p><strong><span style="color: #ff0000;">H</span><span style="color: #00ff00;">A</span><span style="color: #ff0000;">P</span><span style="color: #00ff00;">P</span><span style="color: #ff0000;">Y</span> <span style="color: #00ff00;">H</span><span style="color: #ff0000;">O</span><span style="color: #00ff00;">L</span><span style="color: #ff0000;">I</span><span style="color: #00ff00;">D</span><span style="color: #ff0000;">A</span><span style="color: #00ff00;">Y</span><span style="color: #ff0000;">S</span> !</strong></p> <p>And please let us know if you found this game to be of fun !</p> <p>Thank you !</p> https://www.lexaloffle.com/bbs/?tid=50537 https://www.lexaloffle.com/bbs/?tid=50537 Wed, 07 Dec 2022 18:21:01 UTC P8 More Than One Off <p> <table><tr><td> <a href="/bbs/?pid=121879#p"> <img src="/bbs/thumbs/pico8_p8mtoo-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=121879#p"> p8mtoo</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=121879#p"> [Click to Play]</a> </td></tr></table> <span style="color: #408080;">(v01 12-05-22)</span><span style="color: #ff80ff;"><br /> <strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #p8mtoo</code></p> <p>This cart is designed for offline use and will let you select any area from your spritesheet and draw it in any other code or even a different cart - without using the spritesheet.</p> <p>Use the arrow keys to navigate.<br /> Try selecting any of the color rectangles to test the system.<br /> Hold down the CTRL key to jump in a grid of 8x8.<br /> Hold down the SHIFT key to start selecting an area. The area is inclusive so the cursor must touch the area borders you want to select.</p> <p>Hold down BOTH CTRL and SHIFT to select in fields of 8x8 where the box is <code>8*size-1</code></p> <p>Press SPACEBAR to save it to the clipboard and you are all set !</p> <hr /> <p>Hello there.</p> <p>I am working on a cart where I have need of both sprite space and mapper space for data yet I need to draw a few elements on the screen. It doesn't need to be very fast for me though.</p> <p>So I came up with &quot;More Than One Off.&quot; Essentially it is a simple program that lets you select any area in the spritesheet, not limited to 8x8 grid, you can select pixels as small as a 2x2 area, save it to a simple string, then let you draw it later.</p> <p>You are encouraged to run more than one Pico-8 task at a time to get the most benefit from this cart.</p> <p>It is also geared to work with more than one-color at a time is why it's called, &quot;More than one off.&quot;</p> <p>Also you can import your own spritesheet if you like to here. You are not limited to the selection I have here and this cart will work in any size, it is not limited to 8x8 or even 8x8 areas. 1x15 pixels or even 117x1 pixels are also possible.</p> <p>For instance, here is a sprite, 8x8 pixels in size:</p> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_76.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_76"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_76.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_76"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_76" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> <code>{gfx}0808444444404888884048999840489a984048999840488888404444444000000000{/gfx}</code></p> <p>Yet for my program we only need the 7x7, not the far bottom or right pixels, so it's actually a bit smaller than copying a single sprite cel, 49x49 versus 64x64.</p> <p><code>pic=&quot;&hearts;●eeeeeeeeiiiiieeijjjieeijkjieeijjjieeiiiiieeeeeeee&quot;</code></p> <p>Then to plot it it's, <code>strspr(pic,x,y)</code> and that's it !</p> <p>To import your own spritesheet use: <code>import spritesheet.png</code></p> <p>Then run this program. Once you have selected the area you want, hit SPACEBAR and it saves that area to the clipboard where it can be pasted in this code or another.</p> <p>Then you just call the strspr() function which is 72-tokens or 145-characters in size to recall the 16-color image clipping.</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> -- p = sprite image string -- x = x-coordinates -- y = y-coordinates -- v = if yes, overwrite black -- 72-tokens -- 145-characters function strspr(p,x,y,v) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>It is not geared for speed but brevity and should cover your needs if you too need to use the entire spritesheet for something other than drawing.</p> <p>The animated dotted bar pattern was made with this tool:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=47049">https://www.lexaloffle.com/bbs/?tid=47049</a></p> <p><span style="color: #a0ffff;"><strong>If you find this program good and useful, please let me know !</strong></span></p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=50511 https://www.lexaloffle.com/bbs/?tid=50511 Tue, 06 Dec 2022 00:11:17 UTC Double Whammy (IF) <p>Hello.</p> <p>I was writing some code and came across this curiosity.</p> <p>Now we all know that if you place a comparison inside parentheses that you neither need the THEN or END command.</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> if (a==b) print(&quot;match&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>However I am doing a comparison inside the comparison, nested, and it does not seem to work.</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> if (x&lt;0) y=y-1 x=5 if (y==12) y=16 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Any ideas on how to get this to work, guys, without using THEN or END, or is this a BUG ?</p> https://www.lexaloffle.com/bbs/?tid=50466 https://www.lexaloffle.com/bbs/?tid=50466 Fri, 02 Dec 2022 16:42:00 UTC