Log In  

Old enough to have known the golden age of Amstrad and Amiga ;)
Still own a few Tilt and Joystick magazine (yeah, I am french).
Professional software architect, hobbyist gamedev.

Game & experiments repo: https://github.com/freds72

Twitter account: https://twitter.com/FSouchu

Multicart is really a nice expansion feature, to offer content beyond the 32K boundary.
However, with reload not supporting BBS-hosted carts, large games are banned from BBS.

Is that something considered in the pico roadmap to bring back multicart games to the "official" forums?

Note that supporting more than a couple of data carts will require rework of the BBS file management.

  • support for upload many files at once
  • support for listing cart identifiers
  • support for headless export of p8.png (limited to html/bin at time of writing)
  • ability to assign same id pattern to many carts (ex: vracing_0... vracing_10)


P#73670 2020-03-04 19:53

As per documentation, reload does not support BBS carts.
However, the function fails without any error while trying:

-- does nothing (or not??)

Could the function reports an error in such case?

P#73597 2020-03-01 21:42 ( Edited 2020-03-04 19:54)

On Chrome: Version 79.0.3945.88 (64 bits)
How to reproduce:

  • navigate to any game
  • click on "code" dropdown
  • page becomes unresponsive (cannot be selected, game cannot be launched...)

Not reproduced on Edge (and apparently on Firefox - cannot test)

P#71715 2020-01-02 21:05 ( Edited 2020-01-02 21:48)

Cart #freds72_snow-3 | 2019-12-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Winter is coming (as every year actually...), time for some skiing!
Enjoy going down the slope, trying to beat your previous track record or freeriding skills!

Grab coins for some extra time bonus - watch out for off track hazards!
Your polar jacket can sustain a couple of direct hits, avoid trees anyway...

Note: there is no end racing line - you will loose :] question is how much time will you last?


  • Left/Right: control direction
  • c: jump (hold to charge)
  • x: restart (if stuck)
  • follow GPS pointer if lost


  • blue: easy
  • red: moderate, with side tracks. Practice your tricks.
  • black: heavy slope, with side tracks. Tricks or time out :)

About the PICO-8 Advent Calendar

This winter another group of PICO-8 elves has worked hard to release a shiny new toy every day in December. Check out the Pico-8 Advent Calendar 2019 each day for a new surprise!

There's even more festive fun waiting on last year's calendar! https://www.lexaloffle.com/bbs/?tid=32388

Happy Holidays!


Before I joined the ranks of the Advent Calendar 2019, @johanp, @p01 and others were toying with terrain generation - resulting in this:

With the theme being set to winter, I had this prototype ready to test the idea:

The gameplay evolved from some endless runner to something more akin a time attack game.
Thanks to feedback from early testers, and several gameplay changes, I think I have something that is fun to play and challenging enough!

Source code (+unminified version): https://github.com/freds72/midwinter

Update 1.3

  • updated: high level gameplay :]
  • know bug: minor visual artifacts on black track (due to the way I cull terrain)


  • Advent Calendar folks! ( @enargy :)
  • Midwinter mask: Andrew Elkerton (I guess...)
  • intro music: @gruber_music
  • trifill: @p01
P#70497 2019-12-02 19:39 ( Edited 2019-12-08 18:18)

Cart #ellipsefill-0 | 2019-08-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A little experiment with filled ellipse, supporting any rotation angle (the tricky part!).
The code is moderately fast as it finds the root of the ellipse equation to get the segment extent for each row.

Car headlight example use:

P#66809 2019-08-20 20:47

A couple of devs are investing into multicart games (like 5 or more data carts).
We are all put back by the artificial loading times (eg minutes)

Would it be possible for the fat client to either ignore load time throttling, or only activat throttling for the published version?
I want the multicart multiverse, not loading screens ;)

P#66040 2019-07-23 06:44 ( Edited 2019-07-23 06:46)

Using the cough undocumented cough stat(102) from a game hosted on itch.io, I got back:


