Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General :: [Thread List]

I was curious to know if it was possible to recode the key to pause a cart during runtime. That is, directly in the source-code itself.

If you go to make a program that asks your name and reads the real keyboard via poke 24365,1, if you hit letter "P" it will pause with an interrupt menu. Is there some way, in code, poke or otherwise, to reconfigure the pause key to something like "ESC" or backwards apostrophe "`" ?

How can this be done ?

P#66733 2019-08-17 17:25

Cart [#brick_smash1-0#] | Code | 2019-08-17 | License: CC4-BY-NC-SA | Embed

P#66732 2019-08-17 14:09

Cart [#elementary_cellular_automata-0#] | Code | 2019-08-17 | License: CC4-BY-NC-SA | Embed

Just an cellular automata i made in under a hour.
It's the first program i published here i hope you like it :D
You can specify the colors, size and rules but you need to open it in pico-8.
No. you don't need to press buttons.

P#66728 2019-08-17 11:09


I made a little game using PICO-8's "mode 3" for the LOWREZJAM 2019 and Climate Change Jam!

Cart [#dollarone_global_warming-1#] | Code | 2019-08-17 | License: CC4-BY-NC-SA | Embed

If you only read one thing, this is it: Press enter for the menu where you can disable the help text!

Oh no! The rising waters has made a mess of Don's beach-house. Help him rebuild it - just chop down a tree and extract some rocks and find a nice place by the sea.

Use arrows to move, Z (or C or N) to toggle harvest mode (then arrow to harvest) and X (or V or M) to build the house.

Note that you can chop down and extract as many resources as you want.

Just in case the waters rise again, it might be worth keeping some spare resources...

You can skip dialogues with the buttons, or disable help in the menu (press enter). You can also restart the level or choose a new level from the menu.

Good luck!

P#66727 2019-08-17 08:05

Cart [#sugarnspice-0#] | Code | 2019-08-17 | License: CC4-BY-NC-SA | Embed

You control two cats, Sugar (blue) and Spice (pink).
Help them get their respective color donuts.

Sugar - left and right arrow keys
Spice - S and F

This was my submission for the 2019 lowrez gamejam.
I followed the "Fruit Drop" tutorial from NerdyTeachers to make this tiny co-op game.

My very first finished game, was loads of fun to make. Can't wait to make more
different types of games as I gain more experience!

Feel free to use this game as you please.

P#66723 2019-08-17 03:51 ( Edited 2019-08-17 03:56)

Cart [#spookyseptemberjamannouncement-0#] | Code | 2019-08-17 | License: CC4-BY-NC-SA | Embed

Spooky September Jam!

It's time for the annual Halloween jam! This time a bit early -- the idea is that if we make spooky (or spoopy) games from now until September... we'll get to actually play them in October! :D

If you remember URL the 3 Color Jam from a couple years ago, this is going to be a 'sequel' to that -- the limitation this time is 4 colors -- whoooooo!!

Some more details are in the announcement cart (..along with something else, because I can never resist)

  • what: 4-color halloween spooky themed jam
    Use any time you want/have from now thru the end of September
    to make a spooky (or silly) 4-color game
  • when: now until October
  • where: pico8 forums! (if you want it linked in the gallery cart;
    otherwise you can use itch or whatever
    if you tweet @enargy and include '#ssjam' i'll link it on the jam page

..yes there's an easter egg in the announcement cart..
...but only for the impatient..

P#66722 2019-08-17 02:50

Cart [#anteform-0#] | Code | 2019-08-17 | No License | Embed


Steve Johanson has disappeared and his girlfriend Sally Franklin has hired your detective agency to locate him. Even before you get on the scene there are signs that maybe this isn't just a simple missing persons case. Can you crack it? Explore Anteform Valley and its settlements, talk to its residents, search desks and files, and build up your skills as you collect clues to figure out what really happened to Steve and maybe even prevent it from happening again.

This is a weird detective story RPG in the style of the old-school 8-bit Ultima games as they were found on the C128. I hope you enjoy it.

It exhausts many of the resources available to a PICO-8 app, and required minimization before it could be converted into a cartridge (in fact this version fits with just one byte to spare). The full source of Anteform is available on GitHub for anyone interested in how it works. I have also provided a manual for it in a couple of formats, so you may want to grab and peruse the Anteform manual as a PDF or the Anteform manual as an ePub as well as the cartridge itself. Downloadable binaries are also available on the Itch.io Anteform page.

If you have any comments, questions, or even just random thoughts related to it, I'll be happy to listen. As this is a mystery story though please be mindful of ruining the fun for others and avoid posting spoilers. I have played all the way through and do not know of any bugs in this version (1.0) but I could have easily missed some.

This game was built using the Minima Engine, and if you like it you may like Minima (play online or download) as well. Both use the same interface and share some of the same graphics but have completely different stories, settings, and characters. They're also different genres played at a different scale. Minima is a traditional RPG set on a full world with castles and towns; this game is set in Anteform Valley with villages and individual buildings. This game places more emphasis on finding clues either by talking with people or searching through things. There's no magic in it, but it is in the weird mystery genre and so things aren't quite what they appear in the beginning, either...

P#66721 2019-08-17 02:16 ( Edited 2019-08-17 16:55)

After some time of figuring everything out (including what I want to do in the future regarding the path of my life), I finally finished another snippet. This lets you efficiently create particles, as seen in this gif here:



Assuming you've placed the downloaded file into a folder called src, import with

#include src/ptc_x.lua

The compressed version doesn't have an extension, so just use src/ptc_x_c without .lua


You can create a particle group like so.


now, g_smp will become a particle group and will be positioned at 64/64 (center of screen with unmodded camera).


  • x/y
    • X and Y location of the group
  • _ary
    • table that contains the particles
  • _tk
    • Tick value. Increases by 1 per .tick() call.
  • max
    • Allows you to limit how many particles the group can create/have.
  • linkcam

    • Links a camera to the particle group.


To link a camera, you'll need to use the collowing code in _init(). This code will set the groups camera to your own camera. This is needed because the particles will delete themselves when off camera.


This assumes your cam has x and y values.

Alternatively, if you have a different setup, you can set the specifics for x/y...



Particle Types need to be functions that return an object. This is needed because of the possibility of randomization.

    --create lava eruption
    return  {

        --initial velocity
        --and gaining velocity

        --colors (shifts through
        --array per tick)

        --collision flag, nil for
        --no map collision.

        --life length

        --weight (for collision)
            --[x and y]
            --effects bounce rate

        -----optional parts here----
        --setting size and size-gain
        --will make it a puff particle.



  • x/y
    • X and Y location of spawn (arranged by x/y of particle group)
  • xv/yv
    • Xvelocity and Yvelocity of spawn. The first value is the initial velocity, and the second value is how much that value increases per frame. Setting the second value to 0.1 for the yv for example will cause the particles to continously increase their yvelocity. In the gif, notice how they start launching up then fall as if gravity is affecting them.
  • c

    • Color array. Every tick of the particles lifespan will increment through the color array. Use only 1 value for a solid color, or make up your own patterns.
  • cflg

    • Collision Flag. This means that the particles will have physics if they come in contact with a sprite that has the set ID. Set to nil to skip collision checking, or just don't add this property to save yourself some tokens.
  • l

    • Life. This is how many frames the particles will stay alive for.
  • w
    • Weight. This is a Table and contains 2 values. One for calculating the division(slowdown) of the xvelocity and another for calculating the slowdown of the yvelocity. You only need this if you're using collision. This is also ignorable if you want to save tokens.
  • s
    • Optional, sets the size of the particle. If its less than or equal to 1, it'll use pset instead of circfill. Otherwise, it becomes a "puff particle", which is a type of particle that flips patterns (between 0b1010010110100101.1 and 0b0101101001011010.1) to create a simi-transparent circle creating the illusion of a blending effect. This is ignorable
  • sg

    • Optional, sets the size-gain. The size of the particle will increase by this value per frame.

    Emitting particles

To create particles, you'll need to use the emit function. For example:

g_smp.emit(fx1, 90)

The first value is the particle group we've created earlier. The second value is how many particles it'll create per frame (or per call).


To actually get your particles to draw on screen, use the .tick command in _draw().


That should be about it. If I missed anything, I'll add it later.



function cdec(mx, my, xl, yl, flg)
    local _=function(x,y,f)
        return fget(mget(x/8,y/8),f)

    if _(mx+xl, my+yl, flg) or _(mx, my, flg) then
        return true

    return false
--[[end of cdec.lua]]

    --particle patterns for puff particles
ptc_pats={0b1010010110100101.1, 0b0101101001011010.1}
--create a new particle grou[
function _pgrp(x,y)
    local a={
        --particle array
        --tick, can be used for custom code
        --max particle limit

    a.emit=function(dt, rpt)
        for i=1,rpt do
            if #a._ary<a.max then

                local _a=dt()
                _a.w=_a.w or {1,1}

                add(a._ary, _a)

        for i=1, #a._ary do
            local s=a._ary[i]
            if not s then goto e end
            local _={

            if s.lc>=s.l or stat(1)>0.9 then
                del(a._ary, a._ary[i])
                if stat(1)>0.9 then break end


            if not s.cflg then goto d end
            if cdec(_[1], _[2], s.xv[1], s.yv[1], s.cflg) then
                if not cdec(_[1]+s.xv[1], _[2]-s.yv[1], s.xv[1], 0, s.cflg) then

            local color=s.c[1+s.lc%#s.c]

            if _[1]-a.linkcam.x>128 or _[1]-a.linkcam.x<0 or _[2]-a.linkcam.y>128 or _[2]-a.linkcam.y<0 then s.lc=s.l goto e end
            if not s.s then
                goto px
                if s.s<=1 then fillp() goto px end
                goto cl

            --set pixel
            pset(_[1], _[2], color)
            goto e
            --set circle
            circfill(_[1], _[2], s.s, color)
            goto e

    return a
P#66719 2019-08-17 01:29 ( Edited 2019-08-17 01:59)

Cart [#two_songs-0#] | Code | 2019-08-16 | License: CC4-BY-NC-SA | Embed

This cart is a few things:

It’s a branching music demo featuring music from Robby Duguay’s excellent “Nine Songs in PICO-8” cart.

It’s a proof of concept for my PICO-8 dynamic music engine, which I have dubbed “Zero-Track”.

And finally, this cart is an invitation:

If you write music and would like to try out writing something non-linear for the PICO-8, feel free to drop me a line; it would be awesome to work with music written explicitly for this sort of use.

If you are working on a game and would like to include music dynamically tied to what's happening in the game, I'd love to see if my music engine could be a good fit for your game, as well.


For those interested in using the Zero-Track engine, I'm happy to chat about it, but here's some light documentation as well:

First, you should include a call to ZERO:UPDATE() from your _UPDATE() or _UPDATE60() function.

Then, ZERO:PLAY() functions like MUSIC(), except that instead of a pattern number, it takes a special track object.

The track object needs to implement two functions:

  • TRACK:PATTERN() : for now, your track object should return a four byte number where each byte is the ID of one SFX (basically the format used for storing patterns in memory, minus the special flag bits which will be ignored if included in the return value). Nothing is stopping you at this point from building and poking the SFX you desire into memory, but helper functions for that aren’t included yet.
  • TRACK:NEXT() : return the track object that will provide the next pattern after the one provided by this track. Your track can return an independent object, or for flexibility can at this point just return itself and update its internal state so that the next call to PATTERN() will return a different value. This function is called “just in time” as the music engine needs the next pattern, so the returned track can be based on realtime game stats.

For now that's it! I'll add more functionality as it looks like I need it.

Thanks and enjoy!


P#66709 2019-08-16 05:08 ( Edited 2019-08-16 05:23)

Cart [#snerf-0#] | Code | 2019-08-16 | License: CC4-BY-NC-SA | Embed

P#66707 2019-08-16 01:38

Cart [#gamuretihi-0#] | Code | 2019-08-16 | No License | Embed

I decided to make a space invaders clone in pico-8 over the weekend. I've been having a bit of trouble with a weird collision glitch that only happens when my Alien entities react to colliding with the right side of the screen. I've Worked through the logic in my head and my code should work. I've tried numerous variations of what I currently have in my cart thinking that maybe there is something with the code execution that is causing it to be off.

I'm pretty sure that the problem is related to the bit of code below. However, I'm not 100% sure since I haven't been able to fix it yet :-)

update = function(self)      
  if(self.x <= 0) then
    adr = 1
    self.x = 0
  elseif(self.x >= 120) then
    adr = -1
    self.x = 120
    self.x +=self.v*adr             

Please direct me towards a solution if you can. This type of collision detection is usually pretty straightforward to do, but I've spent more time trying to fix this bug than I've spent making everything else.

I was able to fix the problem by moving the collision detection into a different loop to separate it from the position update so that the direction wouldn't be changed before all the entities had finished updating.

Cart [#zitomarufe-0#] | Code | 2019-08-16 | No License | Embed

P#66686 2019-08-16 00:51 ( Edited 2019-08-16 20:01)

Cart [#cratesncrushers-0#] | Code | 2019-08-15 | License: CC4-BY-NC-SA | Embed

Version 0.1

I've made dozens of platformers in Flash. We had to write all of our own code for collisions back in those days and there was a lot of demand for moving platforms and crates.

Moving platforms are hard. It has to move itself and anything on it.

Crates are even harder. It's like a moving platform, but you can push it and the moving platform can carry it too.

Push Me Pull You

A push can become a branching path with many things responding to one request for movement. This engine handles only one knobbly branch at a time. If the collision doesn't have too many parts, it will get it right.


I made this engine using an object pattern so I could figure out how the hell to make it. Hopefully it's readable and if you hate objects that much then please optimize it and post your results. I'm more than happy to see this engine updated.


The more contact points involved in a collision, the more code it takes to solve. The engine pushes the first thing it sees, it doesn't think about the consequences of a pyramid of crates stacked on your head with odd gaps and a random bit of wall in the middle. I once wrote a loop-solver that handles this but it was some heavy duty stuff, not Pico 8 material. Or prove me wrong, I'd be happy to see an engine that handles it without going full Box2D.

P#66704 2019-08-15 20:27 ( Edited 2019-08-15 21:08)

Cart [#hisebbeno-0#] | Code | 2019-08-15 | License: CC4-BY-NC-SA | Embed

Triangular version of a twister bar, a popular demoscene effect. Made this while figuring out how to do this for the Atari ST (both have annoying video memory layouts :P) and after this helped me figure out how to do it in M68k assembler, I decided to post it just for shits and giggles.

P#66701 2019-08-15 18:44 ( Edited 2019-08-15 18:44)

Cart [#ouijia-0#] | Code | 2019-08-15 | No License | Embed

You can download it and use up to 8 controllers to have a ouijia board party. Try try it out. The multiplayer voting stuff doesn't seem to work in the browser.

P#66699 2019-08-15 18:25 ( Edited 2019-08-15 18:27)

Cart [#puzl-0#] | Code | 2019-08-15 | License: CC4-BY-NC-SA | Embed

A simple match-3 game.


  • Left, Right, Down: move blocks
  • Up: drop block
  • X, C: rotate left and right

Blue, green, red, and orange blocks of the same color match horizontally and vertically. Black blocks are "locked," and randomly take on a color once a block touching them clears.

itch.io version

P#66696 2019-08-15 17:35

Starting to make a game based on Conway's Game of Life.

Cart [#conway-0#] | Code | 2019-08-15 | License: CC4-BY-NC-SA | Embed

Z to place cells
X to bring them to life!

P#66687 2019-08-15 01:42

While starting work on my little deflektor project I decided to have classic 7 segment led style numbers, my first iteration (the one currently in the game...) is based on sprites but I wanted something a bit more versatile. This is a basic line drawing small library to handle 7 segment led like any digit length display. It should be fairly easy to define a text set and draw 7 segment text desplays (just need a table with the segment mapping for every letter and put up a wrapping function that receives a text and not a number)

It supports background displaying of segments ("off" segments), color configuration and segment width configuration. The cart includes the library and a very basic demo on what it can do

I might be working on reducing token size a bit (library itself is around 300 tokens) and I think there's some salvageable space there, but don't count on it for now

Hope it helps someone out needing a 7 segment style display

Cart [#led7segment-0#] | Code | 2019-08-14 | No License | Embed

P#66679 2019-08-14 18:49

Cart [#bahemumizi-0#] | Code | 2019-08-14 | License: CC4-BY-NC-SA | Embed

P#66676 2019-08-14 10:00

Hi PICO-8 community! My name is Jay and I've been a PICO-8 fan for a long time and I wanted to gauge interest in a book I'm writing. The book takes you through the journey of creating a whole game using PICO-8. I start you from scratch and not only shows you the code, but I walk you through it with explanations and pictures. I also discuss design, game development process, offer insights and take you through the journey of making a game. I've attached a 3 page excerpt from my book so far and wanted to get thoughts from everyone. My goal is to teach you to make a game by walking you through one. I hope to give you an appreciation for game creation and in the process you learn something about design, art and code.

A year ago I wanted to clone one of my favorite arcade games Defender. Except that I had the idea of documenting what I did the whole time. It took a while but I have a stack of notes of not only the creation of it, but the design exercises of why things are they way they are and justifying the order of each feature. After I finished, I realized that I could write a book that walks you through the whole thing. I've written 5 chapters so far and I'm estimating how much work it would be to finish and thinking about if anyone would find it useful or interesting.

If you had a book like this, what would you want or expect from it?

A 4 page excerpt of what I'm thinking:

Gif of the final game:

Thanks in advance!

P#66668 2019-08-14 07:07 ( Edited 2019-08-14 07:18)

Cart [#sudaduzafa-0#] | Code | 2019-08-14 | License: CC4-BY-NC-SA | Embed

I am undertaking a project to port Super Mario Bros to the PICO-8! (Yes, I know a few people have tried to do this before, but this one is mine, so I want to make it extra special, and extra accurate.)

So far, I've gotten the level renderer to work (almost! missing a few items and functionalities, but the general idea is here). It takes hex data just like you'd see in the original game, and renders it exactly like the game would. I give an example of World 1-1 here, but I've tested this with the entirety of the first two worlds and a few of the bonus areas. If anyone has any questions about this project, please let me know!

P#66661 2019-08-14 00:26
View Older Posts
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-08-17 18:25 | 0.254s | 4194k | Q:222