Werxzy [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=80204 Reacting Grid Wallpaper <p> <table><tr><td> <a href="/bbs/?pid=146368#p"> <img src="/bbs/thumbs/pico64_grid_wallpaper-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=146368#p"> grid_wallpaper</a><br><br> by <a href="/bbs/?uid=80204"> Werxzy</a> <br><br><br> <a href="/bbs/?pid=146368#p"> [Click to Play]</a> </td></tr></table> </p> <p>Made a wallpaper that can react to mouse position and movement. It uses some userdata stuff that I've shared before. There's extra settings inside _init(), which I've set to be a bit mild to make the effect less distracting.</p> <h2>Other line options</h2> <img style="margin-bottom:16px" border=0 src="/media/80204/sshot2.png" alt="" /> <img style="margin-bottom:16px" border=0 src="/media/80204/10_sshot1.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=141646 https://www.lexaloffle.com/bbs/?tid=141646 Thu, 11 Apr 2024 15:28:53 UTC Picotron Solitaire Suite <p> <table><tr><td> <a href="/bbs/?pid=145162#p"> <img src="/bbs/thumbs/pico64_solitaire_suite-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=145162#p"> solitaire_suite</a><br><br> by <a href="/bbs/?uid=80204"> Werxzy</a> <br><br><br> <a href="/bbs/?pid=145162#p"> [Click to Play]</a> </td></tr></table> </p> <p><code>load #solitaire_suite</code></p> <p><code>no sound currently added</code></p> <h2>Release 0.1.0</h2> <p>After constently working on it since picotron 0.1.0, I'm finally releasing Picotron Solitaire Suite (0.1), which is designed to allow adding new variations of solitaire. Thanks to anyone whose been following the updates and joining the streams. Also thanks to Louie Chapman for his contributions (2 solitaire variants, a card back, and helping test that it actually works.), SoundDotZip for the aseprite to picotron image plugin, and Fletch for an animated card back.</p> <p>The suite currently has 6 solitaire variations</p> <ul> <li>Klondike Solitaire</li> <li>Solitaire Too</li> <li>Golf Solitaire</li> <li>Spider Solitaire</li> </ul> <p>2 of which were made by Louie Chapman</p> <ul> <li>Huntsman Solitaire</li> <li>Trapdoor Solitaire</li> </ul> <p>I didn't include any sounds, as it's a bit difficult for me to manage the sfx editor currently. Also, with the current web player having glitchy audio in the current version, I didn't see it as necessary for the first release. I'm open to people contributing their own card backs, audio, or game variant if they are high enough in quality and are fitting for the game. Though I will recommend having a git repository for any contributions as it will be much easier to manage. </p> <p>I think appdata is currently only accessable for the standalone version of picotron (unless I'm doing this wrong), so saves and custom games on the BBS will not work right now.</p> <img style="margin-bottom:16px" border=0 src="/media/80204/aces.png" alt="" /> <h2>Custom Stuff</h2> <p>To create a solitaire variant or custom card back, I would recommend looking at the README in the Solitaire Suite git repository for better details. While the suite is being released under CC BY-NC-SA 4.0, the api for handling the cards is released in a separate repository with the MIT license to allow for more freedom of its use. Feel free to send any pull requests for either for improvements you see. And while I won't include every card back or game mode made for this, I might make a list here or in the repo containing a list of them.</p> <p><a href="https://github.com/Werxzy/solitaire_suite.p64">[ Picotron Solitaire Suite git repository ]</a><br /> <a href="https://github.com/Werxzy/cards_api">[ Cards API git repository ]</a></p> <p>Picotron Solitaire Suite uses submodules so you will likely need to do <code>git submodule init</code> then <code>git submodule update</code>. Though someone may know a better way of doing this. Please only submit pull requests to the dev branch.</p> <p>Any custom game variants or card backs can be added inside their respective folders inside <code>/appdata/solitaire_suite/</code>. There is currently no super simple way to drag and drop files without going into appdata.</p> <img style="margin-bottom:16px" border=0 src="/media/80204/faces.png" alt="" /> <h2>After 0.1.0</h2> <p>After 0.1, I will be mostly switching to a previous project to finish it before working on version 0.2, though I will still add small improvements or fix bugs if any are discovered. In 0.2, I will look to improve the following:</p> <ul> <li>add functions to handle holding cards in hand</li> <li>add transitions for switching from and to game variants</li> <li>improved card generation for different card sizes.</li> <li>music and sounds??? (could have a cassette player to allow cycling through songs)</li> <li>improve function names (kinda bad when stack is both a noun and a verb)</li> </ul> <h2>Changelog</h2> <h3>Version 0.1.1</h3> <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> <ul> <li>Fixed grammar and wording of some rules text.</li> <li>Fixed new game in trapdoor solitaire sometimes not dealing the cards.</li> <li>Fixed double clicking aces in spider solitaire getting stuck.</li> <li>Fixed huntsman card positioning when shuffling for a new game after emptying the deck.</li> <li>Fixed buttons being pressable while shuffling or any animations were playing.</li> </ul> <p>= api changes = </p> <ul> <li>Updated stack dropping to search a slightly wider area for which stack to place the cards on.</li> <li>Added stack_collecting_anim and stack_shuffle_anim functions to simplify the reset process.</li> <li>Updated shuffling a bit to better randomize the cards.</li> </ul> <h4>0.1.1b</h4> <p>Fixed error or bug that would occur when double clicking a card in trapdoor solitaire.<br /> </div></div></div></p> https://www.lexaloffle.com/bbs/?tid=141288 https://www.lexaloffle.com/bbs/?tid=141288 Sat, 30 Mar 2024 20:31:58 UTC shmup_1k_werxzy <p> <table><tr><td> <a href="/bbs/?pid=141804#p"> <img src="/bbs/thumbs/pico8_shmup_1k_werxzy-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=141804#p"> shmup_1k_werxzy</a><br><br> by <a href="/bbs/?uid=80204"> Werxzy</a> <br><br><br> <a href="/bbs/?pid=141804#p"> [Click to Play]</a> </td></tr></table> </p> <p>After seeing LokiStriker's and Achie's shmups made in 1024 compressed bytes, I wanted to give it a go.</p> <p>Here's the uncompressed source 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>--1k shmup --werxzy -- enemy data ty=split(&quot;⁶:425affffe7662400,0.01,0,7,0,0.3,0,-0.0001,2,5,5`⁶:425affffe7662400,0.01,0,7,0,1.1,0,-0.01,1,3,3`⁶:22227f7f2a361c08,0,0,9,0,0.3,0,0.02,4,1,3`⁶:425affffe7662400,0,0,13,0,0.1,0,0,3,30,20`⁶:3c42bdbdbda5423c,0,0,5,0,0.25,0,-0.0005,5,20,25&quot;,&quot;`&quot;) -- bullet data bty=split(&quot;●,1,0,0,0.8,1,60`✽,1,-15,15,0.4,3,200`✽,0,-120,10,0.4,7,100`\feミ,0,0,180,1,2,20`✽,1,0,36,1,10,30&quot;,&quot;`&quot;) cartdata&quot;shm1k_werx&quot; function _init() en,bul,pb,px,py,ph,pi,pc,sc = {},{},{},64,80,3,0,0,0 end function _update60() cls() if ph ~= 0 then -- spawn regular enemy if t() % 2 == 1 then e=add(en, split(ty[rnd{1,2,3}])) e[7]=rnd(e[2])-e[2]/2 e.r,e[2]=rnd(20),rnd(100)+10 end -- spawn boss enemy if t() % 20 == 1 then e=add(en, split(ty[rnd{4,5}])) e.r,e[2]=rnd(20),64 end -- player movement and drawing p_=btn(4)and 0.5or 1.2 px+=(tonum(btn(1))-tonum(btn(0)))*p_ py+=(tonum(btn(3))-tonum(btn(2)))*p_ px=mid(px,120) py=mid(py,120) ?(pi%20&lt;=10and&quot;⁶:081c362a7f7f3614&quot;or&quot;&quot;),px,py,11 -- player fires if pc&lt;=0 and btn(4)then pc+=10 add(pb,{&quot;⁶:1c3e3e1c1c080800&quot;,px,py,3,0,-3.5,0,0}) ?&quot;\as3i7gc&quot;,0,0 end -- update bullets, and enemy ships for t in all{pb,en,bul} do for o in all(t) do o[2]+=o[5] o[3]+=o[6] o[5]+=o[7] o[6]+=o[8] if(not col(o,0,0,128,128))del(t,o) if o.r then o.r-=1 if o.r&lt;0then b=split(bty[o[9]]) o.r=b[7] nb(o[2],o[3],unpack(b)) end end ?unpack(o) -- draws ship or bullet -- check player collision with enemy ships or bullets if pget(px+3,py+2) ~= 0 and pi==0 and t ~= pb then ph-=1 pi=90 if(t==bul)del(t,o) ?ph==0 and &quot;\a&lt;i6g1g2g1g2g1g2g1&quot; or &quot;\a&lt;i6g1&quot;,0,0 end if t==en then -- check collision with each bullet for b in all(pb) do if col(o,b[2],b[3],5,5)then del(pb,b) o[10]-=1 ?o[10]==0 and &quot;\a&lt;i6g1g2g1g2g1g2g1&quot; or &quot;\a&lt;i6g1&quot;,0,0 if o[10]==0 then del(t,o) sc += (o[11]&gt;&gt;16)*50 end end end end end if t == pb then pset(px+3,py+2,0) end end for i = 1,ph do ?&quot;&hearts;&quot;,i*6,118,8 end -- high scores ?tostr(sc,2),6,1 ?tostr($0x5e00,2) poke4(0x5e00, max($0x5e00, sc)) -- cooldowns pi = max(pi-1) pc = max(pc-1) else ?&quot;game over\n&quot;..tostr(sc,2),50,50 if(btnp(5))_init() end end function col(o,x,y,w,h) x-=o[2]y-=o[3] return x&lt;8and x+w&gt;0and y&lt;5and y+h&gt;0 end -- bullet generation function function nb(x,y,ch,pt,as,ad,sp,c) a=atan2(px-x,py-y)*pt+as/360 for _=1,c do add(bul,{ch,x,y,8,cos(a)*sp,sin(a)*sp,0,0}) a+=ad/360 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> https://www.lexaloffle.com/bbs/?tid=140307 https://www.lexaloffle.com/bbs/?tid=140307 Fri, 23 Feb 2024 02:23:26 UTC Extreme Table Compression <p>I've been working on a table to binary converter that can help compress data and store it in cart rom. I know there have been different attempts in the past, but this version aims to fit only the necessary data and leaves the types to a format string. Though it's only really useful if you have some of the following.</p> <ul> <li>A lot of data in tables</li> <li>A consistent and known table format</li> <li>A variety of table formats</li> <li>Multiple carts</li> </ul> <p>It works by taking in a table, a writing address, and a format, that generally 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>tab = {1,2} form = &quot;[#8,#8]&quot; -- an indexed array of 2 unsigned 8-bit integers -- form = &quot;[#4,#3]&quot; -- also works with a different number of bits (up to 16) tab2bin(tab, 0x8000, form) -- compress table to binary at 0x8000 tab2 = bin2tab(0x8000, form) -- decompress table</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Though if a table can a varying number of entries, so it instead it would be better to loop through entries.</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>tab = {1,2,4,8,16,32,64,128} form = &quot;[#8(#8)]&quot; -- can have up to 255 entries due to looping through (#8) a number of times read from the previous #8</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>There are also ways to store values that are expected to have decimals or be in a different range</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>tab = {-10, 1.25, 0x1234.5678} form = &quot;[#8-128,#8&gt;4,#16&gt;16@dec#16+dec]&quot; -- &quot;-&quot; subtracts from the read value -- &quot;&gt;&quot; shifts the read value right -- #16&gt;16@dec#16+dec reads the first 16 bits and last 16 bits of a full fixed-point number and stores them in 32 bits</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>There's also support for strings, booleans, tables with keys(though not mixing them with indexed tables), and custom compression/decompression functions.</p> <p>The table to binary (tab2bin) compression function is about 913 tokens. While the binary to table (bin2tab) decompression function is about 536 tokens. However, some of the lines of code can be removed to reduce the token count. I would recommend storing your data in a string format initially, only using tab2bin when packing the data for the final carts, and only using bin2tab in the final carts.</p> <p><a href="https://github.com/Werxzy/tab2bin">https://github.com/Werxzy/tab2bin</a> </p> <p>The full source and more details are on the github page, since there may be changes in the future. Feel free to send any issues or pull requests to help improve it.</p> https://www.lexaloffle.com/bbs/?tid=55487 https://www.lexaloffle.com/bbs/?tid=55487 Mon, 25 Dec 2023 15:54:26 UTC SB-1800 <p> <table><tr><td> <a href="/bbs/?pid=135093#p"> <img src="/bbs/thumbs/pico8_sb_1800_v1-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=135093#p"> sb_1800</a><br><br> by <a href="/bbs/?uid=80204"> Werxzy</a> <br><br><br> <a href="/bbs/?pid=135093#p"> [Click to Play]</a> </td></tr></table> </p> <p>I recently finished a game for the Cre8 Jam. You control a robot through commands to move through and scan a 3d environment. I would have added a bit more or fixed it up better, but I'm about out of time for the jam and really low on tokens. Even after using special functions to lower the token count.</p> <p>You can get more information through the <code>HELP</code> command, but the main commands are:</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>MOVE (direction) (amount) TURN (left/right) (amount) WAVE SWITCH [name] SCAN (dot size)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>And another important one is <code>RSCAN</code>, which is just <code>SCAN</code>, but repeatedly scans.</p> <p>I would highly recommend checking out the itch.io page, as its design is special for this game.<br /> <a href="https://werxzy.itch.io/sb-1800">https://werxzy.itch.io/sb-1800</a> The source code for the game and the map editor are also available on the itch.io page.</p> <p>After an update you can now use controller inputs</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>MOVE - up/down TURN - left/right WAVE - X SWITCH - O SCAN is automatic</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Saved data is shared between the Command and Controller modes.</p> https://www.lexaloffle.com/bbs/?tid=54351 https://www.lexaloffle.com/bbs/?tid=54351 Fri, 29 Sep 2023 08:48:42 UTC Slime's Light <p> <table><tr><td> <a href="/bbs/?pid=133251#p"> <img src="/bbs/thumbs/pico8_slime_light-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=133251#p"> Slime's Light</a><br><br> by <a href="/bbs/?uid=80204"> Werxzy</a> <br><br><br> <a href="/bbs/?pid=133251#p"> [Click to Play]</a> </td></tr></table> </p> <p>I just finished a game for a <a href="https://itch.io/jam/1-bit-jam-wow">1-bit game jam</a>, requiring the use of only 2 colors . Slime's light is a small puzzle game that uses light and shadow to activate and deactivate doors and lamps. Unfortunately, I had to minify the code to make it fit into a single cart. You can access the unminified code on the <a href="https://werxzy.itch.io/slimes-light">itch page</a>.</p> <p>Controls:<br /> Arrow keys - move<br /> X - pickup / drop<br /> Z - slow movement</p> https://www.lexaloffle.com/bbs/?tid=53793 https://www.lexaloffle.com/bbs/?tid=53793 Sat, 19 Aug 2023 03:42:10 UTC