GPI [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=58188 Crash with metatable <p>copy and paste this code (with &quot;puny font&quot;-mode - ctrl+p)</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() storage_readfn={peek,peek2,nil,peek4,[0]=bitread} storage_writefn={poke,poke2,nil,poke4,[0]=bitwrite} storage_adr=0x8000 storage_metabytefield={ __index=function(t,key) return t.read(t.adr+t.byte*key) end, __newindex=function(t,key,value) t.write(t.adr+t.byte*key,value) end, __len=function(t) return t.len end } storage_metadata={ __index=function (t,key) local m=rawget(t,&quot;_storage&quot;) if tonum(key) then local adr,byte,size=unpack(m._num) if (key&gt;0 and key&lt;=size) return storage_readfn[byte](adr+byte*key) elseif m[key] then local adr,byte=unpack(m[key]) return storage_readfn[byte](adr) end end, __newindex=function (t,key,value) local m=rawget(t,&quot;_storage&quot;) if m._num and tonum(key) then local adr,byte,size=unpack(m._num) if (key&gt;0 and key&lt;=size) storage_writefn[byte](adr+byte*key,value) elseif m[key] then local adr,byte=unpack(m[key]) storage_writefn[byte](adr,value) else rawset(t,key,value) end end, __len=function(t) local m=rawget(t,&quot;_storage&quot;) return m._num and m._num[3] or 0 end, __pairs=function(t) local stage,v=1 return function(t,k) --numbers if stage==1 then k+=1 if t._storage._num and k&lt;=#t then v=t[k] else stage,k=2 end end --storage if stage==2 then repeat k,v=next(t._storage,k) until k!=&quot;_num&quot; if (k) v=t[k] else stage=3 end --normal table if stage==3 then repeat k,v=next(t,k) until k!=&quot;_storage&quot; end return k,v end,t,0 end } function storage_reserve(list,table) local oldtable={} table=table or {} table._storage=table._storage or {} setmetatable(table,storage_metadata) local byte=1 for txt in all(split(list,&quot;\n&quot;)) do if (sub(txt,#txt)==&quot;]&quot;) txt=sub(txt,1,#txt-1) local c=ord(txt) if txt==&quot;&quot; or c==45 then --commend elseif c==91 then --[ local size=tonum(sub(txt,2)) table._storage._num={storage_adr-byte,byte,size} storage_adr+=byte*size elseif c==42 then --* byte=tonum(sub(txt,2)) elseif c==62 then --&gt; txt=sub(txt,2) add(oldtable,table) local ntable=setmetatable({_storage={}},storage_metadata) rawset(table,tonum(txt) or txt,ntable) table=ntable elseif c==60 then --&lt; table=deli(oldtable) else table._storage[txt]={storage_adr,byte} storage_adr+=byte end end return table end storage_reserve( [[ &gt;x *1 hallo &gt;welt [3] &lt; -- txt *2 score xyz &gt;player x y &lt; &lt; *1 &gt;data &gt;1 [3] &lt; &gt;2 [3] &lt; &gt;3 [3] &lt; &lt; ]],_ENV) x.hallo=10 x.score=512 x.xyz=0x7fff x.neu=&quot;abc&quot; x.welt[1]=15 x.welt[2]=27 x.welt[3]=33 x.welt[4]=99 x.player.x=1003 x.player.y=1004 for k,v in pairs(x) do ?&quot;entry:&quot;..k..&quot; = &quot;..tostr(v) if type(v)==&quot;table&quot; then for k2,v2 in pairs(v) do ?&quot;entry:&quot;..k..&quot;.&quot;..k2..&quot; = &quot;..tostr(v2) end end end for v in all(x) do ?v end for x=1,3 do for y=1,3 do data[x][y]=y*10+x end end ?data[1] stop()</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>run the code<br /> it should output some code, now type:</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[1]</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>pico-8 will close without error message.</p> https://www.lexaloffle.com/bbs/?tid=149382 https://www.lexaloffle.com/bbs/?tid=149382 Thu, 05 Jun 2025 16:27:30 UTC procgen universe example <p> <table><tr><td> <a href="/bbs/?pid=164689#p"> <img src="/bbs/thumbs/pico8_bubidayode-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=164689#p"> procgen universe example</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=164689#p"> [Click to Play]</a> </td></tr></table> </p> <p>Based on this video:<br /> <a href="https://www.youtube.com/watch?v=ZZY9YE7rZJw">https://www.youtube.com/watch?v=ZZY9YE7rZJw</a></p> <p>Generates a procedural universe - with many suns, planets and moons.</p> <p>And additional to the video, name suns and populated planets.</p> <p>I used the rnd and srand-function from pico8 instead of the own function. </p> <p>You can move with the cursor-keys and click on the suns for more details.</p> https://www.lexaloffle.com/bbs/?tid=148131 https://www.lexaloffle.com/bbs/?tid=148131 Sun, 30 Mar 2025 08:12:38 UTC Name Generator <p> <table><tr><td> <a href="/bbs/?pid=164644#p"> <img src="/bbs/thumbs/pico8_namegenerator-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=164644#p"> namegenerator</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=164644#p"> [Click to Play]</a> </td></tr></table> </p> <p>A simple name generator that should generate reasonably pronounceable names.</p> <p>From a list of approximately 9,000 first names, I created a 26 x 26 table. This table contains the number of times a letter follows another letter.</p> <p>The name is then generated by selecting a letter and determining the next letter based on its probability.</p> <p>edit: stupid mistake in the data-creation - update. Should now generate better names. Also enforce that a vocal is on the first or second place.</p> https://www.lexaloffle.com/bbs/?tid=148106 https://www.lexaloffle.com/bbs/?tid=148106 Sat, 29 Mar 2025 16:00:54 UTC Rockfall <p> <table><tr><td> <a href="/bbs/?pid=164292#p"> <img src="/bbs/thumbs/pico8_gpi_rockfall-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=164292#p"> gpi_rockfall</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=164292#p"> [Click to Play]</a> </td></tr></table> </p> <p>Sourcecode + Stand-alone-versions:<br /> <a href="https://github.com/GPIforGit/rockfall/releases/">https://github.com/GPIforGit/rockfall/releases/</a></p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/rockfall-game_1.gif" alt="" /> <p>Rockfall is my interpretation of Boulder Dash from 1984. You play Rockford, who tunnels through dirt to collect gems. Gems and rocks are fixed until the dirt under them is removed, then they fall and become a hazard.<br /> Your goal is to collect as many gems as possible and leave the cave through the exit. The exit only opens once you've collected enough gems. After completing a cave you get points depending on how many gems you collected and how much time is left. Every 500 points you get an extra life.<br /> Every five caves, you have a chance to earn an extra life in the intermissions. If you fail, you don't lose a life.</p> <h2>Control:</h2> <h3>Title-Screen</h3> <p>X = Start a game<br /> O = Show the solution of the selected cave</p> <h3>Game</h3> <p>direction - move rockford<br /> X - Grow/collect without moving<br /> O - Look around</p> <h2>Elements</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <h3>Rockford</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_27.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_27"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_27.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_27"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_27" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Our little Hero.</p> <h3>Dirt</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_28.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_28"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_28.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_28"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_28" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Rockford can easily dig through dirt. For everyone else, that's an insurmountable obstacle.</p> <h3>Rock</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_29.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_29"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_29.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_29"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_29" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Rocks fall down and are slippery. They can also be moved.</p> <h3>Gem</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_30.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_30"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_30.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_30"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_30" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Collect enough gems to open the exit. Gems also fall and are slippery.</p> <h3>Wall</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_31.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_31"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_31.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_31"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_31" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Gems and rocks slide sideways. They can be destroyed by an explosion.</p> <h3>Metal Wall</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_32.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_32"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_32.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_32"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_32" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> An indestructible obstacle.</p> <h3>Growing Wall</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_33.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_33"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_33.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_33"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_33" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> If the field next to them is empty, they grow into it.</p> <h3>Magic Wall</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_34.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_34"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_34.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_34"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_34" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Magic Walls are activated as soon as a stone or gem falls on them. If there is space under the wall, gems and stones fall through and transform into the other type. After a while, the Magic Wall deactivates and transforms into a Eraser Wall.</p> <h3>Exit</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_35.png" width=64 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_35"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_35.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_35"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_35" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Exits are indestructible. They remain locked until you collect enough gems.</p> <h3>Firefly</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_36.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_36"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_36.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_36"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_36" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Fireflies always move clockwise along the wall. If a heavy object falls on them or they touch the player, amoeba, or slime, they explode.</p> <h3>Butterfly</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_37.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_37"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_37.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_37"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_37" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Similar to fireflies, only they move counterclockwise. When they explode, nine gems are created.</p> <h3>Amoeba</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_38.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_38"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_38.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_38"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_38" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Amoeba grow slowly at first, but accelerate after a while. When they run out of room to grow, they transform into gemstones. However, when they grow too large, they form rocks.<br /> As a small simplification, the amoeba grows significantly faster if Rockford stands around bored for a while.</p> <h3>Slime</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_39.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_39"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_39.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_39"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_39" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Rocks and gems only stay on the slime for a short time and then fall through.</p> <h3>Eraser Wall</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_40.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_40"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_40.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_40"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_40" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Destroy every rock and gem that lands on them.<br /> </div></div></div></p> <h2>Caves</h2> <p>All caves are new or reinterpretations from Boulder Dash. Those who prefer the original caves should look further down.<br /> Don't forget: You can display a solution by pressing O on the title screen.</p> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <h3>Cave A: Intro</h3> <p>Simply collect all the gems.</p> <h3>Cave B: Labyrinth</h3> <p>Dig your way up. Be especially careful of the falling rocks. Not all of the gems are needed.</p> <h3>Cave C: Loop</h3> <p>Your first encounter with the Fireflies. Try to trap them in an endless cycle.</p> <h3>Cave D: Pit</h3> <p>To collect enough gems, the rocks must fall through the magic wall.</p> <h3>Intermission 1: Falling Down</h3> <p>Timing is key here. Only if the rock falls on the butterfly in time will you receive enough gems.</p> <h3>Cave E: Matrix</h3> <p>Just don't be greedy. If you collect too many gems in one column, they'll fall uncontrollably.</p> <h3>Cave F: Guards</h3> <p>The fireflies need more space, then you can take the gems safely.</p> <h3>Cave G: Rooms</h3> <p>Be careful, the cave is folded in on itself. Falling gems cannot be collected.</p> <h3>Cave H: Puck</h3> <p>A small, famous labyrinth. Avoid enemies and collect all the gems.</p> <h3>Intermission 2: Diagonal</h3> <p>Zigzagging towards the exit.</p> <h3>Cave I: Judgment Day</h3> <p>Remember, butterflies explode when they touch the amoeba.</p> <h3>Cave J: Hourglass</h3> <p>Be careful, otherwise your treasures will fall on your head.</p> <h3>Cave K: Butterflies</h3> <p>Falling gems can also kill butterflies.</p> <h3>Cave L: Averlanche</h3> <p>Prevent the gems from falling by placing yourself next to them.</p> <h3>Intermission 3: Circle</h3> <p>Just run through from the right side.</p> <h3>Cave M: Snail</h3> <p>Create as much space as possible to avoid the fireflies.</p> <h3>Cave N: Timing</h3> <p>A few smaller puzzles. Try to &quot;catch&quot; the butterflies in a crevice to make them easier to kill.</p> <h3>Cave O: Demolition</h3> <p>Blast through the walls with the help of the fireflies.</p> <h3>Cave P: Skip It!</h3> <p>It's actually possible to collect 54 gems if you approach it from the right angle and pay attention to the cave title.</p> <h3>Intermission 4: Prision</h3> <p>If you pull out the right &quot;brick&quot;, the gem falls out.<br /> </div></div></div></p> <h2>Level Editor</h2> <p>There is also a level editor:<br /> <a href="https://github.com/GPIforGit/rockfall">https://github.com/GPIforGit/rockfall</a><br /> You need the rockfall-game.p8 and the rockfall-editor.p8 - don't rename them! Copy both to a new directory.<br /> First you should edit the edition and author variables in rockfall-game. Don't use spaces in the edition-variable. Before you export the game, you should run it ones - it will automatically import all levels from the level-editor.</p> <h2>Boulder Dash I + II</h2> <p>And as a bonus: all levels from Boulder Dash I+II as &quot;classic-edition&quot;:<br /> <table><tr><td> <a href="/bbs/?pid=164292#p"> <img src="/bbs/thumbs/pico8_gpi_rockfall_classic-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=164292#p"> gpi_rockfall_classic</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=164292#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Additional Information:</h2> <p><a href="https://www.boulder-dash.nl/">https://www.boulder-dash.nl/</a><br /> <a href="https://codeincomplete.com/articles/javascript-boulderdash/">https://codeincomplete.com/articles/javascript-boulderdash/</a><br /> <a href="https://web.archive.org/web/20231129174205if_/http://www.bd-fans.com/Files/FanStuff/Programming/decodecaves.c">https://web.archive.org/web/20231129174205if_/http://www.bd-fans.com/Files/FanStuff/Programming/decodecaves.c</a><br /> <a href="https://boulder-dash.com/">https://boulder-dash.com/</a></p> https://www.lexaloffle.com/bbs/?tid=148006 https://www.lexaloffle.com/bbs/?tid=148006 Sun, 23 Mar 2025 15:37:27 UTC Jumpguy - jump'n'run tech demo <p> <table><tr><td> <a href="/bbs/?pid=135826#p"> <img src="/bbs/thumbs/pico8_jumpguy-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=135826#p"> jumpguy</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=135826#p"> [Click to Play]</a> </td></tr></table> <br /> I work at the moment on a jump'n'run-Game. One of my goals are to have a better camera-control than simple center the player in the middle, the camera should &quot;look ahead&quot;.</p> <p>Don't expect any game here, it is more a &quot;prove of concept&quot;-demo.</p> <p>Control:<br /> X for jump<br /> o for grabing things</p> <p>down+jump - fall down on &quot;half-tiles&quot;<br /> stand+up - look up<br /> stand+down - look down.</p> <p>there is a coyote-time, that you can jump for a short time, when you run over a &quot;cliff&quot;.<br /> up - run on &quot;half-tiles-slopes&quot; (the green on the right side, behind the &quot;secret&quot;-Wall</p> https://www.lexaloffle.com/bbs/?tid=54557 https://www.lexaloffle.com/bbs/?tid=54557 Fri, 13 Oct 2023 07:05:15 UTC memset(0x8000,0,0x8000) <p>it is not possible to delete the high-memory with one memset-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> poke(0x8000,1) poke(0xffff,1) ?peek(0x8000)--1 ?peek(0xffff)--1 memset(0x8000,2,0x8000) ?peek(0x8000)-- still 1 / should 2 ?peek(0xffff)-- still 1 / should 2 memset(0x8000,2,0x7fff) -- ?peek(0x8000)--2 ?peek(0xffff)--1</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>the first memset is ignored, because 0x8000 is -1</p> https://www.lexaloffle.com/bbs/?tid=54407 https://www.lexaloffle.com/bbs/?tid=54407 Sun, 01 Oct 2023 15:57:38 UTC Puzzle Duck <h1>Puzzle Duck</h1> <p> <table><tr><td> <a href="/bbs/?pid=134948#p"> <img src="/bbs/thumbs/pico8_puzzle_duck-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=134948#p"> puzzle_duck</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=134948#p"> [Click to Play]</a> </td></tr></table> </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/puzzle duck-2_0.png" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/puzzle duck-2_1.gif" alt="" /> <p>A simple Puzzle Bobble / Bust-a-Move - Clone. </p> <p>from <a href="https://en.wikipedia.org/wiki/Puzzle_Bobble">URL Wikipedia</a>:<br /> Puzzle Bobble,[b] internationally known as Bust-A-Move, is a 1994 tile-matching puzzle arcade game developed and published by Taito. </p> <p>At the start of each round, the rectangular playing arena contains a prearranged pattern of colored &quot;bubbles&quot;. At the bottom of the screen, the player controls a device called a &quot;pointer&quot;, which aims and fires bubbles up the screen. The color of bubbles fired is randomly generated and chosen from the colors of bubbles still left on the screen.</p> <p>The objective of the game is to clear all the bubbles from the arena without any bubble crossing the bottom line. Bubbles will fire automatically if the player remains idle. After clearing the arena, the next round begins with a new pattern of bubbles to clear. [...] The fired bubbles travel in straight lines (possibly bouncing off the sidewalls of the arena), stopping when they touch other bubbles or reach the top of the arena. If a bubble touches identically-colored bubbles, forming a group of three or more, those bubbles&mdash;as well as any bubbles hanging from them&mdash;are removed from the field of play, and points are awarded. After every few shots, the &quot;ceiling&quot; of the playing arena drops downwards slightly, along with all the bubbles stuck to it. The number of shots between each drop of the ceiling is influenced by the number of bubble colors remaining. [...] If they cross the line at the bottom then the game is over. </p> <h2>Special bubbles</h2> <h3>Fire</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_21.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_21"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_21.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_21"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_21" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> When you shoot on a fire bubble, it exploded.</p> <h3>Water</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_22.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_22"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_22.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_22"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_22" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> When a bubble hit the water bubble, all bubble below it will be recoloured to the colour of the hitting bubble.</p> <h3>Flash</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_23.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_23"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_23.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_23"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_23" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Destroy all bubbles left or right from hit.</p> <h3>Joker</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_24.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_24"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_24.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_24"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_24" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> Remove all bubbles with the same colour of the hitting bubble.</p> <h2>Game modes</h2> <h3>Puzzle</h3> <p>Single player game, simple clear all 99 levels.</p> <h3>VS CPU</h3> <p>Play against a cpu all 99 levels. At the beginning the cpu is very slow and stupid, but will increase in the higher levels.<br /> You can send bubbles to the cpu field, when you drop bubbles from your field. </p> <h3>VS Human</h3> <p>Two player game. Every player has three lives. When you win a round, you steal a live from your opponent.</p> <h2>Editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/puzzle duck-2_1.png" alt="" /> <p>There is an inbuilt level editor, to run it, load the cartridge and type</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>run &quot;edit&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>With left/right choose your level, left click will place a bubble, right click will remove it. To store the level, hit the S-Key or click on the save button. Don't forget to save the Cartridge (ctrl+s) otherwise your work will lost.</p> <p>Feel free to publish your own level pack!</p> <h2>Download</h2> <p>Download for native windows, mac, linux and raspi version can be found here: <a href="https://gpi.itch.io/puzzle-duck">https://gpi.itch.io/puzzle-duck</a></p> <h2>Music</h2> <p>Puzzle Bobble Main Theme<br /> Composition by &lrm;Kazuko Umino and Yasuko Yamada</p> <p>Pico-8-Version based on the version from Thomas Alberg<br /> <a href="https://musescore.com/user/17124701/scores/3979026">https://musescore.com/user/17124701/scores/3979026</a></p> https://www.lexaloffle.com/bbs/?tid=54300 https://www.lexaloffle.com/bbs/?tid=54300 Wed, 27 Sep 2023 10:20:53 UTC [manual]for TBL[FN()]+=1, FN() will be called twice <p>according to the manual:</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 += 2 -- EQUIVALENT TO: A = A + 2 // note that the LHS appears twice, so for TBL[FN()]+=1, FN() will be called twice.</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>ok, let's test it:</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 fn() print(&quot;in function&quot;) return 1 end f={ 10 } print(&quot;f[1] is &quot;..f[1]) f[fn()]+=1 print(&quot;f[1] is &quot;..f[1])</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>the function fn is only called once! </p> https://www.lexaloffle.com/bbs/?tid=54299 https://www.lexaloffle.com/bbs/?tid=54299 Wed, 27 Sep 2023 09:42:50 UTC Mosaik <p> <table><tr><td> <a href="/bbs/?pid=120604#p"> <img src="/bbs/thumbs/pico8_mosaik-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=120604#p"> mosaik</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=120604#p"> [Click to Play]</a> </td></tr></table> </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/mosaik_2.png" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/mosaik_1.png" alt="" /> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/mosaik_0.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=50205 https://www.lexaloffle.com/bbs/?tid=50205 Sun, 13 Nov 2022 13:24:29 UTC Crillion <p> <table><tr><td> <a href="/bbs/?pid=119855#p"> <img src="/bbs/thumbs/pico8_crillion-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=119855#p"> crillion</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=119855#p"> [Click to Play]</a> </td></tr></table> </p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/crillion_1.gif" alt="" /> <p>A very simple game. Your goal is to destroy all blocks. The problem: You can only move the ball horizontally, the ball moves up and down automatically. </p> <p>Crillion is an adaptation of the game of the same name on the C64. This release contains the levels of the three official Crillion releases: Crillion, Crillion '93 (hard), Crillion II (very hard). In addition, the levels of Brainion are included, which are designed more than puzzles. And &quot;Junior&quot; from Crillion Junior - a very easy level set.</p> <h1>Rules</h1> <h2>Block</h2> <p> <table><tr><td width=256> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_15.png" width=256 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_15"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_15.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_15"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [64x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_15" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> In order for the blocks to break, the ball must be the same color as the blocks. </p> <h2>Changer</h2> <p> <table><tr><td width=256> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_19.png" width=256 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_19"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_19.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_19"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [64x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_19" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> This allows the ball to be colored. </p> <h2>Skulls</h2> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_17.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_17"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_17.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_17"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_17" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Skulls destroy the character. </p> <h2>Rings</h2> <p> <table><tr><td width=256> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_18.png" width=256 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_18"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_18.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_18"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [64x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_18" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Rings can be pushed in one direction if the color matches the ball.</p> <h1>Download</h1> <p>Binaries for Linux, MacOs, Raspi and Windows:<br /> <a href="https://github.com/GPIforGit/crillion/releases">https://github.com/GPIforGit/crillion/releases</a></p> <h1>Episodes</h1> <p>This release contains the levels from </p> <h2>Crillion</h2> <p>Published in Happy Computer, 1988/07<br /> <a href="https://archive.org/details/happycomputer-magazine-1988-07/page/n51/mode/2up">https://archive.org/details/happycomputer-magazine-1988-07/page/n51/mode/2up</a><br /> By Oliver Kirwa<br /> <a href="https://www.c64-wiki.com/wiki/Crillion">https://www.c64-wiki.com/wiki/Crillion</a></p> <h2>Crillion '93</h2> <p>Published in 64'er Sonderheft 85<br /> <a href="https://archive.org/details/64er_sonderheft_85/page/n5/mode/2up">https://archive.org/details/64er_sonderheft_85/page/n5/mode/2up</a><br /> <a href="http://www.homecomputerworld.com/64ersh.html">http://www.homecomputerworld.com/64ersh.html</a><br /> By Oliver Kirwa<br /> <a href="https://www.c64-wiki.com/wiki/Crillion_%2793">https://www.c64-wiki.com/wiki/Crillion_%2793</a></p> <h2>Crillion II</h2> <p>Published in 64'er Sonderheft 54<br /> <a href="https://archive.org/details/64er_sonderheft_54/page/n7/mode/2up">https://archive.org/details/64er_sonderheft_54/page/n7/mode/2up</a><br /> By Oliver Kirwa</p> <h2>Brainion</h2> <p>Published in &quot;Digital Talk #104&quot;<br /> <a href="https://digital-talk.github.io/">https://digital-talk.github.io/</a><br /> By &quot;The Joker&quot; and &quot;Dr.Guru&quot;<br /> <a href="https://www.c64-wiki.de/wiki/Brainion">https://www.c64-wiki.de/wiki/Brainion</a></p> <h2>Crillion Junior</h2> <p><a href="https://www.c64games.de/phpseiten/spieledetail.php?filnummer=7614">https://www.c64games.de/phpseiten/spieledetail.php?filnummer=7614</a><br /> by holy moses</p> <h1>Level editor</h1> <p>A level editor is available. It is based on &quot;jaP8e&quot; ( <a href="https://www.lexaloffle.com/bbs/?tid=49307">https://www.lexaloffle.com/bbs/?tid=49307</a> ) and must be copied to the &quot;libs&quot; directory of &quot;jaP8e&quot;.<br /> <a href="https://github.com/GPIforGit/crillion/blob/main/moduleCrillion.lua">https://github.com/GPIforGit/crillion/blob/main/moduleCrillion.lua</a></p> <h1>Credits:</h1> <p>Oliver Kirwa for Crillion, Crillion'93, Crillion-Construction-Kit and Crillion II.</p> <p>&quot;The Joker&quot; and &quot;Dr.Guru&quot; for Brainion</p> <p>holy moses for &quot;Crillion Junior&quot;</p> <p>Darrell Flood for the &quot;Sloppy Paint&quot; font (used for the Logo)<br /> <a href="https://www.dafont.com/de/sloppy-paint.font">https://www.dafont.com/de/sloppy-paint.font</a></p> https://www.lexaloffle.com/bbs/?tid=49973 https://www.lexaloffle.com/bbs/?tid=49973 Sun, 30 Oct 2022 13:23:22 UTC Request - Developer Mode <p>SDK-Units of consoles have normally more memory.</p> <p>This can be useful during developing - simple try something without care about limits. Or store additional debug information.</p> <p>it would be nice, if pico-8 would emulate this.</p> <p>This can be done very simple:<br /> The project must be saved as &quot;.p8&quot;-utf8-file.<br /> When the project hit the limit of characters, compressed size and token it will display the known warning with a little addition: &quot;Ignore? (Project can't be exported!) (y/n):&quot; - when you hit y - it will start anyway. Save as .p8 is always possible, since there are no limits.<br /> Of course the export to bin, web, rom, png or whatever is not possible. also the cli-command &quot;-run&quot; should not work on this oversized p8. </p> <p>This would be usfull, when you want to check, if something work. Or when you developed a tool / level editor for a game, which you don't want to share. </p> <p>additional it would be nice to have an debug - enddebug - 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> function test(a,b) debug if not a or not b then print(&quot;this should not happen! Got nils!&quot;) end enddebug ... 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>this code should only start when pico-8 is in devoloping-mode.<br /> when it saved to p8.png ( or p8.rom, bin, web), pico-8 should interpret this as comment.</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 test(a,b) --[[ if not a or not b then print(&quot;this should not happen! Got nils!&quot;) 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 the token-limit should not be affect by the debug - enddebug block.</p> https://www.lexaloffle.com/bbs/?tid=49573 https://www.lexaloffle.com/bbs/?tid=49573 Sat, 01 Oct 2022 19:34:32 UTC Custom font with variable width and latin letters <p> <table><tr><td> <a href="/bbs/?pid=118120#p"> <img src="/bbs/thumbs/pico8_variablefont-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=118120#p"> variablefont</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=118120#p"> [Click to Play]</a> </td></tr></table> <br /> A very simple font. A little bit bigger than the original, but better readable.<br /> the UTF Latin-1-Suppliment-Characters are included instead the Japanese characters.</p> <p>type</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> load &quot;#variablefont&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>in pico-8 to load the cartridge.</p> <p>Created with jaP8e - <a href="https://www.lexaloffle.com/bbs/?tid=49307">https://www.lexaloffle.com/bbs/?tid=49307</a></p> https://www.lexaloffle.com/bbs/?tid=49517 https://www.lexaloffle.com/bbs/?tid=49517 Wed, 28 Sep 2022 18:08:46 UTC [bug] compression error <p>I tried to decompress the source code of my dithering-demo:<br /> <a href="https://www.lexaloffle.com/bbs/?tid=49309">https://www.lexaloffle.com/bbs/?tid=49309</a><br /> and my code failed.</p> <p>First i thought my code is wrong, I translated from this source:<br /> <a href="https://github.com/dansanderson/lexaloffle/blob/main/pxa_compress_snippets.c">https://github.com/dansanderson/lexaloffle/blob/main/pxa_compress_snippets.c</a><br /> the decompress-code to lua, so it is possible that I made a mistake.</p> <p>I can't find a erro, so I looked at the rom-data:</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> 4300 00 70 78 61 03 BC 02 39 02 40 C1 AC CE 6D 8C 2E .pxa.&frac14;.9.@&Aacute;&not;&Icirc;m&OElig;. </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>the first 8 bytes (00 70 78 61 03 BC 02 39) are the header, so the first databyte is 02<br /> or binary: 00000010</p> <p>When I look in decompress 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> while (src_pos &lt; comp_len &amp;&amp; dest_pos &lt; raw_len &amp;&amp; dest_pos &lt; max_len) { int block_type = getbit(); // printf(&quot;%d %d\n&quot;, src_pos, block_type); fflush(stdout); if (block_type == 0) { // block int block_offset = getnum() + 1; int block_len = getchain(BLOCK_LEN_CHAIN_BITS, 100000) + PXA_MIN_BLOCK_LEN; // copy // don't just memcpy because might be copying self for repeating pattern while (block_len &gt; 0){ out_p[dest_pos] = out_p[dest_pos - block_offset]; dest_pos++; block_len--; } </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 read the first bit (a zero) from 0x02 and go through the block_type==0 code.<br /> At this moment the out_p is complete empty and dest_pos is 0, so when the code comes to &quot;out_p[dest_pos] = out_p[dest_pos - block_offset];&quot; it copied data BELOW the output-buffer.</p> https://www.lexaloffle.com/bbs/?tid=49311 https://www.lexaloffle.com/bbs/?tid=49311 Mon, 12 Sep 2022 20:31:32 UTC Dithering demo <p> <table><tr><td> <a href="/bbs/?pid=117283#p"> <img src="/bbs/thumbs/pico8_yemapepoke-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=117283#p"> yemapepoke</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=117283#p"> [Click to Play]</a> </td></tr></table> </p> <p>A little demo of importing dithered pictures. The rom contain 3 pictures, switch with x/o.</p> <p>Images are created with jaP8e<br /> <a href="https://www.lexaloffle.com/bbs/?tid=49307">https://www.lexaloffle.com/bbs/?tid=49307</a></p> https://www.lexaloffle.com/bbs/?tid=49309 https://www.lexaloffle.com/bbs/?tid=49309 Mon, 12 Sep 2022 16:50:04 UTC jaP8e - Editor for code, graphic, charset, sound <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/mainwindow.gif" alt="" /> <h2>Features</h2> <ul> <li>Source code in lua! </li> <li>Editor for sprite, map, sound, music, charset</li> <li>Map editor with support of custom width / size</li> <li>Name sound and music</li> <li>Custom palette with the extended 128+ color-ids (32 Colors in total)</li> <li>Charset editor with possible to export single characters and variable width</li> <li>Hex editor to copy &amp; past memory to pico-8 string (<a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Raw_memory_writes">URL raw memory access format</a> )</li> <li>Modular design</li> <li>Import images as sprite sheet, map(!), label - with optional dithering</li> </ul> <h1>IMPORTANT</h1> <p>This is a beta release! This means, there are bugs, the program can crash. Make backups before using the editor.</p> <h1>Download</h1> <p><a href="https://github.com/GPIforGit/jaP8e/releases">https://github.com/GPIforGit/jaP8e/releases</a></p> <h2>basic control/setup</h2> <h3>Set the path to pico-8.exe</h3> <p>jaP8e needs to know where the pico-8 execute is. Choose in the Menu the &quot;Pico-8&quot; &gt; &quot;Set Pico8 exectuable&quot; option to set the path. Otherwise it can't run any code or playback sound.</p> <h3>Pico-8 Remote</h3> <p>Since I don't know how to program sounds like in pico-8, jaP8e can't playback sound by default. But it is possible to start a &quot;Remote&quot;-pico-8, which runs in the background and is controlled by jaP8e. Activate this option in the &quot;Pico-8&quot;-menu. After this you can playback any sound effect and music during jaP8e.<br /> This function starts a pico-8 with the remote.p8 file in the background. I send commands through stdin/stdout to this remote.</p> <h3>Change Values in the grey input boxes</h3> <p>You can change the values of the grey input boxes by left click in it and use the keyboard. Alternative you can press and hold the right mousebutton and change the value with x-mouse-movement. The third possibility is to use the mouse wheel over the input fields.</p> <h3>basic layout</h3> <p>On the top you find the modules-tab to switch the editors. On the right top side are currently open files. A Star in the file name indicates that the file has unchanged data.</p> <h3>memory layout</h3> <p>jaP8e &quot;simulate&quot; the memory of pico-8, with a rom and ram section. The rom-section is stored normaly like pico8 does and can access normaly. RAM is stored as meta-data and can't access directly in pico-8, but you can export ram as string to copy in the source code (HEX-Editor).<br /> Also you can reposition the map, sprite, sound, music, spriteflags to any memory location, even when pico 8 doesn't support it.<br /> For example, when you don't use a map in your pico-8-project, you can store there additional sprite data. Simple reposition the sprite to 0x1000 to draw in the map-data. In pico-8 you must manually copy the memory (memcpy) to access this additional sprite data. </p> <h3>Error-message and disable a module</h3> <p>When a error happen, a message box with ok and cancel will open. With ok jaP8e will ignore the error. With cancel the module which cause the error will disabled. At least you can try to save your work when a error happen.</p> <h2>Source Editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/mainwindow.gif" alt="" /> <p>on the left side of the window you find some information tabs:</p> <h3>Functions</h3> <p>display every function that jaP8e found in the current tab. Also all comments which start and end with &quot;--&quot; should be visible here.<br /> You can click in the list to jump to the position.<br /> When the cursor in the source code is inside a function, this function will be highlighted in the list.</p> <h3>Sprites</h3> <p>Fast display of all sprites. When you select a number in the source code, the sprite with the same id is highlighted.<br /> Click on a sprite will add the id-nummer in the source code</p> <h3>Charset</h3> <p>Click on a char to add this in the source code.</p> <h3>Sound</h3> <p>When you select a number in the source code, the sound with the same id is highlighted. Press ALT + SPACE to playback this sfx.</p> <h3>Music</h3> <p>same as sound</p> <h3>Palette</h3> <p>show the custom palette (when not changed, this is identical to default), the default palette and the extended palette</p> <h3>Source code editor</h3> <p>Should react nearly the same as the default editor in Pico-8 with some extras. Tabs work as in Pico 8 - simple click in the &quot;+&quot; above. You can also name the tabs, when the first line is a comment.<br /> When you select a word, it will highlight this word in the complete source code. Also when the cursor is over the a brace the matching other brace is highlighted.<br /> When you don't like the color-scheme, you can edit the jaP8e.ini file.<br /> By default the puny-font is disabled and a normal font is used, so all text should be written in lower case!<br /> Copy &amp; past will always ignore the puny-setting.<br /> Look in the menu for many additional functions / keyboard shortcuts.</p> <h2>Map editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/map.gif" alt="" /> <p>On the left side you can select a Sprite - you can select more than one.<br /> Grid add a grid, id will display the ids, flags draw a bar with the spriteflags and count shows how often a sprite is used in the map.<br /> With CTRL + Click the current Sprite will exchange the position in the Spritesheet and the map will be corrected.<br /> With CTRL + SHIFT + Click it will exchanged without correction.</p> <p>You can also quick-select patterns in the map by right click and hold. Middle-Mouse button will scroll and the wheel will change the zoom.</p> <p>Below you find some options:<br /> Grid will add a grid to the map, ID will draw the ids of the tiles, when find is active, the selected sprites of the sprite sheet will highlighted in the map.<br /> Also you have different tools like stamp, line etc.<br /> With POS you can change the position of the map in the memory and Width will change the width of the map.<br /> With Background you can select a color to change the background.</p> <p>You can quickselect a sprite with the shift/a/s/d/w-keys</p> <p>In the Menu with File &gt; import &gt; map image you can import an image as Map! The image will sliced in tiles and added to the sprite sheet, when an empty slot is available.</p> <h2>Sprite editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/sprite.gif" alt="" /> <p>Control nearly the same as the map editor.<br /> POS and FLAG-Buttons will change where the sprite / spriteflags are located in the memory.<br /> Set Icon will change the icon when you export an binary.<br /> Right click on the color to change the palette.<br /> Important: Palette changes are stored in the ram-section and must be exported in the hex editor to the source code.</p> <h2>Sound editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/sound.gif" alt="" /> <p>Should work like the original pico-8 editors. Like in sprites you can with CTRL+Click / CTRL+SHIFT+Click exchange the SFX.<br /> You can additonal name a SFX with 8 characters. This information is stored in the meta-data of the p8-file and is only for your information and not directly useable in pico8.</p> <h2>Music editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/music.gif" alt="" /> <p>Can do the same as the pico8 editor.<br /> When you paste a music, the sfx-pattern will be insert at top by default (pico 8 start at bottom). You can change this behaviour in the edit-menu.</p> <h2>Label editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/label.gif" alt="" /> <p>Also very basic. You can import an image with the file-&gt;import-&gt;label image in the menu bar. In the settings-menu you can select activate dithering.</p> <h2>Charset editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/charset.gif" alt="" /> <p>Important note: Charset is always located in the memory section (0x5600). When you want to use it, you must copy it in the hex editor!<br /> Work like the Sprite editor, but only with two colors. On the right button you can set some basic settings. Variable font with is supported, when you activate &quot;Adj.Enable&quot;, then you can use the &quot;Adj&quot;-field to change the with of the current char (like in the picture, I is here only 2 pixel with.<br /> When you click on the &quot;lazy dog&quot; text you can switch between different example text.<br /> When you ctrl+c on a char, it will copy as a string, that can be use directly in pico 8 <a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#One_off_characters">URL pico8-manual</a>. In the edit - menu you can select between binary-char and hexadecimal-char version.<br /> Of course you can paste chars in both formats.</p> <h2>hex editor</h2> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/58188/hex.gif" alt="" /> <p>On the left side you have some select buttons. The &quot;ROM&quot; button select the default position of the items. Under &quot;RAM&quot; you can select some areas which are used by jaP8e. When you move the Sprite/Map/and so on with the &quot;POS&quot;-button, you can select the area here with the &quot;POS&quot;-mark.<br /> The Hex-Buttons below select the memory 0x8000 - 0xff00 location. Click with shift to select to the end of this memory-block.<br /> You can Copy &amp; Paste memory blocks. It is stored as string in the clipboard in the <a href="https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Raw_memory_writes">URL raw memory access format</a> and can be simple copied in the source code!<br /> For example the default palette from memory look 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> \^@5f100010\0&sup1;&sup2;&sup3;⁴⁵⁶⁷⁸\t\nᵇᶜ\rᵉᶠ </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>IMPORTANT all data above 0x4300 are saved as meta-data and are not accessible directly by a pico-8 program.</p> <h2>pico-8-support</h2> <p>In the Pico-8 menu you can start your project. At default jaP8e switch to write protect mode and will reload after pico8 is closed (this can be disabled in the pico-8 menu). Your project must be saved before this will work.<br /> You can also export here binarys (you can select a icon in the sprite editor), webpage, .p8.png and more.<br /> The RAM-Section of the current project will be stored as meta data in the .p8 - file. This is way jaP8e can only p8 files directly.</p> <h1>what is luatik?</h1> <p>Luatik is my lua interpreter variant. I patch lua with some features (auto load libraries, += -= is possible and some other goodies). Look in the lunatik-order to get more information.<br /> <a href="https://github.com/GPIforGit/Luatik">https://github.com/GPIforGit/Luatik</a></p> https://www.lexaloffle.com/bbs/?tid=49307 https://www.lexaloffle.com/bbs/?tid=49307 Mon, 12 Sep 2022 15:56:08 UTC [Request] Print (text,&quot;center&quot;,y) <p>I think, that it is common to print a text in center of the screen.</p> <p>With the variable font it become a little bit complicated..<br /> When the text is variable we must do 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> str = &quot;text&quot; len = print(str,0,-0x4000) -- print outside to get the length print(str, 64-len\2, 128) </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 be nice, when instead of the x-coordinate a string with the position could be added</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> str = &quot;text&quot; print(str, &quot;center&quot;, 128) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>possible &quot;key-words&quot; would be: &quot;left&quot;, &quot;center&quot;, &quot;right&quot;<br /> for y would be &quot;top&quot;, &quot;center&quot;, &quot;bottom&quot;</p> <p>btw. a &quot;printsize&quot; function would be nice, don't draw anything, only return width and height in pixels.</p> https://www.lexaloffle.com/bbs/?tid=49302 https://www.lexaloffle.com/bbs/?tid=49302 Mon, 12 Sep 2022 10:30:05 UTC The Laboratories of Dr. Creep <p> <table><tr><td> <a href="/bbs/?pid=99419#p"> <img src="/bbs/thumbs/pico8_drcreep-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=99419#p"> drcreep</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=99419#p"> [Click to Play]</a> </td></tr></table> </p> <p>Recreation of a C64 classic: Castles of Dr. Creep.<br /> Compared to the original there are some changes, on the one hand because the layout is different (40x24 vs 16x16), on the other hand because I have defused some &quot;backtracking&quot; and death traps. Nevertheless, please note, the levels are from 1984 - there you have something different design.</p> <h1>Story</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> So, you're looking for a place to work? Something special, challenging, with a good salary? Well, we have just the thing for you.<br /> Many different options open for your inspection. Just step inside ... Oh? You want to leave already? I'm afraid that's simply not possible ... not until you have taken the complete tour.<br /> You'll notice that we have all the modern conveniences. Electrostatic energy generators to warm things up. Piped-in music which I'm sure you will find quite haunting. Doors galore, and you never know what you will find on the other side. Once the death rays start lining up behind you, however, I know you will be eager to find out.<br /> You may want to step lively over trap doors and through the force fields - we've lost several potential applicants that way. Over there, of course, is mummy's room. Mummy seems to be all wrapped up at the moment, but probably not for long. And a break room? At the Laboratories, all the rooms are restful, although many of the occupants are not.<br /> Neighbours, you ask? I Know you will love them. Frankenstein's Monster just seems to pop up whenever you least expect him.<br /> Well, I really must be leaving now. I'm sure you can find your way around. Don't be alarmed. There's a key in here somewhere. You will find your way out eventually... and if not, Doctor Creep will be back shortly and you can help him with his, ah, experiments.<br /> Goodbye now ... and good luck.<br /> </div></div></div></p> <h1>Playing the game</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> You are captured in a Laboratories and your goal is to escape.<br /> Open a map with 🅾️.<br /> In the pause menu you can save a game state. Note that the status is stored before entering the room.<br /> </div></div></div></p> <h2>Obstacles</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"></p> <h3>Player</h3> <p> <table><tr><td width=32> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_1.png" width=32 height=32> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_1"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_1.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_1"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [8x8]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_1" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </p> <h3>Doors and Doorbells</h3> <p> <table><tr><td width=96> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_2.png" width=96 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_2"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_2.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_2"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [24x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_2" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> One way to open a door is to use the doorbell. Operate the doorbell by standing in front of it and pressing the ❎ button. To go out an open door, stand in front of the door and press ⬆️ or ❎.</p> <h3>Ladders</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_3.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_3"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_3.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_3"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_3" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> To get on a ladder, stand directly behind it and push ⬆️ or ⬇️. You can get off of a ladder whenever your feet are even with the front of a walkway.</p> <h3>Sliding Poles</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_4.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_4"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_4.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_4"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_4" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> To get on a sliding pole, stand directly in front of it and pull ⬇️. you cannot climb up the sliding poles. You can get off of a pole whenever your feet are even with the middle of a walkway.</p> <h3>Lightning Machine</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_5.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_5"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_5.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_5"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_5" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Turn the sparks on or off by standing in front of the switch and push ⬆️,⬇️,❎.</p> <h3>Force Field</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_6.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_6"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_6.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_6"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_6" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Turn off the force field by standing in front of the control and pushing ❎. The force field will remain off for a few seconds after the button is released.</p> <h3>Mummy</h3> <p> <table><tr><td width=128> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_7.png" width=128 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_7"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_7.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_7"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [32x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_7" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> When you run in front of the ankh, the mummy slides out of its tomb. Mummies are<br /> too stiff to use ladders or sliding poles.</p> <h3>Locks and Keys</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_8.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_8"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_8.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_8"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_8" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> To pick up a key, stand in front of it and push ❎. You can open a lock only after you have picked up a key of matching color. Stand in front of the lock and push ❎.</p> <h3>Ray Gun</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_9.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_9"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_9.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_9"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_9" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Operate the gun by standing in front of the control and using ⬆️ and ⬇️ to aim and ❎ to fire. The gun fires automatically when it is at the same level as a player.</p> <h3>Matter Transmitter</h3> <p> <table><tr><td width=96> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_10.png" width=96 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_10"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_10.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_10"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [24x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_10" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> Stand in the booth and hold ⬆️ until the color in the booth matches the color of the desired receiver oval. Push ❎ to transmit.</p> <h3>Trapdoor</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_11.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_11"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_11.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_11"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_11" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> The trapdoor opens or closes whenever anyone runs in front of the control.</p> <h3>Frankensteins Monster</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_12.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_12"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_12.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_12"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_12" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> When you walk in front of his coffin, frankensteins monster awakens and begins to chase you. frankensteins monster is able to use the ladders and sliding poles.</p> <h3>Conveyor Belt</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_13.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_13"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_13.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_13"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_13" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> To change the motion of the conveyor belt, stand in front of the control and push ❎.</p> <h3>The exit Door</h3> <p> <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/58188_14.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_58188_14"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/58188_14.txt", function (retdata){ var el = document.getElementById("gfxcode_58188_14"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_58188_14" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> The door at the right leads out of the laboratory. When you go out this door you have escaped.<br /> </div></div></div></p> <h1>Editor</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> <a href="https://github.com/GPIforGit/The-Laboratories-of-Dr.-Creep/releases">https://github.com/GPIforGit/The-Laboratories-of-Dr.-Creep/releases</a> - download the assets</p> <p>There is a editor, splitted in several files:<br /> creep.p8 - the game - stand-alone<br /> creepbuild.p8 - pack all the data and store it in creep.p8<br /> creepedit.p8 - the level-editor</p> <p>And some data - no lua code here. Also only parts of the p8 are packed from this files:<br /> creep_endscreen.p8 - the End-Screen, must be placed completely in the shared gfx rom!<br /> creep_levels.p8 - the level-data<br /> creep_mainback.p8 - the main-menu background, must be placed completely in the shared gfx rom<br /> creep_music.p8 - main-menu music.<br /> creep_sprites_sound.p8 - gfx (only 0x0000-0x1000), gfx-flags and sfx are used from here.</p> <p>You need all the files to edit levels, for playing only the creep.p8</p> <p>Note that when you save the level data, it is stored in &quot;creep_levels.p8&quot;. When you want to test your level, you must run creepbuild.p8 or choose in the pause-menu &quot;build&quot;.</p> <p>There is a limit of 31 rooms and 15 of every object. First select a object with the keys, than place it with the left mouse button.</p> <p>A switch can operate more than one machine. After placing a switch you can link the switch to a machine by simple click left on the machine. Right-click will quit link mode. To relink right click on a switch. </p> <p>Doorbells and locks work the same, link them with doors.</p> <p>When you place a door, you must set an connected door. Move the room with + - &lt; &gt; or switch room over the map (tab) and place there the second door. When you place the second door in the same room you create an exit-door.</p> <p>With tab you enter map mode. Move the cursor over one map and press tab again to enter the room. With left-click on a room you can move it, right click to resize it.</p> <p>The best way to edit the labs is to open pico8 twice, once the editor and once the game. If you want to try something out, select &quot;build&quot; in the editor pause menu and then ctrl+r in the game to reload the changes.<br /> </div></div></div></p> <h2>Working with the editor</h2> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> Important - keyboard is only detected, when the pico8-window is activ and the mouse cursor is in the window!</p> <p>left mouse button --- set object or move the object under the cursor</p> <p>right mouse button --- change size of object under the cursor or go through a door or start/stop linking object (switches, door bells or locks)</p> <p>0-9 * / . , --- change state/color of the object, for example the color of the walk ways, active/deactivate, change direction and so on</p> <p>backspace --- delete the active selected object. Important, when you delete a lightning machine or a door, you should check every machine, switch and doorbells - they may be invalid. </p> <p>space -- walk through door</p> <p>w -- walkway<br /> l -- ladder<br /> s -- sliding poles<br /> d -- door<br /> b -- doorbell<br /> o -- lock<br /> k -- key<br /> c -- conver belts<br /> m -- lightning machine<br /> i -- switch for lightning machine<br /> f -- force field<br /> t -- trapdoor<br /> x -- matter transmitter booth<br /> v -- transmitter destination<br /> u -- mummy<br /> r -- frankenstein monster<br /> g -- ray gun</p> <ul> <li>&gt; -- next room</li> <li>&lt; -- previous room</li> </ul> <p>shift+r -- rename lab when you empty the name, the lab will be deleted.</p> <p>shift+s -- save (but not build!) the level data.</p> <p>shift+e shift+1 -- start position player 1</p> <p>shift+w shift+2 -- start position player 2</p> <p>tab -- enter map mode</p> <p>ctrl+c shift+c -- export lab as clipboard-string</p> <p>ctrl+v shift+v -- import lab from clipboard<br /> </div></div></div></p> <h1>behind the scenes</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> Some may have guessed it already, the game is a &quot;The Castle of Dr. Creep&quot; clone. A classic on the C64 from 1984 and was quite unique at the time.</p> <p>The original game is relatively complex and uses a complete floppy disk. The problem here is that I wanted to insert as many of the castles as possible. To put them &quot;classically&quot; in the map data does not work, much too large, so a level editor had to be created. Writing it in Pico8 was not so easy, it is almost more complex than the game.</p> <p>A special feature of the level data is that I do not save byte wise, but bit wise. For example, to save the status of a trapdoor, I need exactly one bit. This method is also used for the game saves, otherwise it would be partly impossible to accommodate this in 256 bytes. However, I had to cheat a bit, for example, a round position of the creatures is stored. It is possible that a loaded game does not always remain solvable. But I think I've solved the problem.</p> <p>In addition, I use the lzw logarithm to store even more data. it is possible to place data in source code via string, but somehow I find that inelegant. The packed data also has the advantage that it can be edited more easily with tools without changing the lua code.</p> <p>Compared to the original castle, there are some changes, on the one hand because the layout is different (40x24 vs 16x16), on the other hand because I have defused some &quot;backtracking&quot; and death traps. Nevertheless, please note, the levels are from 1984 - there you have something different design.</p> <p>The game should be similar to the original, but not just copy it. I've made some changes. The monsters, for example, always go at the closer player (in the original it was always player one). Likewise the map, in the original it appears after each level and you have to confirm it, I immediately switch here to the next room. This increases the game speed enormously.</p> <p>The story text is a variant of the text on the back of the box. The object descriptions are variants of original tutorial.<br /> </div></div></div></p> <h1>sources</h1> <p><div><div><input type="button" value=" Show " onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = ' Hide '; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = ' Show '; }"></div><div><div style="display: none;"><br /> The Castles of Dr. Creep Revisited<br /> <a href="https://web.archive.org/web/20161223145535/http://baetzler.de/c64/games/creep/">https://web.archive.org/web/20161223145535/http://baetzler.de/c64/games/creep/</a></p> <p>Doctor Creep<br /> <a href="http://moon.descentforum.net/creep/">http://moon.descentforum.net/creep/</a></p> <p>music:<br /> <a href="https://www.8notes.com/scores/998.asp?ftype=midi">https://www.8notes.com/scores/998.asp?ftype=midi</a></p> <p>Infos about the game:<br /> <a href="https://www.mobygames.com/game/c64/castles-of-dr-creep">https://www.mobygames.com/game/c64/castles-of-dr-creep</a></p> <p>Lempel&ndash;Ziv&ndash;Welch:<br /> <a href="https://rosettacode.org/wiki/LZW_compression">https://rosettacode.org/wiki/LZW_compression</a><br /> <a href="https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch">https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch</a><br /> </div></div></div></p> https://www.lexaloffle.com/bbs/?tid=45202 https://www.lexaloffle.com/bbs/?tid=45202 Sun, 31 Oct 2021 16:09:50 UTC LZW-compress and decompress <p> <table><tr><td> <a href="/bbs/?pid=99373#p"> <img src="/bbs/thumbs/pico8_lzw-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=99373#p"> lzw</a><br><br> by <a href="/bbs/?uid=58188"> GPI</a> <br><br><br> <a href="/bbs/?pid=99373#p"> [Click to Play]</a> </td></tr></table> <br /> I have translated and extend the lua code from here<br /> <a href="https://rosettacode.org/wiki/LZW_compression">https://rosettacode.org/wiki/LZW_compression</a><br /> I tried to reduce the token count, but I wouldn't surprised when someone will shrink it more.</p> <p>lzw is the codec that for example gif use, it was patented, but it expired 2004.<br /> more information:<br /> <a href="https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch">https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch</a></p> <p>I tested the code with the JELPI-Graphic&amp;Sound data - and it will compress it to 6094 Bytes (from 17152 - ~36%). </p> <p>With the next update the high-memory above 0x8000 will be useable (at the moment only with a undocumented poke), my plan is to place there 32kbit of graphic and sound data. The problem is, that this memory is not saved and I don't want to store it in the source-code because it is too big.</p> <p>With this code I can compress the 32kbit and store it in the &quot;rom&quot; (the lower 0x4300 bytes). Create a &quot;build&quot;-cart which fill the 32kbit (for example with the reload()-function from other carts), compress the data and cstore() the compressed data.<br /> Copy the compressed data to the the &quot;game-cart&quot;, on start decompress the data in the high-memory-area and copy then the part currently needed in the map/sprite-memory.</p> <p>About the tape_()-function: Think about it like a &quot;punched tape&quot; - it can be used to store datas with variable bit-size. You can use it also for the &quot;Persistent cart data&quot;. Normaly you can place 256 Bytes. When you want for example to save if a door is open or closed, you need only one bit. With this routines you can easily store 256*8 = 2048 Doors. The routine should handle 1 to 16 bit values.</p> https://www.lexaloffle.com/bbs/?tid=45188 https://www.lexaloffle.com/bbs/?tid=45188 Sat, 30 Oct 2021 13:10:11 UTC Request - return-value for poke() <p>it would be nice, when the poke() would return the address after the poke, like print() does.</p> <p>for example:</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>adr=poke(adr,1)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>should do the same as</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>poke(adr,1) adr+=1</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>adr=poke2(adr,0xffff)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>instead of</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>poke2(adr,0xffff) adr+=2</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>str=&quot;abcdef&quot; adr = poke(adr,ord(str,1,#str))</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>instead</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>str=&quot;abcdef&quot; poke(adr,ord(str,1,#str)) adr+=#str</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=45178 https://www.lexaloffle.com/bbs/?tid=45178 Fri, 29 Oct 2021 18:14:03 UTC Request - Pause-menu position and background <p>it would be nice to select where the pause menu should appear. Also the possiblity to draw a custom background for the pause.</p> <p>For example for a RPG. It would be useful to draw the player-status on screen and the pause-menu on the right button of the screen. In combination with the menuitem-command it would be an easy and &quot;cheap&quot; possibility to create a status-menu. Or display a map of the current level, an inventory and so on.</p> <p>Suggestion: </p> <p>menustyle([&lt;position&gt;[,&lt;draw-function&gt;]])</p> <p>position could be 0=top left, 1=top, 2 top right, 3 left, 4 center (default), 5 right, 6 bottom left, 7 bottom, 8 bottem right<br /> And draw-function is a function which is called direct before the pause-menu appears. </p> https://www.lexaloffle.com/bbs/?tid=45140 https://www.lexaloffle.com/bbs/?tid=45140 Tue, 26 Oct 2021 18:26:48 UTC