This is indeed the url of the iframe (which doesn't help).
A more correct behavior would be to report the parent page url, with the benefits of:

  • having a predictable outcome
  • actually preventing rogue hosting (somehow...)

Note: Looking at the HTML, I see that url is retrieved from:

var str = window.location.hostname;

Using that alternate code would fix the bug:

var str = (parent !== window) ? document.referrer : document.location;
P#65996 2019-07-21 08:37

Ce post est la version française de: PICO-8 Giveaway

Initié par @Liquidream, plusieurs developpeurs offrent des licences pico8 à des jeunes (et moins jeunes) qui n'auraient pas les moyens mais pleins d'idées!


Pour avoir une chance de gagner, repondez à la discussion officielle avec un petit message:

  • pourquoi vous voulez une licence?
  • quel jeu(x) comptez-vous créer?

Les Règles

  • Ouvert à tous (sauf ceux qui peuvent se payer une licence ET un sandwich!)
  • Une seule entrée par personne
  • Date de cloture (ouch!) Samedi 6 Juillet @ 11:00 (heure Paris)
  • Les gagnants seront choisis au hasard
  • Il y aura autant de gagnants que de licences offertes
  • La licence sera attribuées via un compte mail (message privé)

Bonne chance 😁🤞

P#65558 2019-07-04 19:16 ( Edited 2019-07-05 06:12)

Ghost Rally

Cart #grally-0 | 2019-06-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


The game is a race-against-yourself rally game. It features accurate rigid body physics and car handling.
Goal is to beat yourself every lap!

Enjoy racing as in the 80's, whith over powered cars very close to the public!
tip hitting any of the lil' dudes:
incurs a +5s time penalty :]

warning the game is complete yet the car handling is really picky - I am releasing it as is, as I can't tweak the gameplay without breaking the physic engine :/


  • left/right: turn
  • up/down: accelerate/brake
  • c: recover (when flipping over!)

Dev Log

Source code & tools: ghost-rally


Sound effect code: taken from @tiagosr rally game
Trifill: @p01

Physic Engine

Physic engine was started from scratch following Barraf's 'classic' paper.
I quickly dropped this version as it relied too much on numeric convergence !

The current version uses part of Randy Gaul C++ physic library and underlying principles.
The key aspect to get stable collision is to resolve impacts only for the incident face, e.g. the plane most facing the ground:

This is obviously an heavily simplified version, limited to dynamic-to-static resolution.
Randy's engine architecture relies on very few magic constants and is extremely stable (well, as long as pico numbers don't get in the way!!).

The physic engine is designed as an extension a generic 3d actor class and can easily be taken out for other games.

Car Physic

The car is modeled using a front and rear tire. Each tire has lateral and longitudinal forces, as detailed in this article: The Racing Line - Combined Tyre Forces.
Other good readings:
Car Physics for Games
Box2d Top Down Racing Game

The gif above shows forces applied to the car and their application point:

  • G force (down)
  • read tyre pushing car (with a lateral component to counter slide)
  • front tyre and turning forces (again with a lateral component)

Slip angle and slip ratio curves are defined using SFX 4 and 5 - tweak them to see effect in game!


The game started as a terrain renderer using marching squares.
Terrain height map is 64x64, displayed as a 128x128 grid to display marching square "diamond tiles":

Textured Car

The car is textured mapped, using a custom version of @p01 trifill.
The Blender model directly references an export of the cart spritesheet.


The game uses my usual Blender/Python export toolchain.
A custom terrain editor is available as a pico-8 cart (contact me if needed)

P#64950 2019-06-02 14:33 ( Edited 2019-06-04 20:11)

I am writing data to a p8 file from a Python program - format for 0x0-0x3200 ROM range is ok.
Issue is sfx section - each sfx (68 bytes) is actually written as 84 bytes (??) with empty bits left and right.
I have no clue what is the masking/bitshifting/... logic between my input value and the resulting p8 string.






P#64268 2019-05-09 18:44 ( Edited 2019-05-09 18:49)

Case solved: issue was triggered by one of my USB sticks constantly sending inputs

When exporting Tiny Sim, some keys are stuck:

P#64164 2019-05-03 14:25 ( Edited 2019-05-04 09:17)

