Log In  
[ :: Read More :: ]

Cart #tline_terrain_demo-0 | 2024-03-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Tline Terrain Demo

Worms/Scorched Earth deformable/destructible terrain demo.

Arrow keys move target
X to destroy terrain
O to toggle debug mode, showing the vertical slices.

Maybe of use to someone?

For a long time I have wondered how to make Worms/Scorched Earth style terrain and make it work reasonably well. My first ever (unreleased) game on pico-8 was a Worms clone, that used a 2D array of pixels and pset to draw the terrain. It blew the CPU budget and was slooooooow.

Micro Murder on Pico-8 managed a really slick solution drawing circles over the top of the terrain, but I wondered if there was another way. Fast forward some years and I'm still thinking about it. Most discussion about this type of terrain suggests some form of bitmap to store the terrain.

This implementation uses a 2D array of vertical slices, then uses tline to draw a bit of the texture for each vertical slice. An explosion either shrinks one end of a slice, or carves it into two, removing the original slice. See the code for more.

Terrain graphics come from my game The Wizard Pig.

P#142701 2024-03-10 00:30 ( Edited 2024-03-10 00:31)

[ :: Read More :: ]

Cart #moon_miner_2580-0 | 2023-10-01 | Code ▽ | Embed ▽ | No License

Look, I’m not exactly pleased to be here either, but this much of that green ore is too good to turn up. Yes, the moon is increasingly unstable but carve as much as you can using the rockerizer, get it back to the tele unit and we’re out of here in an hour. Not the time to be asking why we aren’t sending a bot. If we had the money for one we wouldn’t need to be here. It’s a very decent payday.

Your hazard suit will absorb a fair amount of punishment from the molten rock, but the surface instability means it’s leaking between gaps in the ground. Nothing like a bit of motivation eh? It’ll mean your journey back to the TU will be trickier than the outward trek, so use the nano waypoint device to mark a path back. Anything marked will have a bright yellow glow in your HUD just like the TU. It’s got limited juice though, so go easy. Oh yeah, worth saying - just remember that less rock means more lava.

See you in a bit!

x - start/restart game

arrow keys - move

x - mine rock/ore

z/c - mark waypoint on hard rock


Made for pico1k game jam by Ben Jones using pico8 in 1023 bytes of compressed code. Raycasting engine based on Lode Vandevenne's Raycasting Tutorial - licensed under BSD 2-clause license - check it out, it's brilliant.
Licensed under the 2-Clause BSD License


See below for the original jam code. Cart is annotated with comments

