Log In  

no, I'm not referring to giving the do in for loops and while loops a free pass. rather, I'm referring to the rarely-used naked do block. the primary function of the do block by itself is to arbitrarily introduce a new scope. for example, a code snippet I just wrote:

 local yclp=127-17*pizzapower

this makes it clear to the reader that I do not intend to use yclp at any other point in the program. In this case, it becomes fairly obvious that I lifted an inline expression to its own line for clarity's sake. however, the do construct here eats up a token, making using it disadvantageous. considering that the do block's only real use has to do with usage of local variables, and the local keyword already has its cost annulled to encourage its use, I think it would make sense if there was a similar exception for the by-itself do block. what do all of you think?

P#82897 2020-10-13 20:54 ( Edited 2020-10-13 20:56)

Cart #shifttrap-0 | 2020-03-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

After a freak laboratory accident, ninja-in-training Nina finds herself trapped in an alternate dimension where the walls shift each time she jumps. Now she must collect the scattered gears to fix this shattered world and escape! But with 32 challenging stages to outwit, that will be no easy task...

hey all!! sol here. it's been a while since my last game, but I haven't been resting on my laurels. this time around, I've made a puzzle-platformer with a focus on fast gameplay and a novel mechanic-- each time you press the jump button, the walls will shift between the foreground and background! you can also cling to walls and jump off of them to reach greater heights. I've built a lot of really tricky puzzles around this, so I hope y'all enjoy!

I would also like to give a special shoutout to my testers, whom I owe a debt of gratitude for playing the earlier, more frustrating builds of this game. It's thanks to them that I can present this polished final version to you!

and of course, feel free to reach out to me either on these forums or on twitter if you have any questions or comments!

have fun and good luck!

P#74037 2020-03-18 19:33

as a lot of us are brutally aware of, pico-8's limitations are very fun, but can also have a serious impact on code readability. one particularly nasty problem is that when saving tokens, descriptive names for constant values are one of the first things to go out the window. Up till now, this was an unavoidable problem. However, with the recent introduction of the INCLUDE directive, pico-8 now has a preprocessor and a model for how preprocessor directives should work. I'd like to propose a DEFINE directive for supporting simple text substitution.

for example, let's say we are doing a simple branch based on a cel value:

 local c=mget(x,y)
 if c==4 then
 elseif c==5 then

it's impossible to even guess what this code does. but it's hard to argue that adding "local health_pickup=4" is worth the tokens.

instead, if we had a DEFINE directive, we could change the above to:

 #DEFINE health_pickup 4
 #DEFINE coin_pickup 5
 local c=mget(x,y)
 if c==health_pickup then
 elseif c==coin_pickup then

this would be flattened to be identical to the first code snippet when exported to p8.png. the result is far more readable, and uses no extra tokens. I think DEFINE directives should be able to be placed anywhere, to enhance readability, but I don't believe they need to be scoped, or nestable for that matter. since it'd be possible for a macro name to shadow a variable name, I'd suggest syntax highlighting, changing the text of a macro usage to orange, which would make accidentally using a macro when you meant to use a variable much rarer.

what do y'all think? is this a feature you would like to see in pico-8? I'm trying to get a discussion about this going, so ideas and feedback would be very welcome!

P#73423 2020-02-24 19:29

Cart #sybils_tail-2 | 2019-10-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Sybil's Tail is a tiny, 15-30 minute long platformer made for PICO-8. Run, jump, slide, grab, and toss your way through 6 bite-sized areas as you search for a mysterious meteorite that fell nearby!

hi there!! after 4 months of working on it, I've finally finished my first PICO-8 game, Sybil's Tail! this project was a lot of fun to work on, and getting everything to fit into the 32k of cart space required a lot of tricks to make things work right. a large reason it took so long was all the rewriting and compressing it took to get in all in there. but! the result is exactly the game I set out to make! I hope y'all enjoy exploring this little 8-bit world I've made.

it's also on itch here, which includes native exports, and the soundtrack. speaking of, I would like to extend special thanks to @kitorchid, who made the incredible cover art for the soundtrack, and @osmoru, whose adorable artwork formed the basis of the cartridge label design. In addition to those commissions, I also received wonderful artwork of Sybil from @MarziManed and @_pexl, who are both very cool artists that you should check out as well! And of course, I would like to thank all testers and of course my friends, without them none of this would have been possible.

some statistics (from version 1.0):
number of songs: 9
number of music patterns: 33
number of SFX: 63
non-empty map tiles: 3180
sprite animation frames: 99 (computed at runtime)
bg animation pixels: 60
number of object types: 25
number of in-game objects: 734
tokens: 8190
code size prior to data interleaving: 19435 bytes

in other words! for PICO-8, it's a big game. sometime I'd like to write a blog post about all the tricks I did to squeeze everything in there, but for now, I'm just happy to finally have it out here. hope y'all enjoy it!

[UPDATE version 1.1]
The game now makes use of the "secret" pico-8 color palette-- the result is far more colorful, while still retaining the color contrast between the day and night segments. additionally, balloons and ribbons now respawn, making the game a tad less frustrating. a couple bugs have also been fixed, and several have been added.

for the record, this is intended to be the last non-bugfix release for the game-- so I hope y'all enjoy it!

[UPDATE version 1.1.1]
1.1.1 is primarily a bugfix release, and addresses the following issues:

  • mobs can no longer kill sybil in cutscenes
  • fixed issue where picking up mob and ribbon at the same time would cause mob to appear over sybil's head
  • fixed an overflow bug that would cause credits screen to disappear after a while
  • fixed issue where the sound effect for a hard post-jump landing was used for soft landings and vice versa
  • fixed issue where sliding speed would not be reset when respawning
  • fixed issue where respawn position would be noticeably offset while in fullscreen mode
  • fixed issue where color of some signs would be inconsistent/flicker
  • removed graphical distortion that appears when the final boss kills sybil. too many players mistook it for a genuine bug…
  • color 2 is no longer mapped to secret color 4 during the daytime
  • carrying a mob into the starting area during the day will no longer cause their colors to glitch out
  • sybil's lighting now reverts to normal as she enters her house at the end of the game


P#67959 2019-09-21 00:42 ( Edited 2019-10-10 00:43)

Follow Lexaloffle:        
Generated 2020-10-31 20:05 | 0.178s | 4194k | Q:48