morningtoast [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=12806 PICO8 vs NFTs, Ars Technica feature story <p>There's been a lot of drama recently surrounding PICO-8 games being turned into NFTs and then being sold on the GameStop NFT market...all without permission from the creators. One of my games got caught up in the mix and it's a shitty scenario across the board.</p> <p>Ars Technica published a feature this morning highlighting the whole ordeal. It's a good overview of the drama with interviews from <a href="https://www.lexaloffle.com/bbs/?uid=1"> @zep</a> and other creators that had their games hijacked. Worth a read for everyone that makes games here and something to keep an eye out for in the future.</p> <p><a href="https://arstechnica.com/gaming/2022/08/indie-devs-outraged-by-unlicensed-game-sales-on-gamestops-nft-market/">https://arstechnica.com/gaming/2022/08/indie-devs-outraged-by-unlicensed-game-sales-on-gamestops-nft-market/</a></p> <img style="" border=0 src="/media/12806/25_uploader.png" alt="" /> <p>Zep has been working hard deal with a lot of it and helping to get them off the GameStop market. Huge thanks to him for all his effort on this situation. It's not fun for anyone but he's certainly taken a lead role.</p> <p>I've helped out where I could in regards to dealing with this problem but I chose not to get too involved otherwise. It's shitty that someone took my work and cashed in on it, but at the end of the day it's not taking any bread off of my table. I'm not going after legal action or anything that hardcore so I'm squarely on the &quot;it's the principle of the thing&quot; side of the coin.</p> <p>This is not a thing and it will continue to be a thing, I'm guessing. Someone has proven you can turn our games into NFTs and cash in. Expect more and keep your eyes out.</p> https://www.lexaloffle.com/bbs/?tid=48763 https://www.lexaloffle.com/bbs/?tid=48763 Fri, 05 Aug 2022 15:53:12 UTC Helitack Challenge <p> <table><tr><td> <a href="/bbs/?pid=114586#p"> <img src="/bbs/thumbs/pico8_helitack-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=114586#p"> helitack</a><br><br> by <a href="/bbs/?uid=12806"> morningtoast</a> <br><br><br> <a href="/bbs/?pid=114586#p"> [Click to Play]</a> </td></tr></table> </p> <p>Play above, search Splore for &quot;helitack&quot; or use <code>LOAD #HELITACK</code> from your PICO-8 commandline.</p> <h2>Only you can help...</h2> <p>Budgets are tight and staff is short so we're looking for volunteers to help keep our parks safe and beautiful. </p> <p>Your job is to partol the park and rescue lost hikers and contain any forest fires that might get started. If you can keep things under control for 3 shifts, you can become a full-time helitack ranger.</p> <p>Your helicopter is equipped with all the gear you need to get the job done. Stay focused, stay calm, and do your best.</p> <p>We also recommend reading the handbook. It might just save a life.</p> <p><img style="" border=0 src="/media/12806/7fire_1.gif" alt="" /> <img style="" border=0 src="/media/12806/7fire_0.gif" alt="" /> <img style="" border=0 src="/media/12806/7fire_2.gif" alt="" /> <img style="" border=0 src="/media/12806/7fire_1.png" alt="" /></p> <h2>How to play</h2> <p><em>This game supports gamepad and keyboard controls. Use the pause menu to check gamepad and controller mappings.</em></p> <ul> <li><strong>Up/Down</strong>&nbsp;- Throttle; Forward/back</li> <li><strong>Left/Right</strong>&nbsp;- Rotate direction</li> <li><strong>Z</strong>&nbsp;- Switch modes</li> <li><strong>X</strong>&nbsp;- Use selected mode</li> <li><strong>P</strong>&nbsp;- Pause + Music toggle</li> </ul> <h3>Credits</h3> <ul> <li>Design &amp;&nbsp;code: Brian Vaughn, <a href="https://www.lexaloffle.com/bbs/?uid=12806"> @morningtoast</a></li> <li>Music &amp;&nbsp;sound:&nbsp;Brian Follick, @gnarcadevgm</li> <li>Art: Impbox, used assets from his game&nbsp;<a href="https://www.lexaloffle.com/bbs/?tid=2186"><em>Tempest</em></a></li> <li>Additional art:&nbsp;Brian Vaughn</li> </ul> <h3><a href="https://morningtoast.itch.io">Play more of my games on Itch.io</a></h3> https://www.lexaloffle.com/bbs/?tid=48570 https://www.lexaloffle.com/bbs/?tid=48570 Wed, 20 Jul 2022 23:57:10 UTC Making a direction compass <p>Does anyone have an example of a horizontal directional compass in a game?</p> <p>The type of compass that is just a strip and moves left/right as the character rotates on screen? So like facing .25 in rotation would be North and so on from there. I don't need waypoints indicated, just have the direction be in the middle when the character is facing that direction.</p> <p>Example:</p> <img style="" border=0 src="http://newworldinteractive.com/isl/uploads/2015/09/compass-brad.jpg" alt="" /> <img style="" border=0 src="/media/12806/compass_0.gif" alt="" /> <p>I'm working to figure it out as we speak but this time I remembered to poll the community <em>before</em> I do a bunch of work, lol.</p> <p>I think my struggle is how to turn the rotation of the character in speed for the horizontal compass and so the compass letters line up when a cardinal direction is hit.</p> <p>Any ideas to approach or pointers, tips, examples are appreciated.</p> https://www.lexaloffle.com/bbs/?tid=48163 https://www.lexaloffle.com/bbs/?tid=48163 Wed, 15 Jun 2022 14:37:55 UTC Poll: Most folks play on the PICO-8 desktop app <p>I put a completely unscientific research poll up on Twitter asking folks where they usually play PICO-8 games and the majority said they primarily play using the desktop client.</p> <ul> <li>Desktop App: 56.7%</li> <li>Desktop web browser: 23.3%</li> <li>Phone web browser: 16.7%</li> <li>Handheld App (non-phone): 3.3%</li> </ul> <p><a href="https://twitter.com/MorningToast/status/1524587941250715653">See the Twitter poll</a></p> <p>I put up the poll because PICO-8 is in a unique spot where it can be played various ways on various platforms, and yet we're not able to design games to account for one or the other. This has always been a point of ponder for me and having this data helps me think about it better.</p> <p>However, the audience that saw my tweet is probably regular PICO-8 players and devs anyway, so it's not the casual gaming public that most certainly plays through the web on Itch.io and whatnot. But, still interesting to see the results.</p> <p>What does this tell us? I mean, not much, I guess, but to me it says the laptop/desktop is the device (and environment) where we're mostly playing. It's not on your phone or on a handheld like the RG351. It also means Splore is likely a primary source of access/finding of games. We might also be able to infer that the game is being seen on a rather larger display, not phone or handheld sized...so worry about sprites being &quot;too small&quot; could be less so.</p> <p>Again, not a deep dive or anything like that but some interesting data all the same. Use it for good, not evil.</p> https://www.lexaloffle.com/bbs/?tid=47797 https://www.lexaloffle.com/bbs/?tid=47797 Fri, 13 May 2022 13:28:36 UTC Refactoring with coroutines, when do they make sense? <p>I'm trying go back into my game Destructopillar to try add/remove some things but see I am at token limit. I've done some basic refactoring and stripping out unneeded functions that are now part of the core but it's not enough.</p> <p>I was looking over the manual to see what functions are available now and was reminded about <strong>coroutines.</strong> The problem is, I never really understood how to <em>apply</em> coroutines. I get the concept and I think I understand the gains (like saving tokens), but just can't figure out where in the game it would benefit from coroutines, if at all.</p> <p>Please check out the Destructopillar game below real quick, even just the first stage and you'll get the gist. Then <strong>please call out the places where you could see coroutines being useful.</strong></p> <p>I'm <strong><em>not</em></strong> looking for cart code analysis or digging into what's there right now. Just looking at the game on the surface...the actors, the actions, the scenes...would coroutines possibly make sense anywhere?</p> <p>And the answer could really be they wouldn't help in this type of game. And that's okay...because I just don't know. I sense that coroutines could help and make things better and save me some token trouble but maybe not.</p> <p> <table><tr><td> <a href="/bbs/?pid=98247#p"> <img src="/bbs/thumbs/pico8_dpillar21-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=98247#p"> Destructopillar</a><br><br> by <a href="/bbs/?uid=12806"> morningtoast</a> <br><br><br> <a href="/bbs/?pid=98247#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=47497 https://www.lexaloffle.com/bbs/?tid=47497 Thu, 21 Apr 2022 23:52:43 UTC Joys of a retro handheld and PICO-8, the RG351V <h1>The Agony and Ecstasy of the PocketCHIP</h1> <p>I arrived at PICO-8 because I bought a <strong>PocketCHIP</strong> back in 2016. The PocketCHIP came pre-loaded with PICO-8 and prior I had no concept of a &quot;fantasy&quot; console, but I was excited to make games again. Unfortunately, the PocketCHIP was a beautiful-yet-awful piece of hardware.</p> <p>Essentially, the PocketCHIP was a Raspberry Pi-like mini computer wrapped in a case with a touchscreen and keyboard. On the surface, the PocketCHIP was a pretty raw looking piece of hardware...but I dug the style and was excited when it arrived. Yet I quickly found out that the experience of the PocketCHIP was something to be desired.</p> <img style="" border=0 src="/media/12806/uploader.jpg" alt="" /> <h2>All bark and no bite</h2> <p>The keyboard was awful and despite coming with PICO-8 -- <em>a game hub</em> -- playing games was very unsatisfying. I needed a new bezel with a built in d-pad just to make playing games tolerable. I even had to put nail polish on keys to know what did what. <strong>In short, it was not fun to play on.</strong> But it did lead me to PICO-8 and for that I'm thankful.</p> <p>Since then I've slapped PICO-8 on various Pi game stations and obviously played on my PC. Playing PICO-8 on a phone is certainly do-able but I'm not keen to the virtual d-pad and buttons...but in a pinch, it gets the job done. </p> <p>But this week I got what I think is a really good solution for getting PICO-8 in my hands in a way that is comfortable, reliable, and satisfying. <strong>I got an Anbernic RG351V handheld</strong> and it's been a true joy.</p> <h1>Better late than never</h1> <p>I know I'm kinda late to the retro handheld party but here I am. I did some research and learned what I could about what's available - and there's a lot out there. I settled on the RG351V because the form factor was something I liked and all the reviews I read talked it up well.</p> <p>Yes, The RG351 will play a ton of your old console games. Believe me, I've been loading it up with all the PC Engine and NeoGeo games I love to play, but I have to admit that easy PICO-8 setup was a big selling point. And it wasn't a lie.</p> <p>Putting PICO-8 on this thing was a matter of copying some files into a folder and that's it. The RG351V has built-in wifi so it'll launch right into Splore and you're golden.</p> <img style="" border=0 src="/media/12806/351p8.jpg" alt="" /> <img style="" border=0 src="/media/12806/invop8sq.jpg" alt="" /> <h2>The experience you deserve</h2> <p>I know many, many people play our P8 games on the web through the site (probably) using the keyboard. At best, you're on a PC with a gamepad. This is fine and I appreciate people playing something I've created, but when I bought that PocketCHIP and started making games, the handheld experience and fun is what I was chasing. Where the PocketCHIP failed hard, the RG351V succeeds in spades. </p> <p>To say my PICO-8 playtime will increase now is an understatement. My P8 play had decreased over the past couple years due to other things happening in life, yes, but also just because playing on my laptop isn't really convenient nor that enjoyable. Playing on my big TV is okay but lets be honest, our 128x128 games lose a little something on a giant screen.</p> <p>There are a ton of retro handheld options out there now, from big to tiny, cheap to expensive. You probably already have one but if not, look into it. If you've been on the fence, let PICO-8 be your excuse and maybe get yourself one for Christmas. </p> <p>This is the type of experience PICO-8 deserves and you deserve.</p> https://www.lexaloffle.com/bbs/?tid=45111 https://www.lexaloffle.com/bbs/?tid=45111 Fri, 22 Oct 2021 15:30:03 UTC The story of Destructopillar <p><em>TLDR: This is a game that I started years ago and didn't finish. I went back to it on a whim and got it playable. You can download it. But really this is a story about returning to game design and PICO-8 and the joy it brought.</em></p> <h2>Don't call it comeback</h2> <p>Hello. I'm Brian aka <a href="https://www.lexaloffle.com/bbs/?uid=12806"> @morningtoast</a>. I jumped on the PICO-8 bandwagon back in 2016 and made a handful of games. For those that remember and played my games, <strong>thank you!</strong> For everyone else, <a href="http://morningtoast.itch.io">please check out my old carts</a> - they're still fun. But after a few years of pumping out games, I got a little burned out. I ran out of creative juice, got frustrated, and just had other things to do so I left the gamedev scene.</p> <p>Scoot ahead a few years and I get an alert that someone commented on an old cart post here in the forum. It felt great seeing someone had played (and enjoyed) an old game. It reminded me a) why I make things, and b) games live beyond their release date...it's all about who finds them.</p> <p>But that was enough for me to crack open my PICO-8 folder and revisit some of old work. What I found was a treasure trove of unfinished games, a few of which were honestly near-complete that I just never pushed across the finish line. Not sure why...but I decided to try and make one of them at least playable and release as a &quot;lost cart&quot; or something like that.</p> <h2>Destructopillar</h2> <p>The game I chose was the last game I worked on called <strong>Destructopillar</strong> that has you controlling a monster caterpillar that tries to destroy cities and fight off military attackers. Kind of like the old Snake game mixed with SimCity if you were the disaster.</p> <img style="" border=0 src="/media/12806/python_1.gif" alt="" /> <p>I remember working hard on the game trying to get it right but kept running into blockers. I don't remember if it was token count (probably) or just the game design at large, but nonetheless, I was never happy enough with it to have folks play it. I was one of those PICO-8ers that only released completed games (shame on me). But now I'd rather share something that is 90% complete than nothing at all. I mean, who am I? Just some doof making cheap games on PICO-8 for other doofs. P8 is about sharing and learning so why not do that.</p> <p>So what did I find when I opened up my Destructopillar cart? What I found was that I had forgotten everything! I'm looking at the code and trying to remember the quirks of P8 and moreso what the hell I was thinking when engineering the thing. It's weird coming back to a project years later and asking, &quot;why I'd do that?&quot; and so on...you get mad at yourself! But after a few plays of the cart as it was, I listed out the things that were not finished and set out to fix them.</p> <img style="" border=0 src="/media/12806/python_4.gif" alt="" /> <p>And frankly, there wasn't much to fix...a few bad sprites, a few missed ID#s that caused some grief, and a little overweight but otherwise it was pretty close. I got Destructopillar very playable and then realized that the reason I never finished it was just some poor design decisions. I'm guessing I got the game to a point where I thought I was done(ish) and then did some playtesting only to realize it was missing a lot of fun. And at that point I was too pooped to undo everything and try to fix it.</p> <p>My goal now was not to fix the design problems but rather just get the game playable so I could share it. I'm so out of practice with PICO-8 that diving into that old code would be futile. It'd be easier to start over but now I'm at the point where I need to re-learn P8! Maybe soon but not right now.</p> <p>The main problem I see with Destructopillar is mostly balance. It gets way too easy, way too quickly...sucking some of the fun out of it by the 4th level. I still dig the concept and the controls but it does get kind of boring and grindy, especially for an endless arcade game. I'm also bummed there's no music...</p> <p>But it's very playable and not un-fun, so I hope you try it out on your console. The cart for Destructopillar is below. Just save the image locally and load it with your PICO-8 client.</p> <h2>Please enjoy Destructopillar</h2> <p> <table><tr><td> <a href="/bbs/?pid=98247#p"> <img src="/bbs/thumbs/pico8_dpillar21-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=98247#p"> Destructopillar</a><br><br> by <a href="/bbs/?uid=12806"> morningtoast</a> <br><br><br> <a href="/bbs/?pid=98247#p"> [Click to Play]</a> </td></tr></table> </p> <h3>How to play</h3> <p>Controls:</p> <ul> <li>Use left/right to control your snake</li> <li>Action button will use a boost to shoot your snake across the board (hit it again to stop)</li> </ul> <p>Each segment of your snake is a weapon! Your weapons will automatically attack enemies, so all you have to do is control Destructopillar to crush buildings and avoid damage. If a segment takes too much damage, it will die. If your snake gets hit in the head, you lose a heart. Lose all your hearts and game over.</p> <p>As you destroy buildings, your power meter will fill up. When it gets full, a piece of fruit will appear. Run over the fruit to add a new segment to your snake. The type of fruit will determine the weapon of the segment.</p> <ul> <li>Pear: Machine gun, attacks air &amp; ground targets</li> <li>Blueberry: Laser, attacks air targets only</li> <li>Orange: Flamethrower, attacks ground targets only</li> <li>Cherry: Heals all segments</li> </ul> <p>If you manage to collect 3 of the same fruit in a row, those segments will combine to create a powered-up segment with a stronger weapon.</p> <p>After you reach the goal of each level, an exit will open up on one side of the map. Just find it and enter to advance. This game is endless. I never got around to make a boss battle or anything like that...but levels do get bigger and get more enemies as you go.</p> <p><strong><em>But wait, there's more!</em></strong></p> <p>After I had fixed Destructopillar, I discovered <em>another</em> cart that was half-done that was also labeled as Destructopillar! I loaded the cart thinking it was just another copy of the other game but found it was pretty different. Lets call it Destructopillar Alpha.</p> <h3>Destructopillar Alpha</h3> <p>The concept of being a snake that destroys towns was the same but some of the gameplay aspects were different. Like progressing based on people killed rather than just destruction. The pacing is a lot slower and the weapons &amp; enemies are different. But in Alpha you can re-order your snake segments to match colors but the speed boost feature is not there. There are also achievements and different modes in Alpha. The effects were somewhat different too...and I liked them better in Alpha than the other even, I dig the smoke.</p> <p>So it looks like Alpha was trying to be a more &quot;complete&quot; game but one that I'm guessing didn't get done due to token limit. Given the extras like unlocks, modes, and seeing how some of the graphics got simplified, it tells me this was done due to filesize. But...there were gains in the refactoring process: more enemies, better weapons, faster play, and better performance. I don't think Alpha is a better version of the game, just a different version that shows the evolution of design and engineering.</p> <p>If you want to play Destructopillar Alpha, you can download that cart and play locally. Just save the image and load it in your PICO-8 console. However, mind you, I have not touched the Alpha version! No fixes or attempts to make it better. It'll probably crash.</p> <p><strong>Try out Destructopillar Alpha and compare it to above. Which do you like better?</strong></p> <img style="" border=0 src="/media/12806/dpillar-alpha.p8.png" alt="" /> <p>This dive back into PICO-8 was very refreshing and rewarding. Even though it wasn't that long ago, it feels like forever since I've thought about or tried making games. It's something I love and always seem to return to when I need comfort. I guess now is one of those times.</p> <p>And taking a look at games I had designed that never quite got finished was VERY interesting. I don't often go back and look at old projects...I make and move on...but this trip back was enlightening and motivating. I'm going to see what other unfinished games I can revisit and make available for play - even if it plays rather poorly. If nothing else, maybe it will inspire someone or give them an idea for a new game; one that will get finished and loved by all.</p> <p>If you're interested in trying out other games I've made, please check out <a href="http://morningtoast.itch.io">my Itch.io page</a> or my profile here on the BBS. I might suggest <a href="https://morningtoast.itch.io/alien-harvest">Alien Harvest</a> and <a href="https://morningtoast.itch.io/buzzkill">BuzzKill</a> as they're a couple of my favorites that I'm proud of.</p> <p>Again, to everyone that helped me make these games way back when, <strong>thank you!</strong> Maybe I'll hop back on this horse soon and see what new fun I can come up with. </p> <p>Thanks &amp; cheers<br /> ~Brian</p> https://www.lexaloffle.com/bbs/?tid=44884 https://www.lexaloffle.com/bbs/?tid=44884 Tue, 05 Oct 2021 17:44:45 UTC Scrolling map with collisions, pushing objects <p>I'm really struggling with this one...I'm trying to vertical scroll a map (shooter style) and wall tiles in that map collide with the player stop them BUT ALSO push the player down if appropriate. </p> <p>I got the mget() and fget() stuff kinda of working as I'd hoped but detection seems wishy washy.</p> <p>I have code for map collisions that works well when the map isn't scrolling, and I tried to translate that over but with the map moving, it didn't work well at all. Especially when it comes to pushing the player down off screen if they are blocked by a wall tile.</p> <p><strong>I'm hoping someone might have made a cart that uses this type of technique or a snippet that I can reference.</strong></p> <p>My fallback (as always) is just using a bunch of objects and move them individually (to get the scrolling) but I'm trying not to do that so a) I learn something, and b) because moving a bunch of objects in sync never works and always looks choppy. </p> <p>Any thoughts, examples, or similar shared stories is appreciated.</p> https://www.lexaloffle.com/bbs/?tid=34585 https://www.lexaloffle.com/bbs/?tid=34585 Wed, 26 Jun 2019 14:38:55 UTC Evil Cat Lord's Love <p> <table><tr><td> <a href="/bbs/?pid=64686#p"> <img src="/bbs/thumbs/pico8_dehobigezu-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=64686#p"> Evil Cat Lord's Love</a><br><br> by <a href="/bbs/?uid=12806"> morningtoast</a> <br><br><br> <a href="/bbs/?pid=64686#p"> [Click to Play]</a> </td></tr></table> </p> <p>This is a late entry for the Tweet Tweet Jam from last week. I know, I know...but hey, I had a marathon of meetings at work so I made good use of the time.</p> <p>Nonetheless, here it is. A simple little game inspired by the Tank &amp; Plane LCD game I had as kid. Try to get the people from one side into the house while avoiding the Evil Cat Lord's love. But mind the gate, it blocks you until it goes down. See how many people you can save before you're hit (or get stuck).</p> <p>Believe it or not, this is my first tweetcart (or close to it). I see the tweetcarts fly by on Twitter all day long but never really bothered to try one myself. I guess all the &quot;art&quot; carts aren't really my jam and I find myself at a loss when it comes to the math and magic behind making them.</p> <p>Keeping things within the two tweet limit of 560 characters was quite the challenge. I took advantage of P8's wonderful symbol set and all-in-all, I'm pretty happy I was able to get things boiled down. I learned a lot and took advantage of a few shortcuts I had since forgotten or didn't know prior. I can probably go back through some full game carts and save a ton of extra space/tokens after what I've learned.</p> https://www.lexaloffle.com/bbs/?tid=34310 https://www.lexaloffle.com/bbs/?tid=34310 Thu, 23 May 2019 01:22:48 UTC Why are things being drawn wiggly? <p> <table><tr><td> <a href="/bbs/?pid=63074#p"> <img src="/bbs/thumbs/pico8_yipipanumu-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=63074#p"> Trying to make a snake</a><br><br> by <a href="/bbs/?uid=12806"> morningtoast</a> <br><br><br> <a href="/bbs/?pid=63074#p"> [Click to Play]</a> </td></tr></table> </p> <p>I'm sort of at a loss right now on trying to get my snake to not be so wiggly when it's drawn. You can see the red head of the snake is fine...and nice clean draw no matter which way it's heading.</p> <p>Press Z to add a segment and you'll see that each following segment is very wiggly when its draw, not clean at all...and I don't know why.</p> <p>I don't know if it's just the way it's gonna be or if I'm drawing things wrong or just doing my calculations wrong for where segments are positioned. Or a little bit of everything wrong.</p> <p>Any help, insight or suggestions are appreciated.</p> https://www.lexaloffle.com/bbs/?tid=33734 https://www.lexaloffle.com/bbs/?tid=33734 Wed, 27 Mar 2019 21:59:28 UTC Can you duplicate map sections and treat them as separate? <p>I'm wanting to make a big play area in my game with several cities in it. I made a sprite map of the city (see below) and I want to draw that map in several places. This is working great using map() drawing several times but when you make a change to a map using mset(), it changes it in every location that map is drawn...and that makes sense.</p> <p>Sooo...is there a way to have a map, duplicate that map, and draw it to be treated as a separate entity/instance in conjunction with mset()</p> <p>City A, City B, and City C all use the same sprite map but when I use mset() on City A, I don't want it to change B or C. </p> <p>I'm probably complicating things way more than I need, but I thought using map() + mset() would be better/faster/efficient than managing an object and draw for each building in the city. </p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/12806/landgen_000.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=33725 https://www.lexaloffle.com/bbs/?tid=33725 Mon, 25 Mar 2019 20:48:51 UTC String to integers for table keys <p>In order to save on some tokens, I put configuration number values into a string and then parsed that string. I then tried to use one of the values as a table key and it barfed on me.</p> <p>Turns out, even though math functions recognize a string number as a number, using it as a table key will fail. You need to convert that string number into a integer for it work as a table key. My solution was to just add zero to number and it turned out okay.</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={&quot;apple&quot;,&quot;orange&quot;,&quot;line&quot;} a=&quot;1&quot; printh(a+10) -- good, returns 11 (integer) printh(t[a]) -- bad, returns FALSE a+=0 printh(t[a]) -- good, returns &quot;apple&quot; as expected</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>All in all, it makes sense but I had never come across this before somehow. But seems kind of weird that Lua will let you be lazy with numbers for math but not for other things. </p> https://www.lexaloffle.com/bbs/?tid=33541 https://www.lexaloffle.com/bbs/?tid=33541 Wed, 06 Mar 2019 15:51:26 UTC Separate tables vs one big table <p>It's been a while since I've made a game so I'm running into questions I probably had answers previously...my apologies if this is a rerun.</p> <p>I typically use a table for each type of object - enemies, bullets, powerups, etc. - and then loop over each table checking to see if the collide or whatever. Something like...</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> for bk,b in pairs(bullets) do for ek,e in pairs(enemies) do if collide(e,b) then ...do something... end 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>And then there could be several of these depending on which objects interact with each other.</p> <p>But I've also seen where you use one table for all objects and then check object types to see if they should interact.</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> for bk,b in pairs(bigtable) do for ek,e in pairs(bigtable) do if e.type==1 and b.type==2 then ...do something... end if e.type==3 and b.type==4 then ...do something... end 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>Is there any advantage to one of these methods over the other? </p> <p>Personally, having a table per object type makes it easier to stay organized but having a ton of loops going feels troublesome and can be hard to manage. Likewise, looping twice over a giant table sounds less ideal as well.</p> <p>So...just wondering. I'll probably keep coding how I always do because it works and keeps me sane, but was just thinking about the impact.</p> https://www.lexaloffle.com/bbs/?tid=31356 https://www.lexaloffle.com/bbs/?tid=31356 Thu, 31 May 2018 20:32:51 UTC Running PICO-8 windowed on Raspberry Pi <p>I'm trying to get P8 to run in a window on my Linux Windows install on my Raspberry Pi, so I can have it and my editor up on the same desktop (like I do in real Windows). But by default, P8 runs fullscreen. I've tried launching it from terminal with the flags outlined in the docs and even by editing the config file, but none of that is working, it's still going fullscreen.</p> <p>Anyone else tried to run it windowed on Linux (RPi)? ..and got it working? Or is all that windowed stuff for &quot;real&quot; Windows only.</p> https://www.lexaloffle.com/bbs/?tid=30850 https://www.lexaloffle.com/bbs/?tid=30850 Mon, 26 Feb 2018 23:11:58 UTC Local variable behavior weirdness <p>Sorry for the vague subject line...I don't know how to best describe what I'm seeing. That probably means this issue is certainly something I'm doing wrong but just don't know what. I swear I've done it in the past without problems so it has me wondering if it's a new P8 version thing or if I'm just crazy...anyway...</p> <p>I have something like this...</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> pool={ {name=&quot;Jerry&quot;}, {name=&quot;Tom&quot;} } list={} function mybutt(myx) local obj=pool[1] obj.x=myx obj.y=20 add(list, obj) end mybutt(10) mybutt(64) mybutt(82) </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 the problem is that when I loop through 'list' every value of 'x' is the last value added via the function, so in this example, 82.</p> <p>But when I do rewrite as below it works as I think it should 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> pool={ {name=&quot;Jerry&quot;}, {name=&quot;Tom&quot;} } list={} function mybutt(myx) local tmp=pool[1] -- This is the part that feels wrong local obj={} obj.name=tmp.name obj.x=myx obj.y=20 add(list, obj) end mybutt(10) mybutt(64) mybutt(82) </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's like it won't add unique properties to the local 'obj' variable when I create it from another table. I have to put the pull from the other table (pool) into its own variable, then populate the table I actually want to add to the list.</p> <p>I could swear that I've used the first version in the past and it has worked just fine...yes? No?</p> <p>I shouldn't have to do it that way. Creating local from a global and then adding to that local should work just fine using dot notation and so on. It's bizarre.</p> <p>And maybe I'm just all sorts of wrong, in which case, why doesn't example #1 work like I expect?</p> https://www.lexaloffle.com/bbs/?tid=30635 https://www.lexaloffle.com/bbs/?tid=30635 Sun, 21 Jan 2018 22:28:36 UTC Creating an arc path between 2 points <p>I'm looking for some help or snippet on how to create a path for an object that gives an arc between 2 coordinates. </p> <p>I have code/examples for waves and orbiting in a circle, but I haven't needed to make an arc between 2 explicit points before. I'm not making an Angry Birds game but need that type of physics arc created that then allows a object to follow that path. </p> <p>Ideally, something that lets you increase the gravity/friction/whatever that will slow the object down the further it gets away from the source point. </p> <p>Although...I guess I could just trial-n-error it from the source point, messing with the variables until the thing lands where I need it. But having a 2-point method would probably be more helpful in the long run (for everyone).</p> <p>Even if you have a cart that has something similar, I'm happy to code surf for things and learn.</p> https://www.lexaloffle.com/bbs/?tid=30623 https://www.lexaloffle.com/bbs/?tid=30623 Fri, 19 Jan 2018 12:33:27 UTC Export from commandline, possible? <p>Is there a where to run Pico-8 from the commandline so that it can compile/export without having to run the actual game? I'm looking for a way to create the HTML export without having Pico-8 running.</p> <p>I'm often on a computer where I can't install P8 but can code with a cloud IDE. Of course, that's just blind coding without any running or debugging. So was thinking if I can could install Pico-8 on my web server (which I can ssh into) and run a command that will tell P8 to export the web version, then I might be able to do some debugging and testing.</p> <p>Possible?</p> <p>I see there's a headless mode now available but not sure that would allow this type of workaround. That sounds like a normal &quot;run and quit&quot; type of thing.</p> https://www.lexaloffle.com/bbs/?tid=30554 https://www.lexaloffle.com/bbs/?tid=30554 Thu, 04 Jan 2018 11:33:07 UTC Publishing games on Itch.io, Newgrounds and others <p>It goes without saying that you should always publish and share your PICO-8 games here on the the official site. Not only will you get great feedback, your game will appear in the Splore menu of PICO-8. So it's a no-brainer for any game you make.</p> <p><strong>But where else should you publish?</strong></p> <p>When I made my first PICO-8 games, I wasn't sure where to put my games. I saw a few others use Itch.io so I did the same...and that's where my game publishing journey started.</p> <p>.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.</p> <p><strong>Itch.io</strong><br /> <a href="http://www.itch.io">http://www.itch.io</a></p> <p>Pros</p> <ul> <li>Nice site that's easy to use for everyone</li> <li>Customizable game pages</li> <li>Web player and binary download options</li> <li>Good analytics</li> <li>Donation options</li> </ul> <p>Cons</p> <ul> <li>Limited exposure and findability</li> <li>Lots of competition, focus on download games</li> </ul> <p>Itch.io is a great platform on which to publish games (PICO-8 or otherwise). The site is nicely designed so it's easy for visitors to come and play. They also let you customize your game page so it's easy to add your own graphics and styles to help promote your game. I create a rather generic template for my games but also made a &quot;fancy&quot; one to promote Alien Harvest...<a href="https://morningtoast.itch.io/alien-harvest"><span style="text-decoration: underline;">check it out.</span></a></p> <p>Itch.io also offers decent analytics and tracking for your games. You can easily see views, downloads and other stats. </p> <p>One nice feature is that the site allows you to offer the web player version of your PICO-8 game but you can also put up other files for download (for free or purchase). So you can also add your binary game exports to your page. The site is setup to be a one-stop for game publishing.</p> <p>You can also setup a pay-what-you-want style action for your games. So while you might not be able to charge out-right for your game, you can ask for a &quot;donation&quot; and maybe get some beer money...bonus!</p> <p>If there's anywhere Itch.io seems to lack behind some of the others is in exposure and discoverability. Itch.io is host to thousands upon thousands of games, so you're a small fish in a very big sea. Sure, you should promote your game through every channel you care and drive them to Itch.io but I wouldn't rely on Itch.io to give you the exposure you hoping for. When I released a new game, stats were high for about 48-hours and then died drastically. Feedback and comments from players also seems to be sparse.</p> <p>.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.</p> <p><strong>Newgrounds</strong><br /> <a href="http://www.newgrounds.com">http://www.newgrounds.com</a></p> <p>Pros</p> <ul> <li>Good exposure without much effort, player feedback</li> <li>Basic analytics</li> <li>Revenue sharing</li> </ul> <p>Cons</p> <ul> <li>Can't customize game pages</li> <li>No donation options</li> <li>Web site feels quite dated</li> </ul> <p>Newgrounds was one I hadn't heard of until recently when someone suggested it on Twitter. I checked it out and found that the web site is far from great to use. It's not difficult, per se, it's just ugly and the experience overall isn't that great. It feels very dated.</p> <p>Newgrounds seems focused on web playable games, so you won't find the download competition like you have on Itch.io...but Newgrounds is also host to non-game creations as well, such as movies, music and art. They seem to do a nice job of separating and organizing.</p> <p>The game manager for admins isn't bad either. Itch.io's is nicer and has more features but Newgrounds is still easy to use. You can't customize your page template or anything, so you'll need to get creative with your promotional text.</p> <p>Newgrounds limits you to 2 game uploads per day, which probably won't be an issue unless you're uploading your back catalog of PICO-8 games like I was and had to spread them out over a couple days...just something to keep in mind. They also don't offer any way for people to pay for your games, but they do offer revenue sharing so you'll get a cut of ads on your game pages. Kinda nice but not sure how much it will yield...probably need a VERY popular game to warrant anything.</p> <p>Where Newgrounds seems to excel is in good exposure and feedback. After just a few days with my game up on Newgrounds, it has several thousand views and some great feedback from players...far more comments that I ever got on Itch.io, and that's with zero promotion on my side. Newgrounds' base seems to be more active in playing new games which is great. It's hard to say what the longtail is...I haven't had games up for long.</p> <p>.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.</p> <p><strong>Konegregate</strong><br /> <a href="http://www.kongregate.com">http://www.kongregate.com</a></p> <p>Pros</p> <ul> <li>API for scores and achievements</li> <li>????</li> </ul> <p>Cons</p> <ul> <li>Site is ugly; difficult for visitors</li> <li>????</li> </ul> <p>To be honest, I can't really say anything about Kongregate because I haven't upload any games there.</p> <p>I find their site a pain to look at and use, and that was enough for me to not use it. If a site isn't easy for me to use then I'm not going to ask others to go there. </p> <p>I do know that Kongregate offers an API so that you can tap into their system for high scores, achievements and other things, which is a really nice feature, but I haven't tried them with a PICO-8 game yet.</p> <p>If you have experience using Kongregate, please share your story.</p> <p>.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.</p> <p><strong>Where else do you post your games?</strong></p> <p>As I've learned about game publishing sites, I've found it a real pain to keep up with them. I know it's too much of an ideal to just pick one and go with it...at least if you want as many people as possible to play. But making the rounds to each when I make game updates or changes is exhausting. I'm still trying to come up with a nice system that feels efficient...I'm close but not close enough to not make it feel like a chore.</p> <p>Please share your own game publishing experiences in this thread so we can build up a good resource for folks looking to get their games in front of people.</p> https://www.lexaloffle.com/bbs/?tid=30237 https://www.lexaloffle.com/bbs/?tid=30237 Sun, 12 Nov 2017 00:27:12 UTC Changing icon in Windows binary exports <p>Has anyone successfully changed the app icon for Windows binary exports?</p> <p><table style="width:640px" cellspacing=0 cellpadding=10><tr><td bgcolor=#ffeedd><span style="color: #101010;"><br /> By default, the cartridge label is used as an icon. To specificy an icon from<br /> the sprite sheet, use -i and optionally -s to control the size. For example, to<br /> use a 2x2 sprite starting at index 32 in the spritesheet:<br /> <br></span></td></tr></table></p> <p>I tried those flags as documented but it doesn't seem to change. Even without trying to use something from the spritesheet, the icon doesn't use the label or anything - it's just the Pico-8 logo.</p> <p>Not end of the world if it's not working...just trying it out. Maybe a .11 bug? Dunno...</p> https://www.lexaloffle.com/bbs/?tid=30175 https://www.lexaloffle.com/bbs/?tid=30175 Thu, 02 Nov 2017 13:53:02 UTC Playing games on your phone as a web app, it works! <p>After several days of trial-and-error and testing with help of Twitter friends, it seems playing Pico-8 games on your smartphone is very do-able and comfortable, with only minor trade-offs.</p> <p>I've put 3 of my games up for mobile play. Please give them a try on your phone and see what you think.</p> <p>NOTE: You need to visit these links on your phone. Visiting them on your desktop will just load the game as normal.</p> <ul> <li>Invader Overload: <a href="http://www.morningtoast.com/games/invaders">http://www.morningtoast.com/games/invaders</a></li> <li>BuzzKill: <a href="http://www.morningtoast.com/games/buzzkill/">http://www.morningtoast.com/games/buzzkill/</a></li> <li>Bustin: <a href="http://www.morningtoast.com/games/bustin">http://www.morningtoast.com/games/bustin</a></li> </ul> <p>I used <a href="https://github.com/headjump/pico8_html_template"><span style="text-decoration: underline;">this template from Dennis Treder</span></a> as a starting point for the actual web controls that interact with Pico-8. I then customized it a bit to add more control layouts and make it into a &quot;web app&quot; of sorts for phones. On phones you can choose to have a web page behave as a &quot;standalone&quot; app, which basically means it runs in the web browser but hides the back button and all that type of stuff...so it looks like a native app. I'm still cleaning up my modified code but once I have it nice, I'll share it as well.</p> <p>When you visit any of those game links on your phone, you should see a landing page asking you to add the link to your home screen. When you do that, you'll get an icon on your phone. Launch the game from that icon and the Pico-8 should boot and you can play.</p> <p>I know it works on iPhones well. Android seems to vary a bit but should be good.</p> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/12806/Photo Oct 29, 10 58 46 PM.png" width=200 height=500 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/12806/Photo Oct 29, 10 59 22 PM.png" width=200 height=500 alt="" /> <img style="" border=0 src="https://www.lexaloffle.com/bbs/files/12806/Photo Oct 29, 10 59 35 PM.png" width=200 height=500 alt="" /> <p>Based on feedback from Twitter testers, the games should work on iPhone and Android phones. They'll probably need to be somewhat modern phones with latest browsers.</p> <p>The one thing that is known to be wishy washy is the sound. On iPhone Safari, there is no sound at all. On Android Chrome, sound seems to be choppy at best. So your mileage may vary when it comes to sound performance but the game itself should be pretty playable. Not ideal but closer than I've ever seen.</p> <p>The on-screen controls are pretty ugly but honestly, they work really well with zero lag (that I've seen). One cool thing about that template is it allows for alternate layouts during the game. You'll notice in the games I've posted that you'll get different layouts depending on what part of the game you're in. Pretty spiffy.</p> <p>This isn't a perfect method of playing Pico-8 games on phones but it's the closest I've ever seen and the closest that I feel okay putting my games out there and asking people to play. Lack of sound is a bummer but I'll take that hit to make my game easily accessible on a phone. I'm also hoping that near-future updates to Pico-8 and browsers will solve the sound problem for us.</p> <p>I don't have the resources to get Pico-8 games ported over to native apps for phones so they appear in the App Store or whatever. Having a web app work like a native app is the closest I'll probably get...if nothing else, it's a great way to test to see if making your game a true App is worth it.</p> <p>Please give the games linked above and try them on your phone. Post here about your experience or hit me up on Twitter <a href="https://www.lexaloffle.com/bbs/?uid=12806"> @morningtoast</a> and share your report.</p> https://www.lexaloffle.com/bbs/?tid=30147 https://www.lexaloffle.com/bbs/?tid=30147 Mon, 30 Oct 2017 10:19:05 UTC