dw817 [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=15232 Star Trek Transporter Missions <p>Having seen @loanwulf's offering here:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=48345">https://www.lexaloffle.com/bbs/?tid=48345</a></p> <p>I decided to go ahead and show off an unfinished cart I was working on HERE back in March of 2022:</p> <p> <table><tr><td> <a href="/bbs/?pid=113778#p"> <img src="/bbs/thumbs/pico8_sttm-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=113778#p"> sttm</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=113778#p"> [Click to Play]</a> </td></tr></table> </p> <p>Press 🅾️ to show Spock's communication card.</p> <p>There is code, graphics, music, and sound effects in this cart. Feel free to examine them all.</p> <p>For graphics there is the Enterprise, Doomsday Machine, Planets, Starbase, &quot;Star Trek&quot; text, and 32x32 portraits of Kirk, Doctor McCoy, Spock, Lieutenant Uhura, Scotty, And Admiral Hanson.</p> <p>For audio there is the Star Trek theme I started, Phasers in different pitches to show if they are the handheld variety or coming directly from the Enterprise, Transporter thrum, Computer sounds and pitches, Warp Speed, &quot;Panic&quot; theme, &quot;Lost game&quot; theme, and a few other bits for communication.</p> <p>If there is something you want to make with these, please let me know. Would love to see this game completed.</p> <p>Thanks !</p> https://www.lexaloffle.com/bbs/?tid=48346 https://www.lexaloffle.com/bbs/?tid=48346 Tue, 28 Jun 2022 22:24:44 UTC Now You See Me <p> <table><tr><td> <a href="/bbs/?pid=113412#p"> <img src="/bbs/thumbs/pico8_nowyouseeme-2.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=113412#p"> nowyouseeme</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=113412#p"> [Click to Play]</a> </td></tr></table> <br /> <span style="color: #408080;">(v02 06-21-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #nowyouseeme</code></p> <p>Demonstrating how to have a quick and easy to code field of vision without using a bunch of CPU processing or even complex code.</p> <p><span style="color: #ffff00;"><strong>VVhat's new ?</strong></span></p> <ul> <li> <p>Added cpu meter to show how quickly the scans are made. Notice they are &lt; 1% CPU total.</p> </li> <li> <p>Allowed ability of being able to hide behind enemies.</p> </li> <li> <p>Changed the color of passive enemies to dark blue.</p> </li> <li> <p>Distance by default is disregarded. To enable distance check, press the ❎ key. Again to swap.</p> </li> <li> <p>Made walls to be drawn more intelligently where there is always an opening.</p> </li> <li> <p>Improved the engine efficiency by checking the distance to the target first only using a search when the distance has been met.</p> </li> <li>Sped-up the player's movement slightly by adjusting the key repeat.</li> </ul> <p>Use the arrow keys to navigate.<br /> Press 🅾️ to swap between seeing the enemies only if they see you or not.<br /> Press ❎ to enable distance, again to disregard which is the default.</p> <p>You can travel freely through the walls.</p> <p>Note that the enemies cannot see you through a wall even if it is very close to them. This is being done by tracking each enemy to the player to see if an obstacle is in the way. If it is like a wall then the enemy cannot see you.</p> <p>What other simple methods can you use to have a player not be seen by an enemy if there is an obstacle in the way ?</p> https://www.lexaloffle.com/bbs/?tid=48231 https://www.lexaloffle.com/bbs/?tid=48231 Mon, 20 Jun 2022 18:45:50 UTC No Descendants <p>I am working on a program to both read and write lowercase letters to the clipboard, yet I don't think this is possible.</p> <p>Try out this code by copying it and pasting it directly to source-code.</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function _init() printh(&quot;{text}&quot;,&quot;@clip&quot;) 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>Where it says {text} go to that area, remove the &quot;text&quot; then press CTRL+P to enter Puny Font Mode - then type in the editor some lowercase letters between the two quotes. &quot;abc&quot; if you like. Then press CTRL+P to exit out of Puny Font Mode.</p> <p>Then run it.</p> <p>Then ALT-TAB out of Pico-8 and press CTRL+V to something like Notepad.</p> <p>You see the problem. Lowercase letters are not sent via the clipboard.</p> https://www.lexaloffle.com/bbs/?tid=48207 https://www.lexaloffle.com/bbs/?tid=48207 Sat, 18 Jun 2022 18:12:20 UTC Here On Tap <p> <table><tr><td> <a href="/bbs/?pid=112904#p"> <img src="/bbs/thumbs/pico8_here_on_tap-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=112904#p"> here_on_tap</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=112904#p"> [Click to Play]</a> </td></tr></table> <br /> <span style="color: #408080;">(v00 03-08-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #here_on_tap</code></p> <img style="" border=0 src="/media/15232/george-jetson.png" alt="" /> <p>I am reminded of George Jetson from the Hanna Barbera series: &quot;The Jetsons.&quot;</p> <p>In this George had a job where he needed to press one button all day long - and that was it.</p> <p>While we have greater input methods available to us, if you are programming in Pico-8 you are normally limited to the ❎ and 🅾️ buttons with the arrow keys and start or &quot;P&quot; to bring up additional menu options.</p> <p>On a cellphone though you normally only have input - through your fingers. and as Pico-8 also lets you use a mouse for input, to navigate in pico-8 with your finger has some limitations.</p> <ol> <li> <p>you cannot move the X+Y mouse coordinates without actually pressing down the mouse button each time.</p> </li> <li>you can only register one press at a time.</li> </ol> <p>So how could you register multiple values from a single finger ? That is what this code explores.</p> <p>You can tap singly, doubly, or even 3-at a time. It also determines if you held your finger down on the last tap, so using this you could generate multiple conditions to test for.</p> <p>With my earlier &quot;Swiper&quot; found HERE:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=27757">https://www.lexaloffle.com/bbs/?tid=27757</a></p> <p>You now have new ways of entering input into a cellphone.</p> <p>If you find these useful, please let me know and I will combine the two into one modern code for cellphone input for you.</p> https://www.lexaloffle.com/bbs/?tid=48075 https://www.lexaloffle.com/bbs/?tid=48075 Wed, 08 Jun 2022 17:24:57 UTC Shift Colors <p> <table><tr><td> <a href="/bbs/?pid=112893#p"> <img src="/bbs/thumbs/pico8_shift_colors-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=112893#p"> shift_colors</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=112893#p"> [Click to Play]</a> </td></tr></table> </p> <p>Run this cart. Press &quot;P&quot; to pause. Now tap or hold down the LEFT shift key.</p> <p>Notice that the muted colors in the menu change.</p> <p>Is there a reason for this ?</p> https://www.lexaloffle.com/bbs/?tid=48069 https://www.lexaloffle.com/bbs/?tid=48069 Wed, 08 Jun 2022 15:29:46 UTC Virtual Deck Of Cards <p> <table><tr><td> <a href="/bbs/?pid=112489#p"> <img src="/bbs/thumbs/pico8_virtdeckcard-15.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=112489#p"> virtdeckcard</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=112489#p"> [Click to Play]</a> </td></tr></table> <br /> <span style="color: #408080;">(v15 06-16-22)<br /> </span><span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #virtdeckcard</code></p> <p><span style="color: #ffff00;"><strong>VVhat's new ?</strong></span></p> <p>06-16-22</p> <ul> <li> <p>Changed position of descriptions and card information.</p> </li> <li> <p>Added single menu option to cover all previous menu options. Choose &quot;custom cart menu&quot; from menu to activate.</p> </li> <li> <p>Fixed menu not to appear until table and cards are ready.</p> </li> <li> <p>Added quick load + save state to table. now you can flip cards + change the table and then undo it all by quick loading your last saved state.</p> </li> <li> <p>Added info to show if table has not yet been saved. If changes are to be saved, &quot;S?&quot; will appear in the bottom-right-hand corner of the screen.</p> </li> <li> <p>Added to custom menu option ability to auto-save table for every move. Select last gear icon in custom menu selection. It will appear in the top-right-hand corner of the table to show activation.</p> </li> <li> <p>Added place a face-up card option on every existing grid box on the table.</p> </li> <li>Next update will include load and save table to clipboard. Will include header + standard 6-bit compressed data.</li> </ul> <p>06-14-22</p> <ul> <li>Menu option to correctly shuffle every face-up card. Does not do swap. instead it takes every face-up card on the table and places them in a stack. Then takes each card randomly from that stack and builds a new stack. That new stack is then put back on the table in the exact same place that the original cards were pulled.</li> </ul> <p>06-12-22</p> <ul> <li>Records every session automatically now. Exit any time and restart to recover all work.</li> </ul> <p>06-07-22</p> <ul> <li> <p>Wrote full and new keyboard driver. Arrow keys are staggered, 🅾️ requires multiple presses now, and ❎ only registers a single stroke when released, not pressed.</p> </li> <li> <p>With new keyboard driver, you can combine ❎ and 🅾️ together to pull a card and place it face up on the cursor without added keystrokes.</p> </li> <li> <p>You can also hold down any button or combination of 🅾️ or ❎ and 🅾️ together and then press arrow keys to auto-generate fields for those positions the cursor touches. This is a quick way to generate grids and face-up cards.</p> </li> <li> <p>Auto-save to current layout is planned.</p> </li> <li> <p>Load and Save to internal memory is planned. 32-slots will be available. This also works online.</p> </li> <li>Load and Save to clipboard is planned.</li> </ul> <p><span style="color: #ffff00;"><strong>A FEW IMPORTANT NOTES:</strong></span></p> <p>If you activate auto-save every move it is instantaneous. You do not need to worry about the system slowing down even remotely for saving your work every move. This ability was automatic in the previous release, now you can choose whether to have it on or not through configuration menu.</p> <p>06-02-22</p> <ul> <li> <p>Fixed moving card. Was not working properly for undo.</p> </li> <li>Coded so both the values of coins and dice can be added up.</li> </ul> <p>06-01-22</p> <ul> <li>Added new Grid Box to help you keep track of card positions even if there is no card there.</li> </ul> <p>05-31-22</p> <ul> <li> <p>reissued color palette set.</p> </li> <li> <p>Changed suit colors so they are easier to see. Thank you Lucky Charms cereal ! :)</p> </li> <li> <p>You now have black spades, green clubs, red hearts, and blue diamonds.</p> </li> <li> <p>Removed scrolling cards in favor of lifting and repositioning each card.</p> </li> <li> <p>Added rolling a single die and flipping a coin ability. See below.</p> </li> <li>Added version number to appear at boot.</li> </ul> <hr /> <img style="" border=0 src="/media/15232/car_dic_06_02_22_4.gif" alt="" /> <p><span style="color: #ffff00;">Here is a game I made up called, &quot;Caverns.&quot;</span></p> <p>You place a single card face up in the center. You place another card. If it is minus 1 value or plus one value of the horizontal line center, then you lift that card up and place it next to the matching card vertically. The end result of the table will look like stalactites and stalagmites with all cards matched.</p> <hr /> <p>This program is a complete virtual green velvet table with a deck of cards, 52-in all, 6 pennies, and 6 dice. You can have 13 cards across by 11 cards down. You can lay down grid boxes to help you align where to place your cards. They can be face down or face up and can even be repositioned to another place on the table.</p> <p>These cards can also be turned back over hiding their contents or discarded allowing you to pull new ones from the deck if you so desire.</p> <p>It uses the arrow keys for navigation and the 2-standard joystick buttons of 🅾️ and ❎ to add and remove cards to the table.</p> <p>The 🅾️ and ❎ also react in a special way depending upon whether the card it is on exists or not and if it is turned over or not. See below.</p> <p>In running the cart, the deck of 52-cards will be shuffled. This shuffle method uses 2-different arrays and pulls a random card from the 1st pile to add it to the 2nd pile until all cards from the 1st pile are exhausted. This ensures a shuffling of the cards that is truly random.</p> <hr /> <p>After the shuffle the main screen will appear and there will be 3-values that appear at the bottom.</p> <p>These are <code>DECK</code> to show how many cards remain in the deck. To start with there are 52 (I am not using Jokers).</p> <p>The next item is <code>PLAY</code> to show how many cards are in play on the table above. This could be useful for counting score for your custom card games where the object is to remove matched cards from any method you develop.</p> <p>The last item is <code>DISC</code> which keeps track of every card you have discarded and put in the EMPTY pile. This could also be used for scoring. Any cards that have been discard cannot be retrieved later - and if you use up all 52-cards, you cannot draw any new cards and must use what is on the table - or start over.</p> <p>So if you have pulled or discarded each of the 52-cards, then you can select from the menu and choose <code>RESET CART</code> or press CTRL+R on your keyboard to start over with a fresh set of 52-shuffled cards and a clean board.</p> <hr /> <p>Both the 🅾️ and the ❎ keys have unique properties. See below.</p> <p>Press 🅾️ on an empty square to add a grid box to the table. This does not count as a card and you can have as many as you would like on the table.</p> <p>If you press 🅾️ on a grid box, a card will be pulled from the deck, face down, and replace the grid box.</p> <p>If you press 🅾️ on a card that is face down, it will be turned over so you can see its contents.</p> <p>If you press 🅾️ on a card that is face up, it is lifted and the cursor changes. Then you can use 🅾️ to reposition this card to an empty space or directly on top of another card to replace it thereby discarding of the one beneath.</p> <p>If you press ❎ when you are in lifted mode, the mode will be canceled and the card you lifted along with the cursor will be returned from where you originally picked it up, still face up.</p> <p>If you press ❎ on a card that is face up, it will be turned over hiding its contents.</p> <p>If you press ❎ on a card that is face down, it will be discarded leaving a grid box here.</p> <p>If you press ❎ on a grid box, the grid box will be removed leaving a blank space.</p> <p>If you press ❎ on a blank space, two special items will occur. A coin will be flipped showing HEADS or TAILS in the top-left-hand corner and a single die will be rolled showing a value from 1-6 in the top-right-hand corner.</p> <p>If you press ❎ AGAIN a new flipped coin will be added and a new die will be rolled. The totals will change. You can have up to 6 of these before the values reset.</p> <p>To discard the coins and the dice merely move the cursor away one step.</p> <hr /> <p>If you cannot tell what a card is, position the cursor directly on it and an exact description of that card will appear in the text frame above.</p> <p>What games can you think up with this engine ?</p> <p>And that's it ! If you have any questions or suggestions, please let me know in the comments below.</p> <p>Enjoi !</p> <hr /> <p>Please see below for earlier versions and descriptions.</p> <p> <table><tr><td> <a href="/bbs/?pid=112489#p"> <img src="/bbs/thumbs/pico8_virtdeckcard-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=112489#p"> virtdeckcard</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=112489#p"> [Click to Play]</a> </td></tr></table> <br /> <span style="color: #408080;">(v00 05-30-22)<br /> </span><span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #virtdeckcard-0</code></p> <p>I think we all write programs from one time to another not necessarily because we want to write a game for others to play or even something others can use in their own code - but for perfectly selfish reasons because we cannot find what we want written by other people.</p> <p>I have examined no less than 20 card-flipping programs for my Android tablet and none do even close to what I wanted.</p> <p>And as the term goes, &quot;If you want something done right, do it yourself.&quot; so have I done so.</p> <p>This is a bit more elaborate than a simple program that pulls a single card out of the deck to show it filling the full screen which is what most of them did.</p> <p>If you press 🅾️ on a card that is face up, it and all cards to the right of it will be moved one tile across to the right. Any card at the extreme right can and will be discarded if it is there.</p> <p>If you press ❎ on a square that has no card, all the cards to the right of this square will be moved one tile across to the left.</p> <h3>IF YOU ARE ENJOYING THIS CART, PLEASE LET ME KNOW ...</h3> https://www.lexaloffle.com/bbs/?tid=47966 https://www.lexaloffle.com/bbs/?tid=47966 Tue, 31 May 2022 00:30:21 UTC Added Resolutions For Pico-8 (IE 256x128 pixels) <p>Hello.</p> <img style="" border=0 src="/media/15232/thinking.png" alt="" /> <p>With the understanding that Pico-8 graphics will always use memory location 0x6000-0x7FFF (hexadecimal memory location), then what new resolutions could be added by ZEP without using any additional memory ?</p> <p>Well, quite a few actually.</p> <hr /> <p><img style="" border=0 src="/media/15232/128x128.png" alt="" /> <img style="" border=0 src="/media/15232/318_32colors-128x128.png" alt="" /></p> <h3>(128 x 128 / 2) = 8192</h3> <p>Let's look at the primary resolution which is 128x128 pixels with a maximum of 16-color choices. Now be aware a new palette was found for it so you can change any of these 16-colors to really 32-colors, but you cannot change the TINT, either R G or B of any of them. They are a fixed color set from the 32 shown above. And despite this palette you can only view 16 of them at a time - conventionally.</p> <p>With &quot;hardware&quot; tweaks you can have more on the screen at a time.</p> <p>But this article is not going to cover that. Instead it is going to cover what CAN be done with those 0x2000 or 8192-bytes of memory for graphics and where any pixel can be any other colored pixel. This primary resolution uses 2-horizontal pixels to make up one byte. </p> <hr /> <p>So the next resolution available would be 64x128 wide-pixels to give you a true 256-colors per pixel.</p> <p><img style="" border=0 src="/media/15232/64x128.png" alt="" /> <img style="" border=0 src="/media/15232/256-colors.png" alt="" /></p> <h3>(64 x 128 x 1) = 8192</h3> <p>Here you can see a much larger palette with long pixels double-size across yet it is also uses a fixed palette, in this case 216-colors derived from 6-shades of red, 6-shades of green, and 6-shades of blue. While it might be possible to use any portion of extended memory to hold a custom palette, that is not covered in this article. Where a single pixel representing a single byte. Still only using 8192-bytes of memory.</p> <hr /> <p><img style="" border=0 src="/media/15232/64x64.png" alt="" /> <img style="" border=0 src="/media/15232/16-bit-color.png" alt="" /></p> <h3>(64 x 64 x 2) = 8192</h3> <p>The next resolution from here is 64x64 both wide and tall pixels to give you a true 65536-colors per pixel or 32-shades of red, 64-shades of green, and 32-shades of blue with a single pixel representing in this case =2= bytes of memory. Still only using 8192-bytes of memory.</p> <p>So we now have more colors. Let's reverse this and get more pixels once again still only using 8192-bytes of memory.</p> <hr /> <p>The next resolution is 128 pixels across by 256-pixels down.</p> <img style="" border=0 src="/media/15232/128x256.png" alt="" /> <h3>(128 x 256 / 4) = 8192</h3> <p>Using the 32-color palette above you are now limited to only showing 4-colors on the screen at a time although in truth you should be able to pick out which of the 32-palette for each of the 4-color slots. Where 4-long pixels represent a single byte. Still only using 8192-bytes of memory.</p> <hr /> <p>For wide-screen monitors or cellphones you can have this 256 pixels across by 128-pixels down with no distortion of the actual pixel shape:</p> <img style="" border=0 src="/media/15232/327_256x128.png" alt="" /> <h3>(256 x 128 / 4) = 8192</h3> <p>Although you can see quite clearly this breaks the perfect square Cosy&trade; resolution and may not be feasible to do considering the interface and current display. Yet if it were limited to only appearing for the output of the cart, I think this could be done. Like the resolution above it also only allows 4-colors on the screen at one time. Where 4-pixels represents a single byte. Still only using 8192-bytes of memory.</p> <hr /> <p>The last would be one I would really like to see. True 1-bit graphics, black and white.</p> <img style="" border=0 src="/media/15232/328_256x256.png" alt="" /> <h3>(256 x 256 / 8) = 8192</h3> <p>This gives you a whopping 256x256 pixels maintaining the square shape and square pixels with the ability to choose from the 32-palette any of the 2-colors available displayed here, default of BLACK (color #0) and WHITE (color #7). Where 8-pixels represent a single byte. Still only using 8192-bytes of memory.</p> <hr /> <p>And that's it ! Likely you can see additional ways of cutting up that 8192-bytes of memory for graphics and I think I've only touched the surface of this. Here is hoping <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> will in the future allow for some of these added resolution modes which of course could vary from one cart to the next.</p> <p>For more information on colors, resolutions, and the hardware they run on, see this WIKIPEDIA comprehensive chart.</p> <p><a href="https://en.wikipedia.org/wiki/List_of_color_palettes">https://en.wikipedia.org/wiki/List_of_color_palettes</a></p> <p><span style="color: #00ffff;"><strong>Hope This Helps !</strong></span></p> https://www.lexaloffle.com/bbs/?tid=47549 https://www.lexaloffle.com/bbs/?tid=47549 Tue, 26 Apr 2022 16:13:45 UTC Pico-8 And The Kishi Razer Controller <p>Hello:</p> <img style="" border=0 src="/media/15232/315_kishi.png" alt="" /> <p>Instead of buying an RG-351 or other gaming device, I settled on purchasing a gaming controller called the RAZER KISHI that allows you to place your cellphone in the middle and you can use the joystick accordingly.</p> <p><a href="https://www.razer.com/mobile-controllers/razer-kishi/RZ06-03360100-R3M1">https://www.razer.com/mobile-controllers/razer-kishi/RZ06-03360100-R3M1</a></p> <p>While it works perfectly everywhere else including emulation of other games like Super Nintendo and Sony Playstation for the RetroArch, it is not configured correctly for the Pico-8 system when run from Google Chrome.</p> <p>For instance the <span style="color: #0000ff;"><strong>BLUE</strong></span> does nothing at all. Instead arrow key controls are done by the <span style="color: #ff0000;"><strong>RED</strong></span> sliding joystick above that.</p> <p>In the <span style="color: #00ff00;"><strong>GREEN</strong></span>, The (A) and (B) control the (A) and (B) for Pico-8 just fine. The (X) and (Y) also do (A) and (B) but not auto-fire.</p> <p>May I suggest, <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a>, that the <span style="color: #ff0000;"><strong>RED</strong></span> joystick which has very fine movement be used to control a virtual mouse, perhaps even showing a dot on the 128x128 screen. In pressing down on the joystick (which does register as a unique button), it counts as a LEFT mouse click.</p> <p>In the <span style="color: #ff00ff;"><strong>PURPLE</strong></span> joystick, the same as a virtual mouse as it too has very fine movement, once again optional dot, independent of movement from RED, appearing in the 128x128 screen. In pressing down on THIS joystick it counts as a RIGHT mouse click.</p> <p>Have the <span style="color: #0000ff;"><strong>BLUE</strong></span> control arrow keys as normal and have keys (X) and (Y) instead be auto-fire for (A) and (B).</p> <p>The double-boxes button nestled between the RED and BLUE could register as a BACKSPACE keypress and/or player #2 (O) as it appears to be a left-facing arrow on my KISHI.</p> <p>The triple-lined button below the PURPLE could register as a TAB keypress and/or player #2 (X) as it appears to be a right-facing arrow on my KISHI.</p> <p>The stylish X button (X-Box) just below the BLUE could register as the ENTER keypress (pause) as it appears to be the icon of a HOME on my KISHI.</p> <p>With the left and right triggers located above the RED and GREEN, you are given 4 in all, two to each side. These could count as LEFT and RIGHT for player #2 and player #3.</p> <p>Finally the option to hide the touch-screen controls. This could be done by tapping quickly twice in the bottom-right-hand corner of the Pico-8's screen. Double-tap the same area again to return the visual controls.</p> <p>Also to allow zoom of any scale. 1x1 1.25x1 2x2 2.25x2 etc.</p> https://www.lexaloffle.com/bbs/?tid=47506 https://www.lexaloffle.com/bbs/?tid=47506 Fri, 22 Apr 2022 15:47:12 UTC Happy Birthday Pico-8 ! <p> <table><tr><td> <a href="/bbs/?pid=110513#p"> <img src="/bbs/thumbs/pico8_p8birthday-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=110513#p"> p8birthday</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=110513#p"> [Click to Play]</a> </td></tr></table> <br /> <span style="color: #408080;">(v01 04-19-22)</span><br /> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #p8birthday</code></p> <p><span style="color: #80ffff;">You may need to squint your eyes a bit to remove the flicker. :)</span></p> <h1>HAPPY BIRTHDAY PICO-8 !</h1> <h3>TODAY YOU ARE 7-YEARS OLD !</h3> <h3>YOU ARE A BIG BOY NOW !</h3> <h3>MAY YOU HAVE MANY MORE !</h3> <h2>CONGRATULATIONS !</h2> https://www.lexaloffle.com/bbs/?tid=47457 https://www.lexaloffle.com/bbs/?tid=47457 Tue, 19 Apr 2022 18:19:10 UTC Pico-8 + APK Export <p>I know this has been mentioned before and while Pico-8 enjoys 5+ years of its release, is it still not capable of exporting to native Android APK format ?</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> export {cart}.apk </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 is there some easy method to do so effectively, possibly converting both the export of Pico-8 from HTML and JS to an APK ?</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> export {cart}.html </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=47426 https://www.lexaloffle.com/bbs/?tid=47426 Mon, 18 Apr 2022 19:13:29 UTC 23 Graphic Pages (PCOPY) <p> <table><tr><td> <a href="/bbs/?pid=109122#p"> <img src="/bbs/thumbs/pico8_s23pages-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=109122#p"> s23pages</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=109122#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #s23pages</code></p> <p>Back in QBasic for DOS there was a resolution you could have that gave you 16-pages to store your 320x200 16-color graphic screens. Zero (0) was the main display and 1-15 were storage locations. It was invoked by typing: <code>screen 7</code> and you could copy screens using <code>pcopy(a,b)</code></p> <p>When I first wrote S1 I made heavy use of these additional 15-pages and stored all kinds of information there, not just graphics but including map data and script data converted to pixels and back to numbers again as actual variable space was small.</p> <p>While we have no requirement for this today you still might need additional pages to draw and recall information from for your 64x64 pixel carts. So I wrote this cart and set of functions to assist in this.</p> <p>In it you can record and recall a 64x64 pixeled screen (totaling 2048-bytes each) to any of 23-graphic pages that are stored in memory. It uses no arrays or variable space.</p> <p>You have 5-functions.</p> <p>The first initializes the 64x64 resolution mode and forces all drawn elements to maintain within that area, it is called: <code>set64x64()</code> and uses no arguments.</p> <p>The second clears the 64x64 screen at any time. You cannot use CLS() as if you are using pages -1 to -3, it would clear those as well as this is still part of your 128x128 screen despite only viewing 64x64 pixels. It is called: <code>cls64(c)</code> and uses one optional argument for screen color. But is not required.</p> <p>The third copies any of the 23 pages either to the main screen or back again. It is called: <code>pcopy(a,b)</code> and uses numbers as pages and memory information as listed thus:</p> <ul> <li>-7 = the bottom-right-hand corner of sprites (64x64)</li> <li>-6 = the bottom-left-hand corner of sprites (64x64)</li> <li>-5 = top-right-hand corner of sprites (64x64)</li> <li>-4 = top-left-hand corner of sprites (64x64)</li> <li>-3 = bottom-right-hand corner of screen (not seen with 64x64 resolution)</li> <li>-2 = bottom-left-hand corner of screen (also not seen)</li> <li>-1 = top-right-hand corner of screen (not seen)</li> <li>0 = Your normal 64x64 display</li> <li>1 = Memory location 0x8000</li> <li>2 = Memory location 0x8800</li> <li>3 = Memory location 0x9000</li> <li>4 = Memory location 0x9800</li> <li>5 = Memory location 0xA000</li> <li>6 = Memory location 0xA800</li> <li>7 = Memory location 0xB000</li> <li>8 = Memory location 0xB800</li> <li>9 = Memory location 0xC000</li> <li>10 = Memory location 0xC800</li> <li>11 = Memory location 0xD000</li> <li>12 = Memory location 0xD800</li> <li>13 = Memory location 0xE000</li> <li>14 = Memory location 0xE800</li> <li>15 = Memory location 0xF000</li> <li>16 = Memory location 0xF800</li> </ul> <p>So if you used <code>pcopy(16,0)</code> that would copy the screen memory from storage #16 back to the visible screen.</p> <p>To save the current screen to storage #16 you would reverse the numbers, <code>pcopy(0,16)</code></p> <p>The fourth function is just like the 3rd except that it forces debug information to appear. It is called: <code>pcopydebug(a,b)</code> and uses the same arguments as <code>pcopy(a,b)</code></p> <p>The fifth function returns you to normal 128x128 pixeled graphic mode. It is called: <code>end64x64()</code> and uses no arguments.</p> <p>In running this demo cart, all 23-pages are filled with randomly colored circles that do not repeat each other to prove it works correctly.</p> <p>use the arrow keys to navigate copying that particular page number to the main screen. Obviously nothing APPEARS to change for page # 0 as that is your visual page.</p> <p>Press 🅾️ to remove the 64x64 resolution and return back to 128x128 resolution in addition to copying the spritesheet straight to the screen to show how screens # -4 to #-7 are stored. You must press CTRL+R from here to rerun the cart.</p> <p>Press ❎ at any time to turn on and off the debug information.</p> <p>The debug information is interpreted thus:</p> <ul> <li>M[1] = The memory location to copy FROM.</li> <li>M[2] = The memory location to copy TO.</li> <li>X[1] = If this is 1 then it is adding 64-pixels to get the right-most side of the screen or spritesheet.</li> <li>X[2] = the same as X[1] except it will always be zero since we are just viewing the main screen.</li> </ul> <p>If you are running in immediate mode, you can press [ESC] to return back to 128x128 mode and see pages # -1 to -3 appearing on the main screen.</p> <p>If there is a desire, I could make a 128x128 pixel version of this library.</p> <p>Further if you have any questions or suggestions, feel free to enter them below. Thanks !</p> https://www.lexaloffle.com/bbs/?tid=47098 https://www.lexaloffle.com/bbs/?tid=47098 Fri, 25 Mar 2022 00:52:24 UTC 32-Color Picture Attainable (String) <p> <table><tr><td> <a href="/bbs/?pid=109003#p"> <img src="/bbs/thumbs/pico8_c32_string-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=109003#p"> c32_string</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=109003#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #c32_string</code></p> <p>This is a continuation of a project I worked on last Spring back to effect 32-colors out of Pico-8 and at a pixel-level where the screen is 64x128 in size.</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=42990">https://www.lexaloffle.com/bbs/?tid=42990</a></p> <p>Unlike the first version, this one does not fill up the spritesheet and instead has a single function, &quot;show32pic()&quot; of 82-tokens or 197-chars that takes the included single string located in the sourcecode of 8192-characters and draws out the 64x128x32 picture with the correct decompressed image.</p> <p>This total code compresses at 4587-bytes or uses 29% of a total 15616-bytes to maintain posting online as a clipboard file or PNG file.</p> <p>If you would like me to write a tool for yourself and others to use that can convert a 24- or 32-bit PNG or JPG to this new 32-color format for new 64x128 pixeled logo screens to your Pico-8 carts, I can do so, just ask.</p> <p>Further if you have any questions or suggestions, feel free to enter them below. Thanks !</p> https://www.lexaloffle.com/bbs/?tid=47070 https://www.lexaloffle.com/bbs/?tid=47070 Tue, 22 Mar 2022 04:31:47 UTC Recorded Pico-8 Video Filesize Seems Excessive <p><a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> (and other Piconians), I was understanding that the .GIF size saved in Pico-8 when you save a video, the size of the saved .GIF was cut down in size considerably from previous versions. I am not seeing that HERE in version 0.2.4b.</p> <p>Here are 2-identical videos. One is saved in Pico-8 with no changes, the other, VirtualDUB, both saved at 33.3fps, the same listed in the Pico-8 documentation.</p> <p>To see these two videos running perfectly and simultaneously together, for FIREFOX, press ALT-D, CTRL+C, CTRL+N, CTRL+V, and the ENTER key. To close this window again, press CTRL+W.</p> <img style="" border=0 src="/media/15232/fe 03-21-22_6.gif" alt="" /> <p><span style="color: #80ffff;"><strong>^^ SAVED IN PICO-8: (2.00mb)</strong></span></p> <img style="" border=0 src="/media/15232/296_fe 03-21-22_6a.gif" alt="" /> <p><span style="color: #80ffff;"><strong>^^ SAVED IN VIRTUALDUB: (126k)</strong></span></p> <p>Click SAVE IMAGE AS on either of these pictures to examine them and their size if you like.</p> <p>I am not marking this as an error as it does not come into conflict with the system itself, just the filesize of recorded videos. Does anyone know why there is such a filesize difference ?</p> https://www.lexaloffle.com/bbs/?tid=47058 https://www.lexaloffle.com/bbs/?tid=47058 Mon, 21 Mar 2022 18:42:52 UTC The FILLP() Editor <p><span style="color: #408080;">(v12 03-29-22)</span> <table><tr><td> <a href="/bbs/?pid=108945#p"> <img src="/bbs/thumbs/pico8_fillp_editor-12.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108945#p"> fillp_editor</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108945#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #fillp_editor</code></p> <hr /> <p><span style="color: #80ffff;"><strong>VVHAT'S NEW ?</strong></span></p> <p><strong> (03-29-22)</strong></p> <ul> <li>Updated main code to paste properly even if from an outside source like internet or notepad.</li> <li>Updated demo code with helpful notes inside the code to explain exactly how it works. (SEE BELOW).</li> </ul> <p><strong> (03-28-22)</strong></p> <ul> <li>Fixed CRASH when attempting to scroll empty field.</li> <li>Fixed overlapping sprite information.</li> </ul> <p><strong> (03-27-22)</strong></p> <ul> <li>New method for manipulation of pattern blocks.</li> <li>Overhaul button state recognition and reaction code.</li> <li>Improved extra button view. No longer do 2-special buttons appear at one time.</li> <li>Added mirror-X and mirror-Y.</li> <li>Added 90-degree rotation.</li> </ul> <p><strong> (03-26-22)</strong></p> <ul> <li>Added ability to scroll pattern in edit. thank you, <a href="https://www.lexaloffle.com/bbs/?uid=42087"> @beanborg</a> for the suggestion!<br /> To use hold down the ❎ key and press an arrow in the direction you wish to scroll the pattern. Pattern will wrap around edges.</li> </ul> <p><strong> (03-21-22)</strong></p> <ul> <li>Pattern can now be seen changing above you as you enter it.</li> <li>Added INVERT button in bottom-right-hand corner.</li> <li>Added 2-line information below to show exactly what code creates the visible pattern above.</li> <li>Adjusted code slightly for new visual margins and information.<br /> ? if you come across a bug or there is something you would like changed or added, please let me know!</li> </ul> <hr /> <p><span style="color: #80ffff;"><strong>OVERVIEW:</strong></span><br /> This program will let you not only create single 4x4 patterns and see them as you enter them, but you can have a whole set, up to 256 if you like ! and even includes the unique 3-flags of TRANSPARENCY, SPRITE, and GLOBAL for each FILLP() pattern.</p> <p>With new suggestion by beanborg you can now hold down the ❎ key and scroll with wrap ability. Just hold down the ❎ key and while it is held, press the arrow in the direction you want to scroll your pattern.</p> <hr /> <p><span style="color: #80ffff;"><strong>KEYS TO USE:</strong></span></p> <ul> <li>Use arrow keys to navigate 4x4 frame. Cursor does not wrap but hits edges where additional commands can be seen.</li> <li>press 🅾️ to plot or unplot pixel in the 4x4 field.</li> <li>Hold ❎ and arrow keys to scroll the 4x4 field with wrap-around pixels. Release when complete.</li> <li>Move the cursor to the far left vertical center to highlight PREV which when 🅾️ is pressed will go to the previous pattern. You have 256-patterns available to work with and will wrap from 1 to 256 and vice-versa.</li> <li>Move the cursor to the far right vertical center to highlight NEXT which when 🅾️ is pressed will go to the next pattern. Same as above will wrap around.</li> <li>Move the cursor to the far left on the 1st vertical pixel and INV-X will appear. When 🅾️ is pressed will take the 4x4 pixels and invert them horizontally.</li> <li>Move the cursor to the far right on the 1st vertical pixel and INV-Y will appear. When 🅾️ is pressed will take the 4x4 pixels and invert them vertically.</li> <li>Move the cursor to the far right on the 4th vertical pixel and ROTATE will appear. When 🅾️ is pressed will take the 4x4 pixels and rotate them 90-degrees to the right.</li> <li>Move the cursor to the far left on the negative one vertical pixel and TRANSP will appear. When 🅾️ is pressed this will turn on/off the TRANSPARENT flag for this pattern. When this bit is active, the second color is not drawn.</li> <li>Move the cursor to the far right on the negative one vertical pixel and SPRITE will appear. When 🅾️ is pressed this will turn on/off the SPRITE flag for this pattern. When this bit is active, the fill pattern is applied to sprites (SPR, SSPR, MAP, TLINE).</li> <li>Move the cursor to the far left on the &quot;5th&quot; vertical pixel and GLOBAL will appear. When 🅾️ is pressed this will turn on/off the GLOBAL flag for this pattern. When this bit is active, the secondary palette mapping is also applied by all draw functions that respect fill patterns (CIRC, CIRCFILL, LINE).</li> <li>Move the cursor to the far right on the &quot;5th&quot; vertical pixel and INVERT will appear. When 🅾️ is pressed every 4x4 pixel in the field will turn to their opposite. On to off and off to on. Click again to revert back.</li> <li>Move the cursor to the center on the &quot;5th&quot; vertical pixel and EXPORT will appear. When 🅾️ is pressed your pattern or series of patterns (if you have more than one) will be exported. See <span style="color: #80ffff;">ADDITIONAL</span> below.</li> <li>Move the cursor to the center on the negative one vertical pixel and IMPORT will appear. When 🅾️ is pressed the clipboard is scanned for the exact code you earlier pasted to read in and convert back to where it can be edited in my FILLP EDITOR. See <span style="color: #80ffff;">ADDITIONAL</span> below.</li> </ul> <hr /> <img style="" border=0 src="/media/15232/fe-03-27-22_0a.gif" alt="" /> <p>Note the two programming lines below the 4x4 grid seen above. This shows what value FILLP() has for the pattern you are working on and the 3-numbers above, Binary, Hexadecimal, and Decimal also appear and change every time you add or remove a pixel. As you can see in RECTFILL() you can have a pattern appear as 2-colors by adding a new colored multiplied by 16. In this case it is color 13 (violet) combined with color 12 (aqua).</p> <p><span style="color: #00ffff;">Be aware</span> that all Pico-8 patterns are not OR but AND. They REMOVE pixels from a solid pattern, not the other way around. If you want to draw a pattern but have it OR, draw what you want first, then select the INVERT button.</p> <p>If there is a need to do this backwards where the results in the grid appear the same but the actual data saved and the pattern appearing above is the opposite for transparent-flagged sprites, i can do so. I could add a menu item with the regular MENUITEM() to optionally reverse the storage for transparent patterns. Just ask.</p> <hr /> <p><span style="color: #80ffff;"><strong>ADDITIONAL:</strong></span></p> <p>This pattern editor has the ability of both importing and exporting patterns.</p> <p>To EXPORT your pattern or more than one if you have created more than one, move the cursor until it is in the horizontal center and then move the cursor until it is in the &quot;5th&quot; vertical position. The word, &quot;EXPORT&quot; will appear. Press 🅾️ and you will be asked some questions.</p> <p>The first is, <code>EXPORT TO HEX OR DEC?</code> Any time the screen turns black and you have a question, you can change your answer from <code>?</code> by pressing any of the 4-arrow keys. ⬆️ or ➡️ will select the next choice. ⬇️ or ⬅️ will select the previous answer.</p> <p>In this instance you have choices of <code>?</code> <code>HEX</code> <code>DEC</code> and <code>ABORT</code></p> <p>HEX means when you EXPORT the numbers will be listed in hexadecimal notation. DEC means they will be decimal and if you click ON the top-left-hand corner pixel, the number will be negative. Select ABORT of course to cancel this.</p> <p>The next is, <code>BASE ZERO OR ONE?</code> Once again use the arrow keys to navigate the choices. In this instance you have choices of <code>?</code> <code>ZERO</code> <code>ONE</code> and once again <code>ABORT</code></p> <p>Choose ZERO if you want your array to be preceded by <code>[0]=</code> to force the first element to appear at array position zero, IE: <code>patd={[0]=n1,n2,etc}</code></p> <p>Choose ONE which is default where normal LUA arrays start at 1 (one). IE: <code>patd={n1,n2,etc}</code></p> <p>Make your choice again with the 🅾️ key.</p> <p>If you are ONLINE a 3rd choice will appear. <code>PRESS CTRL+C NOW!</code> Well not really so much a question. Nonetheless from here press CTRL+C then select <code>DID SO</code> and 🅾️.</p> <p><code>COPIED TO CLIPBOARD</code> will appear. Select <code>NICE</code> and 🅾️.</p> <p><code>CTRL+V WILL PASTE</code> will appear. Select <code>GOTCHA</code> to confirm you understand and press 🅾️.</p> <p>Then you will return back to the editor. Be aware the arrays are <code>PATH[]</code> for hexadecimal and <code>PATD</code> for decimal.</p> <p>To use this in any Pico-8 code, merely press CTRL+V to paste as was instructed.</p> <p>For instance, let's say you made:</p> <img style="" border=0 src="/media/15232/fe-03-27-22_0.png" alt="" /> <p>and</p> <img style="" border=0 src="/media/15232/fe-03-27-22_1.png" alt="" /> <p>EXPORT those two patterns.</p> <p>Now start a new Pico-8 session by either ending FILLP EDITOR or starting a new task, and type out the following in source code:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> cls(1) ((press CTRL+V HERE)) fillp(path[0]) rectfill(0,0,31,31) print(&quot;&quot;,0,32) </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 <code>print()</code> command will move the cursor out of the way of the rectangle.</p> <p>Your code should now appear as:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> cls(1) path={[0]=0xc4e0.8,0xae20} fillp(path[0]) rectfill(0,0,31,31) print(&quot;&quot;,0,32) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Notice that the 1st pattern has a fractional number. That is because if you look at the two patterns above, the 1st one has the &quot;T&quot; flag lit for TRANSPARENT as we set it.</p> <p>RUN or press CTRL+R to run this program and be aware of the output:</p> <img style="" border=0 src="/media/15232/untitled_9_0.png" alt="" /> <p>You can see that the dark blue peeks through because of the transparency flag set for this pattern. While you cannot change the background color in this pattern, you CAN change the foreground by changing the last line thus:<br /> <code>rectfill(0,0,31,31,8)</code><br /> And there you have RED with transparent pattern.</p> <p>To see the next pattern, if you change the next-to-last line to read, <code>1</code> instead of <code>0</code> (zero) you will have:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> cls(1) path={[0]=0xc4e0.8,0xae20} fillp(path[1]) rectfill(0,0,31,31,8) print(&quot;&quot;,0,32) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>You will have the 2nd pattern with the exception that the background color is BLACK.</p> <p>To force a background color for the output, merely add a new number multiplied by 16.</p> <p>So you would get the following:</p> <p><code>rectfill(0,0,31,31)</code> ... <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_31.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_31"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_31.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_31"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_31" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> <code>rectfill(0,0,31,31,7+2*16)</code> ... <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_32.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_32"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_32.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_32"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_32" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> <code>rectfill(0,0,31,31,2+7*16)</code> ... <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_33.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_33"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_33.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_33"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_33" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> <code>rectfill(0,0,31,31,14)</code> ... <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_34.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_34"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_34.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_34"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_34" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> <br /> <code>rectfill(0,0,31,31,4+8*16)</code> ... <table><tr><td width=64> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_35.png" width=64 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_35"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_35.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_35"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [16x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_35" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </p> <hr /> <p>To load existing pattern data, copy the entire single programming line to the clipboard, it can be from any source including Pico-8, Online web browser, or even Notepad. Run this program again. This time move the pointer all the way up to select IMPORT. Follow the instructions there including to press CTRL+V to authorize paste text. Provided it is exactly as you pasted it earlier, it will be loaded back in the editor where you can make further changes.</p> <p>Here is a sample program that includes the data clipped from the FILLP()Editor and makes use of transparent patterns. Press 🅾️ to do a fancy screen wipe with patterns and change the screen.</p> <hr /> <p><span style="color: #408080;">(v4 03-29-22)</span> <table><tr><td> <a href="/bbs/?pid=108945#p"> <img src="/bbs/thumbs/pico8_fillp_demo-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108945#p"> fillp_demo</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108945#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, in immediate mode, type: <code>load #fillp_demo</code></p> <p><span style="color: #80ffff;"><strong>VVHAT'S NEW ?</strong></span></p> <p><strong> (03-29-22)</strong></p> <ul> <li>Added helpful notes for all of code.</li> <li>Slowed down the animation effect slightly so it can be seen better.</li> </ul> <hr /> <p>Here is the pattern table used in the demo if you'd like to examine it in the editor:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> path={0x7fff.8,0x37ff.8,0x137f.8,0x137.8,0x13.8,0x1.8,0x.8,0x8000.8,0xc800.8,0xec80.8,0xfec8.8,0xffec.8,0xfffe.8,0xffff.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>To do so, left mouse button triple click to highlight it. Press CTRL+C. Then run my editor. Select IMPORT and examine all unique patterns.</p> <hr /> <p><strong><span style="color: #80ffff;">Hope This Helps !</span></strong> If you have any questions or suggestions, feel free to enter them below. :)</p> https://www.lexaloffle.com/bbs/?tid=47049 https://www.lexaloffle.com/bbs/?tid=47049 Sun, 20 Mar 2022 20:41:32 UTC Outline Diverse <p> <table><tr><td> <a href="/bbs/?pid=108762#p"> <img src="/bbs/thumbs/pico8_outline_diverse-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108762#p"> outline_diverse</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108762#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS CART IN PICO-8, </strong></span>type in immediate mode, <code>load #outline_diverse</code></p> <img style="" border=0 src="/media/15232/od 03-16-22_1.gif" alt="" /> <p>Years ago when I first got the IBM-pc, I was quite interested in 8x8 pixel artwork and even though I was limited to black and white, I managed to write up a little paint program that self-modified GWBASIC to create strings of 8x8 pixeled images using multiple stringed <code>plot()</code> for each of the letters A-Z.</p> <p>If instead I pressed the CTRL key followed by a letter I could enter in a new 1-bit 8x8 pixel definition or replace an old one. To save my 26-images I just saved the .BAS program.</p> <p>Years later when color was introduced I modified my program and built from it a massive system called, &quot;Tilemaster.&quot; The version for BlitzMAX I wrote I still use to today, and in it, I have a function I call Outline Diverse or (outdiv()).</p> <p>In it take a single string of up to 9-characters and draws an outline for a sprite based upon a 3x3 field.</p> <p>You of course are welcome to develop your own outlines, using the format for a single number:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> 256 128 064 ▄ ▄ ▄ 032 016 008 ▄ ▄ ▄ 004 002 001 ▄ ▄ ▄ </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p> <table><tr><td width=128> <img src="https://www.lexaloffle.com/bbs/gfxc/15232_26.png" width=128 height=64> </td> <td valign=bottom> <a style="cursor:pointer;font-size:8pt" onclick=' var el = document.getElementById("gfxcode_15232_26"); if (el.style.display == "none") el.style.display = ""; else el.style.display = "none"; microAjax("https://www.lexaloffle.com/bbs/gfxc/15232_26.txt", function (retdata){ var el = document.getElementById("gfxcode_15232_26"); el.innerHTML = retdata; el.focus(); el.select(); } ); '> [32x16]</a> </td></tr> <tr><td colspan=2> <textarea rows=3 class=lexinput id="gfxcode_15232_26" style="width:640px;background-color:#fed;display:none;overflow:hidden; font-size:6pt;"></textarea> </td> </tr> </table> </p> <p>For instance, this pattern creates what I called a BRICK shadow. It not only creates a shadow that is X+1 and Y+1 of the image but also X+1,Y+0 and X+0,Y+1. Doing so gives a more full outline. It's numerical equivalent is 8+2+1 or 11.</p> <p>You can include the center square as well (16) to have the outline replace the actual image with a single color as well. This is useful to make enemy targets flash white or red or what have you. This choice is included in the demo above. GLOW lights up all 9-outline points and gives you not just your sprite turned to one-color but a perfect outline around it as well.</p> <p>In execution:</p> <p>Use the ⬅️ and ➡️ arrow keys to move the sprite left and right.<br /> Use the ⬆️ and ⬇️ arrow keys to change the sprite image. You can make more if you like.<br /> Use the 🅾️ key to change the outline type, be aware you can add your own.<br /> Use the ❎ key to change the color of the outline, 16-color choices.</p> <p>The CPU shows how much map() is taking with a / key showing actual CPU usage which is quite small at maximum 1%.</p> <p>And there you have it !</p> <p>The function included is called, <code>outline()</code> at 75 tokens or 176-chars and uses the following arguments:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function outline(s,x,y,t,c,h,v) -- draw sprite outline using -- the following variables: -- s=sprite # -- x=sprite's x-position -- y=sprite's y-position -- t=type of outline (binary) -- this is a single number -- from 0-511 thus: -- 256 128 064 █ █ █ -- 032 016 008 █ █ █ -- 004 002 001 █ █ █ -- c=color of outline -- h=sprite size across, def 1 -- v=sprite size down , def 1 -- (both variables of h + v -- are optional) </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>H + V are optional and yes you can give a shadow or outline to a bigger sprite, just use a number greater than one for either H or V. H=2 and V=2 or instance will use a sprite that is 16x16 pixels.</p> <p>If you have any questions, feel free to ask.</p> https://www.lexaloffle.com/bbs/?tid=47010 https://www.lexaloffle.com/bbs/?tid=47010 Wed, 16 Mar 2022 21:32:35 UTC (Solved) Odd Error In Tweetcart <p>Hey, can one of you solve this ? It doesn't make sense to me.</p> <p>This code:</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function doit(x,y,d,r,c)local b,e,h,v,a=x,x-r,y if d==1then b=y e=y-r h=x elseif d==2then e=x+r elseif d==3then b=y e=y+r h=x end for i=b,e,sgn(e-b)*2do a=b-i if(d==2or d==3)a=i-b 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>Runs correctly. THIS code, however, does not. All I did was move the <code>if(d==2 or d==3)</code> to the line above.</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> function doit(x,y,d,r,c)local b,e,h,v,a=x,x-r,y if d==1then b=y e=y-r h=x elseif d==2then e=x+r elseif d==3then b=y e=y+r h=x end for i=b,e,sgn(e-b)*2do a=b-i if(d==2or d==3)a=i-b 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>I get a SYNTAX error.</p> <p>Any ideas on what the problem is ?</p> https://www.lexaloffle.com/bbs/?tid=46989 https://www.lexaloffle.com/bbs/?tid=46989 Tue, 15 Mar 2022 18:56:53 UTC Field Of View <p> <table><tr><td> <a href="/bbs/?pid=108625#p"> <img src="/bbs/thumbs/pico8_field_of_view-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108625#p"> field_of_view</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108625#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS PICO-8 CART</strong></span>, type in immediate mode: <code>load #field_of_view</code></p> <p><span style="color: #80ffff;"><strong>VVHAT'S NEW ?</strong></span></p> <ul> <li>made them all tweetcard sized functions!</li> <li>made beam bigger.</li> <li>allows for different types of beams.</li> <li>made beam comparison smaller and faster code,</li> <li>uses less cpu.</li> </ul> <p>I have coded this so the two primary elements of drawing the beam and checking to see if there is a collision with the beam are now small functions.</p> <p>The <code>drawbeam()</code> function for instance is 280-characters and the <code>inbeam()</code> function is 225-characters which returns TRUE if there is a collision.</p> <img style="" border=0 src="/media/15232/fov 03-15-22_0.gif" alt="" /> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> -- draw solid or dotted beam: function drawbeam(x,y,d,r,c,s) (131-tokens or 280-characters) -- x=sprite's x-position -- y=sprite's y-position -- d=direction sprite is -- facing: -- 0=left, 1=up, 2=right, -- 3=down -- r=radius of beam in pixels -- c=color to plot -- s=spacing: -- 1=normal, more cpu -- 2=dotted, less cpu </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> -- check to see if player is -- in sight of beam. returns -- true if this is the case. -- assumes sprites are 8𝘹8 -- pixels: function inbeam(h,v,x,y,d,r) (121-tokens or 225-chars) -- h=player horizontal -- v=player vertical -- x=enemy horizontal -- y=enemy vertical -- d=direction beam is facing: -- 0=left, 1=up, 2=right, -- 3=down -- r=radius of beam in pixels </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 was recently discussed, asking for a method of Line Of Sight for a game. The responses involving <code>atan2()</code> and <code>sqrt()</code> were rather confusing for me to understand, so I thought it about it in my head, basically 4-triangles. And decided to write my own here.</p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/15232/chart-swiping.png" alt="" /> <p>Based upon a cart I wrote earlier to determine finger swipes or mouse movements on the Pico-8 screen.</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=27757">https://www.lexaloffle.com/bbs/?tid=27757</a></p> <p>While it does not use a circle for line of sight, it still gives you the triangle view which you want your enemies to have, and it does it using only two commands, <code>abs()</code> and <code>/2</code> quite simply, divided by 2. it is =NOT= scanning any pixels at all, collision is determined entirely through two math functions - so you could have the cone's pixels turned off but still be able to register collisions in it.</p> <p>The code should also be easy to read as I have given helpful comments for every part of it.</p> <p>It also only uses 2% of your CPU with cone view visible and 0% of your CPU when cone view is not visible, so you could definitely have a whole bunch of baddies running around still with their line of sight, determining if they can see the player or not even if you cannot see their field of view.</p> <p>In this cart you use the arrow keys for navigation, 🅾️ to turn on and off the view cone for the enemy, and ❎ key to swap between moving the player and the enemy. Pressing an arrow direction for the enemy also faces them in that direction.</p> <p>The field of view is seen as a simple dotted field and turns bright red if the player is in the line of sight.</p> <p>And there you have it ! No complex calculations, works perfectly. Examine fully documented source for details.</p> <p>If you have any questions, feel free to let me know.</p> https://www.lexaloffle.com/bbs/?tid=46976 https://www.lexaloffle.com/bbs/?tid=46976 Mon, 14 Mar 2022 21:40:25 UTC SFX Extend Past 32-Notes <p>Now that I am finally writing music in Pico-8, I would like to request from <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> that you can play beyond 32-notes with SFX().</p> <p>Already the LOOP marker will count past this but it does not start to play the next SFX, instead it is silent before restarting.</p> <p>So it would be a single flag that appears before LOOP to show this SOUND has 64-notes instead of 32. And if THAT SFX had the flag set it would be 96 instead of 64.</p> <img style="" border=0 src="/media/15232/278_music-xtra.png" alt="" /> <p>You can see it here as a PINK button to select just before LOOP.</p> https://www.lexaloffle.com/bbs/?tid=46912 https://www.lexaloffle.com/bbs/?tid=46912 Wed, 09 Mar 2022 17:43:49 UTC Psychedelic Flappy <p> <table><tr><td> <a href="/bbs/?pid=108196#p"> <img src="/bbs/thumbs/pico8_psychedelic_flappy-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108196#p"> psychedelic_flappy</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108196#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS CART</strong></span> in immediate mode, type: <code>load #psychedelic_flappy</code></p> <p>Having taken a look at <a href="https://www.lexaloffle.com/bbs/?uid=54999"> @taxicomics</a> excellent 280-character Flappy Bird:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=46858">https://www.lexaloffle.com/bbs/?tid=46858</a></p> <p>I went about to see if I could write my own, where the game increases in speed depending upon your score, and managed to do so.</p> <p>It's called &quot;psychedelic&quot; because the walls all use an interesting pattern depending upon your score.</p> <img style="" border=0 src="/media/15232/psychedelic flappy_0.gif" alt="" /> <p>Use the 🅾️ key to flap. I also tried to make it very much like the original FLAPPY game where you just tap the key and already the bird is bouncing up - that and the opening size. It also only has one set of walls you must pass so there is no chance for the game to be impossible with two openings too close to each other for the player to navigate.</p> <p>The wall positions and patterns are the same every time so this game could for instance be speedrun with no unpredictable wall positions. Also the game speeds up for every point so eventually you have to have very good reflexes indeed for a higher score.</p> <p>I am only checking the nose of FLAPPY so if your middle or back hits a wall, you are still safe and it does not count as a collision. You can tell when you do collide with the wall as the color suddenly goes <span style="color: #ff0000;">red</span> and you lose control of Flappy. Your final score will appear in the top-left-hand corner of the screen.</p> <p>Press CTRL+R to start a new game at any time.</p> <div> <div style="max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> t=rnd g=1y=0z=0s=0r=rectfill::_::srand(s)fillp(t(-1))w=t(95)+16_set_fps(25+s)for i=128,-8,-g do cls()r(i,0,i+7,w-12)r(i,w+12,i+7,127)?s ?chr(176),62,y if(pget(68,y)&gt;0or y&lt;-8or y&gt;128)g=0pal(6,8) z+=.2y+=z if(btnp(4)and g&gt;0)z-=4 flip()end s+=1goto _ </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 code is currently at 125-tokens or 247-characters and there are no special characters in the sourcecode nor does it use the spritesheet as other Pico-8 tweet code Flappy Bird have done in the past so the game in its entirety can be both pasted and read from TWITTER with ease.</p> <p><span style="color: #80ffff;">This is the 4th version and I think this is about as far as I can compress it.</span></p> <p>My top score is 12. How high can YOU get ?</p> https://www.lexaloffle.com/bbs/?tid=46886 https://www.lexaloffle.com/bbs/?tid=46886 Mon, 07 Mar 2022 20:17:20 UTC Multi Torchlit Effect <p> <table><tr><td> <a href="/bbs/?pid=108117#p"> <img src="/bbs/thumbs/pico8_multitorch-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=108117#p"> multitorch</a><br><br> by <a href="/bbs/?uid=15232"> dw817</a> <br><br><br> <a href="/bbs/?pid=108117#p"> [Click to Play]</a> </td></tr></table> <span style="color: #ff80ff;"><strong>TO LOAD THIS CART</strong></span> in immediate mode, type: <code>load #multitorch</code></p> <img style="" border=0 src="/media/15232/tor 03-05-22_0.gif" alt="" /> <p>With the continued interest in torchlit effects, you are familiar with the post I made where you could have one torchlit effect for the center of the screen for the player:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=46533">https://www.lexaloffle.com/bbs/?tid=46533</a></p> <p>Well this one is a little different and a bit more complex with 32-lamps although the code is explained in great detail for everyone to understand. in that it lets you have as many lights as you want in a 63x63 area map and they animate starting from darkness to brightness and back again.</p> <p>Unlike other torch effects, this one does not change palette but uses a new set of tiles. So it is entirely possibly to use the code here to have a torchlit effect reveal something that normally was not seen earlier.</p> <p>During the cart use the arrow keys to navigate and the 🅾️ button to light or unlit a lamp that you are atop. Press ❎ to turn on or off the flickering lights effect. A display of information is kept at the top in addition to showing you how many lamps you have left to light.</p> <p>If you want to &quot;win the game&quot; turn on all the lamps and you will be notified when you have done so.</p> <p>This source code is heavily remarked to explain exactly how everything works as I believe this is an important concept to be learned by all Piconians.</p> <p>Thanks to <a href="https://www.lexaloffle.com/bbs/?uid=16423"> @Krystman</a> for showing multiple ways of accomplishing torchlit effects.</p> <p>-- <a href="https://www.lexaloffle.com/bbs/?tid=46286">https://www.lexaloffle.com/bbs/?tid=46286</a></p> <p>And to <a href="https://www.lexaloffle.com/bbs/?uid=56007"> @professir</a> showing multitorch could be done in a game setting:</p> <p><a href="https://www.lexaloffle.com/bbs/?tid=46646">https://www.lexaloffle.com/bbs/?tid=46646</a></p> <p>If you have any questions, feel free to ask !</p> https://www.lexaloffle.com/bbs/?tid=46861 https://www.lexaloffle.com/bbs/?tid=46861 Sun, 06 Mar 2022 03:36:57 UTC