Cart #numakunawa-0 | 2019-04-08 | Code ▽ | Embed ▽ | No License

FPS demo cart as an answer to @MBoffin April 1st Twitter joke.
Stay tuned for technical details.

P#63343 2019-04-08 21:27

Cart #doyusuyepo-0 | 2019-05-04 | Code ▽ | Embed ▽ | No License

Project started following a question on 3d clipping on this forum and quickly spiraled into a full blown 3d renderer with support for real-time shadows and camera space clipping :/

Shadows are calculated in real-time by extruding a shadow volume from each lit face.
Resulting polygons are added to the face and rendered/sorted with the face.

The shadows are globals e.g. self-shadowing is supported, see torus scene.

Performance-wise this is bordering what pico can support, as many clipping operations are required to generate shadow polygons. There is room for optimization (vertex cache, smart selection of clipping planes) left to the reader!


Project (including how to add custom 3d models) is available here: github


  • 3d papers from the 70s/80s are pure gold!
  • trifill function from @p01

Update 1.1

  • fixed polygon gaps (using correct middle screen position + ceil)
P#60772 2019-01-12 14:38 ( Edited 2019-05-04 12:54)

How to reproduce:

  • go to a game page
  • launch game
  • go to comment section
  • type some text

Bug: nothing appears (input is captured by pico)

Workaround: refresh the page / don't launch game before posting comments.

P#59908 2018-12-11 21:38 ( Edited 2018-12-11 21:38)

Since forum updates, new gif uploads are rendered as broken links.
See: https://www.lexaloffle.com/bbs/?pid=59400#p

P#59537 2018-12-01 15:11

Be a X-Wing pilot!

Take a seat in the most advanced fighter of the galaxy. Fight against the evil empire!
Use proton torpedo to quickly dismiss enemy forces or your 4 blasters (aiming skill required).
Go through 4 epic missions, from space to Deathstar and back.

Flight Manual

Copyright Notice

Starwars logo/music/... credits to their respective owners. Don't sue me :/

Dev Log

This is a demake of the X68000 Attack of the Deathstar game, (kind of) complete with space/ground/trench missions.
This version departs from the original with a less arcade/grinding gameplay.

The un-minified version can be found (as usual) on my Github page (includes all 3d assets).

Tie Fighters

All flying NPCs are following boids behavior (seek, avoid, follow) and are really a blast to watch in pack (imho)!
Baddies will try to get on your six to fry good old r2d2 :/

Proton Torpedo

Proton flight path is following Proportional Navigation rules. Gives a nice interception path (and the math is cool :)

3d Engine

Engine is a edge renderer (wireframe only as you certainly noticed!). It supports faces with an arbitrary number of edges to reduce visual cluter and achieve good performance.

Face culling is using object-space culling, the normal.point constant is pre-calculated when model is loaded.

Quaternions functions ported from ThreeJS.

3d Sound

(sort of...) Sound volume is changed at runtime according to sound emitter location, using the PICO-8 "feature" that sfx can be modified without impacting currently playing sound.
Note: sfx 63 is reserved for that use.

Software Pipeline

3d assets are modeled in Blender, exported in sprite/map format using a Python exporter .

Models are unpacked from spritesheet/map memory at startup and made available in a global table.

All game data are expressed as JSON strings, supporting references to global functions. Ex:

local player=json_parse('{"x":0,"y":0,"update":"update_player"}')
-- works!

Mini json parser from Tyler Neylon: lua JSON parser

Code is minified using picotool.
Music lifted from "public" MIDI files, simplified and converted with midi2pico.



  • Initial public version
  • Bug: not able to restart after gameover (will be fixed soon)


  • change: redone control scheme (flat turn, optional roll)
  • change: removed boost
  • change: laser auto lock
  • change: difficulty curve
  • fixed: NPC flight AI
  • fixed: torpedo aiming


  • added: menu to switch view
  • changed: turret & tie fire lead (+ random chance to miss)
  • changed: tie fighter difficulty ramp up
  • fixed: random hit on NPC (distance function overflow)
  • fixed: reworked trench to keep 60 fps
  • removed: in-game help


  • changed: reduced tie hit points
  • changed: increased tie damage