for j=1,30 do
for i=1,30 do
if r>0 then
if(r==1)?"ore mined: "..a
if(r==2)?"signal lost"
if(r==3)?"moon miner"
if(btn(5))r=0goto _
goto l
for j=1,30 do
for i=1,30 do
if(t%360<1and k==3and mget(m,n)<3)mset(m,n,3)
if(x\1==15and y\1==16)r=1
if(btn(5)and (m==15or m==6))mset(x+o,y+v,rnd(2))?"\ag0"
if(btn(5)and m==15)a+=1?"\ab3"
if(btn(4)and m==9and w>0)mset(x+o,y+v,12)w-=1
cls(3)for z=0,127do
local sx=2*z/128-1
local r,s=o+cx*sx,v+cy*sx
local ly,g,w,cy,sx,sy,sd=127,1,0,0,1,1,0
local i,j=x\1,y\1
local lc=mget(i,j)
local c,dx,dy=lc,abs(1/r),abs(1/s)
local u,v=(i+1-x)*dx,(j+1-y)*dy
while g do
if u<v then
local f=128/d\1/2+64line(z,ly,z,f,80+lc)
line(z,max(cy,h+64),z,w/2+64,bor(max(c2-2,c2-sd-d/3\1),shl(max(c2-2,c2-(d+.5)/3\1),4)))end?"\ff◆"..a.." ♥"..l.." ˇ"..w
flip()goto l```
P#135249 2023-10-01 23:13 ( Edited 2023-10-01 23:17)

[ :: Read More :: ]

Cart #portalsaurus-1 | 2021-10-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Cart #portalsaurus-0 | 2021-07-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


Recently I decided to dig into portal renderers and start to build my own, inspired by this excellent write-up of BUILD. This is currently work in progress, no guarantee it will turn into a full game but thought it was interesting enough to share.

I used a lot of stuff from other projects

From Caped Feline Arena

  • Player movement
  • Floor and sky casting
  • Palette functions

From Cab Ride

  • Palette

I also revisited Lodev's raycasting articles, specifically the code to render sprites without fisheye distortion as they behave similarly to the ends of the walls.

Implementation Notes


  • New features including
  • Variable height sectors!
  • Distance based lighting!
  • Large performance gains!
  • Island sectors!
  • This is all thanks for being a bit smarter about how many walls to cast each ray for
  • After flooding portals, the walls of each sector are grouped into subgroups (referred to in BUILD terminology as 'bunches')
  • The bunches are ordered near-far (thanks to traversing the portal graph)
  • Island sectors get inserted before other bunches an enclosing sector (this would cause glitches with concave sectors, out of scope for now)
  • Walls within a bunch are ordered near-far, and projected into screen space, where they are further chopped down, grouped by walls that touch at one end
  • Portals take account of differences in sector height - this allows for doorways/overhangs
  • A very simple buffer keeps track of which x coordinates have had a wall drawn, to prevent overdraw of walls
  • Rays are cast for the walls nearest bunch (from the lowest to highest x coordinate). If a hit is recorded, the 'x buffer' is updated, so no further drawing happens - that coordinate is now occluded
  • Palette is set for each vertical slice of wall, based on distance from the camera

Original post:

  • At the moment it relies on casting a ray for every column of the screen to determine which walls to draw
  • One wall per column at the moment
  • Casting a ray traverses a subset of potentially visible walls
  • Potentially visible walls are calculated by traversing the portals in the world structure, starting with the 'sector' the player/camera currently occupies
  • World is represented by sectors, which hold references to a set of walls that border the sector
  • A portal is a wall shared by two sectors
  • Traversing the world tests which walls of a sector are in front of the camera, if any wall is a portal, it is currently discarded and the connected sector is visited, up to a hard limit of 10
  • The current sector of the player/camera (or starting sector for rendering) is determined by casting a ray to the left and the number of intersections with walls is counted. Even means outside the sector (and connected sectors are tested), odd means within the sector. A short description of this is found in the 'Inside a concave polygon' of the BUILD write-up
  • The world is created when the cart starts and builds a model of how sectors are connected to each other
  • tline() is used for floor and sky
  • No collision detection currently


  • Arrow keys - move around
  • X - toggle map view (off by default)
  • C/Z - strafe

Next up??? Maybe?

  • More performance
  • Sector based floor textures
  • Collision detection
  • / 'Island' sectors for columns
  • Basic level editor
P#95261 2021-07-25 07:30 ( Edited 2021-10-01 14:19)

[ :: Read More :: ]

Cart #cab_ride-7 | 2022-01-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

(16/07/22 - Corrected license in description to match that attached to cart :facepalm)
(30/01/22 - Happy Birthday Cab Ride! 1 today!)

Drive a train, forever, through a dreamlike land.

Transport passengers to their destination.

Watch the world go by.

Listen to chilled out chiptune music.

In Cab Ride you can drive thousands of different train routes through rolling hills, winding tunnels and weaving between the tall buildings of vast cities. You can drive the train for as long as you like. When you're ready to end your journey, hold down the left arrow key to announce the last station. Stopping at stations along the way means you can pick up and drop off passengers. Try and stop at the marker at each station for a high rating. Or don't! It's up to you.

Cab Ride is a casual train simulation, not aiming for real world accuracy, but like a real train, it takes a while to brake. If you're overshooting stations, watch for the alert for the next station and reduce the throttle so you're ready to stop.


  • X - horn/start/restart the game
  • C - open/close doors at station (must have stopped just in front of signal)
  • Up - increase braking/decrease throttle
  • Down - accelerate/increase throttle
  • Left - hold down to announce the last station (will end the current journey)
  • Right - turn Express mode on/off aka Screensaver Mode

Version history


  • Fixed - memory leak if you run the game for a long time


  • Added - second track with train
  • Added - Weather - different cloud patterns and periods of rain
  • More performance fixes


  • Changed - tweaked station stop ratings - slightly more forgiving and more consistent
  • Changed - all green signals when you're in express mode (after first couple of stations)
  • Fixed - all passengers would eventually get off if you opened the doors enough times at a single station
  • Various performance improvements


  • Added - pause menu sound toggle - deals with no hardware button in mobile view - may fix in a different way in future
  • Added - 'very chilled' mode - no goal/help messages, no HUD other than station name messages, just driving trains - good for screenshots or screen savers (even better than what I claimed was a good screen saver mode before)
  • Fixed - another way to drive through the last station (activate Express mode after announcing last station)


  • Fixed - crash bug where you could drive out of the last station when in 'Express' mode
  • Changed - you now have to hold down the right key for 2 seconds to enable Express mode (announcing the last stop also has a 2 second delay) - this is to prevent ending up in that mode by accident and locking the controls


  • Initial release


Programming - Ben Jones / @Powersaurus Twitter

Music - Stephen 'rych-t' Jones / Twitter / Soundcloud

Based on code from the Pseudo-3D Racer tutorials by Tom Mulgrew/@Mot https://www.lexaloffle.com/bbs/?tid=35767 licensed under Attribution-NonCommercial-ShareAlike 4.0 International​ ​https://creativecommons.org/licenses/by-nc-sa/4.0/


All source and assets are licensed under Attribution-NonCommercial-ShareAlike 4.0 International​ ​https://creativecommons.org/licenses/by-nc-sa/4.0/

Pre 1.1 version


Cart #cab_ride-5 | 2021-02-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#86966 2021-01-30 16:09 ( Edited 2022-07-16 12:15)

[ :: Read More :: ]

Cart #caped_feline_arena-4 | 2023-06-06 | Code ▽ | Embed ▽ | No License

Finally "done" :)

> You awake from your rest in the void with a voice repeating in your head.
> It says: 'meow meow meow meow mexow' and you know what must be done:
> It's time to retrieve the book of Magu F'ahn.

You're a cat, you're magical, it's you and your wand against insurmountable odds, cats, and infinite pigeons.

A retro fps with 8 singleplayer maps and 3 "botmatch" maps. Select maps from main menu, all botmatch maps unlocked from the start, singleplayer maps unlock as you complete them.

You can also play this on the PICO-8 BBS


  • Arrow keys - move (strafe if mouselook enabled)
  • Z/C - strafe/sidestep (hold, then press left and right, unused with mouselook enabled)
  • X - shoot

Note: mouselook does not work on the BBS version. Please use the pico-8 app, or the itch.io version of CFA



Source is licensed under The 2 Clause BSD License.
Assets are licensed under Attribution-NonCommercial-ShareAlike 4.0 International​ ​https://creativecommons.org/licenses/by-nc-sa/4.0/

Old bits and bobs from 2020-2021 original post

I'm still working on this (-300- nope - 5 tokens left :D ) - let me know what you think here or on my Twitter - there might be bugs and/or unexplainable weirdness!

You're a cat, you're magical, you're in a duel with the finest feline magic practitioners the realm has to offer. Grab your wand and enter the arena!


  • Arrow keys - move
  • X - strafe/sidestep (press left and right)
  • Z/C - shoot

Use the PICO-8 menu to disable AI to wander round the maps, and to toggle overhead view.

What's new?

12 July 2020

FIXED crash bug when dropping the quad

11 July 2020

  • ADD single player red+blue keys+doors!!!! Check single player test map for an example
  • FIXED showing scoreboard upon being frogged in single player.
  • No more tokens left!

09 July 2020

  • ADD light viewbob
  • ADD damage indicator
  • ADD new map Tower Of Confusion
  • ADD basic single player map support (with sample map)
  • ADD 1 second delay on scoreboard
  • ADD 1 second invulnerability on respawn
  • CHANGED cat AI tries to find a wand if possible/pick up your stuff after frogging
  • CHANGED player movement
  • CHANGED minor texture improvements
  • FIXED Particles obey zbuffer
  • FIXED Sounds cutting off
  • FIXED Cats using incorrect palette when far away

Since April (v early itch.io release) I have:

  • Added several maps
  • Rewrote chunks of the graphics for more speed and more complex geometry
    -- diagonal walls
    -- working overhang textures
    -- faster ceiling rendering
    -- tline() floors/sky
    -- tall ceiling indoor spaces
    -- doubled texture limit from 16 to 32
  • Added 3 extra wands, and items
  • Improved sounds
  • Better AI
  • Better controls

Still to do

  • More maps
  • Map editing guide
  • More sounds
  • More textures
P#78599 2020-06-28 05:12 ( Edited 2023-06-21 23:07)

[ :: Read More :: ]

Cart #tline_rotation_demo-0 | 2020-04-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I was excited by the new tline function in 0.2.0, immediately tried to plug it into my project and ran into problems.

I made this demo to break down rotating the map to a fairly minimal program. I've added comments to explain the different data points and what they achieve when plugged into tline.

The demo shows a rotated 2D view into the map.

Left and right keys move the view. X toggles the unrotated map to show the direction of the rotated view relative to the map.

I hope this is useful to you! :)

P#74994 2020-04-19 18:16

[ :: Read More :: ]

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

After a day's work Road Rex just wants to get home like everyone else. Road Rex is a giant dinosaur with laser eye beams.

Get home as fast as you can! Beat your arch-rival, the quick and messy Blue Dinosaur (tm). Stop tv traffic choppers from getting footage of the mayhem you cause. Try not to get a speeding ticket from a speed camera (speed limit is 70mph in the UK) - but if you do, make sure you do it in style for extra points. Shove cars out the way and spill delicious lorry loads of kebabs, shoes and beans. Try to exit the motorway in the left lane and don't get lost!


Arrow keys right and left - accelerate and decelerate
Arrow keys up and down - switch lanes, aim lasers
Z/C - charge jump (release to jump)

By Ben Jones (Powersaurus on Twitter)

P#65223 2019-06-15 21:54

[ :: Read More :: ]

Cart #47475 | 2017-12-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Parking Masters is a game I made over a weekend for a friend's birthday. Said friend is fond of driving and once took a photo of his car parked very close to another which has become a running gag (many ridiculous photoshops).

I have turned the photo into a little arcade game/"very serious" simulation of parking in a manual car. I thought it would be a fun thing to do, turn a photo into some sprites for a PICO-8 game. Pleased with the results - photo-realistic action!


Up - gas pedal
Left and right - shift gear
X - Clutch
C - Brake

Park as quickly as you can, as close as you can! Try and avoid stalling and also from shunting the other car!

P#47401 2017-12-15 10:07 ( Edited 2017-12-19 01:11)

[ :: Read More :: ]

Cart #41233 | 2017-06-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Score 10 belief points by keeping your followers happy. They like trees and plants, and eating tasty corn. They don't like swamps, being stuck in one place or things being on fire. You can also win by making your opponent's (Omnicow) followers unhappy.


Arrow keys - move
Z - use power
X - change power


Once, Henry was just a regular pig. He dreamed of being a magnificent wizard who was popular and cool. Through the sheer force of his own will and the belief of the nearby villagers, who saw promise in him - he became a giant flying head with reality bending powers. Summoning a mountain from the earth, he marvelled at his power.

"I will use my powers for good, and make my followers happy, with lovely forests and magical instant-corn from the fields"

As he said this, the earth shook and a giant cow's head appeared from behind the mountain he had just conjured, spitting fire from its eyes"

"Or maybe I'll just ruin someone else's day"


Raise power (yellow mana) raise the landscape. Followers cannot walk up steep slopes, and any upward slope will slow them down
Lower power (yellow mana) lower the landscape
Fire power (red mana) Create fireballs from your eyes. Destroys terrain and foliage
Forest power (green mana) Puts out fire and creates new foliage. Cleans out swampy land.
Rain power (blue mana) Puts out fire and cultivates fields that yield follower-pleasing corn. Too much rain makes the land swampy though.

P#39703 2017-04-15 18:28 ( Edited 2017-06-08 15:42)

[ :: Read More :: ]

Cart #38011 | 2017-03-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Demo cartridge for creating 2D terrain. I'm using this for my own project but thought it would be useful for others. If you think you'll find it useful, please use in your projects. :) For more information see here - https://medium.com/@Powersaurus/journey-into-the-hills-part-2-8a209905d3de


X - Regenerate landscape
Left/Right - change graphics mode
Up/Down - change amount of randomness

P#38013 2017-03-03 13:17 ( Edited 2017-03-09 08:37)

[ :: Read More :: ]

Hi all!

This is my first finished PICO-8 cart.

Its an arcade game where you high five and fist bump cats.

High five the cats with your hand moving at speed for more points. Build up a combo to get a chance to pull off a secret handshake.


Arrow keys - move hand
X - Switch arm position
C - Switch between open hand and fist

This is version 1.1 - I tweaked the hit detection for high fives and added a tutorial skill level.

Hope you enjoy it! :)

P#37520 2017-02-16 12:19 ( Edited 2017-02-22 11:46)