P#53727 2018-06-23 09:45 ( Edited 2020-02-21 11:22)

Coroutines are an essential part of my game engines.
However, I don't get how I can do both:

  • raise an error when something bad happens
  • silently handle proper coroutine termination

coresume returns a pair (is running,exception).
Thing is exception is set even during normal termination!!
note: costatus doesn't help as it immediately flips to "dead" when the coroutine crashes.

Something like that doesn't work, e.g. I get an assert even after genuine termination:

local co
function _init()
        for i=1,10 do
               -- syntax error test
           -- i=k/10

function _update()
    if co then
     local r,e=coresume(co)
     if not r then
        if(e) assert(r,e)
        -- never reached
P#53201 2018-06-02 04:48 ( Edited 2018-06-02 15:26)

Cart #52460 | 2018-05-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

As a temporary side project, I hastily ported Randy Gaul ImpulseEngine to pico-8/LUA.


Requires a mouse

  • left mouse button: create a random shape at mouse cursor or drag shapes
  • right mouse button: show/hide world or body options
  • button c: show/hide debug information

Dev Log

The physic engine is a direct port from Randy Gaul's work, detailled in a series of articles:
How to Create a Custom 2D Physics Engine

My contribution is mostly on a clean 2d vector and 2x2 matrix object oriented library.
It makes vector/matrix math very concise to work (and easy to port from C++ code!):

local v1,v2=vec(3,4),vec(5,6)
local v3=v1+v2
-- rotation matrix
local m=mat:make_r(0.4)
local r=m*v3

Note: I don't plan to expand the library beyond this demo, feel free to make a game out of it!

The cart now include a context menu that could be fairly easily reused for other carts.

Missing Features:

  • Optimisation pass (currently supports ~4/5 objects max)

Change Log


  • initial revision


  • added: support for circles


  • fixed: force reset
  • changed: left click now creates a new body
  • added: right click menu to control world or object settings
P#52222 2018-05-01 08:32 ( Edited 2018-05-06 16:44)

Cart #50248 | 2018-03-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Anti-Aliased Asteroids

Hastily crafted Asteroids clone complementary of the anti-aliased line thead:



  • Added: Teleport ('c' button)! Up to 3 chances (sort of...) to get out of trouble
  • Changed: inertia cranked up, use your thrusters!
  • Changed: safe time is now 2s
  • Changed: thrust is now 'up' only
  • Fixed: Saucer Invasion!


  • Fixed: incorrect font rendering
  • Fixed: incorrect high score message on game over
  • Changed: reduced number of rocks to 4


  • Fixed: crash with dead player
  • Changed: multiple rocks types
  • Added: saucer!
  • Added: highscore (saved in cart data)
  • Added: multiple CRT effects (enjoy @Felice!)
  • Bug: couple of chars incorrectly rendered

1.0f: temp. fix by @Felice (tks!)

1.0: initial release (did not work)

Tech. Details

Not much really - using bits of my Pico 8 "game toolkit":

  • anti-aliased circle fill (using mid-point error for the shading)
  • multiple "CRT" shaders (find out how to switch between them!)
  • a couple of future functions using yield
  • vector font rendering


  • Felice: anti-aliased line optimisation genius!
  • Trammell Hudson: Asteroids font (https://trmm.net/Asteroids_font)
  • Atari: for the art cover (my lawers are on the copyright case :)
P#49676 2018-02-25 17:01 ( Edited 2018-08-21 20:55)

Cart #49509 | 2018-02-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This cart is just to provoke @zep (or any other true Pico-8 genius) into releasing a fast anti-aliasing demo cart!

The code is a LUA port of that paper:

Note: I don't get how an incremental line drawing routine (a la Bresenham) can be that slow (compared to the native version). 270% cpu usage for 16 lines sigh...

P#49510 2018-02-22 15:16 ( Edited 2018-02-28 07:42)

View Older Posts
Follow Lexaloffle:        
Generated 2020-04-10 06:38 | 0.212s | 2097k | Q:168