OVERVIEW
This cart is a bit of a demo of a few shadow methods I've given some thought to. The first two techniques work best at 60fps, but the final technique I think is suitable at any speed.
UPDATE
The original cart had an issue where the "peek/poke merge" technique could not draw starting at odd numbered X coordinates. This has been fixed (but made things a bit more complicated)
METHODS
1 ON/OFF SPRITE:
This method uses a solid shadow sprite that cycles between on/off every frame
2 ALTERNATE PATTERNED SPRITE:
This method uses two sprites with an alternating pattern that is cycled every frame

You're a submarine of a worn-out article.
When ballast isn't taken, you don't sink.
You'll collect all treasures!
[Left][Right] : Move
[Down] : Drop Ballast
[Z] : Game start
I made a simple game for friend who begun to learn Pico-8
foreach isn't used, 306 lines.
バラストを取らないと潜行できないポンコツ潜水艦で宝物を集めよう。
カーソルキー←→ : 移動
カーソルキー↓ : バラストを捨てる。
Z : ゲーム開始
Pico-8を勉強中の知人のためにシンプルなゲームを作ってみました。
foreach不使用。306行のプログラム。

Keep in mind this isn't the pico-8 "crashing" like it's supposed to. This is a full-blown crash crash. Like, "pico-8.exe has stopped working" windows level crash.
It's happening when I call the reload() function with the optional filename argument, regardless of what it is. I tested it with an existing extra cartridge, a non-existing one (as in the filename didn't correspond to anything), and the same cartridge the code was loaded from, which would presumably act exactly like not using the extra argument at all. All crashes.
I even tried using nil instead of a filename, which in lua is the same as not using the argument at all afaik. Still crashed. Despite not using the extra argument in the first place not crashing and working just fine. What?
Here's the code in question:
function load_sprite(rom, ram, cart)
local rom_x = rom % 16
local rom_y = flr(rom/16)
local ram_x = ram % 16
local ram_y = flr(ram/16)
local rom_address = 0x0200*rom_y + 0x0004*rom_x
local ram_address = 0x0200*ram_y + 0x0004*ram_x
for i=0, 7 do
reload(ram_address+0x0040*i, rom_address+0x0040*i, 0x0004, cart)
end
end
function _init()
load_sprite(1, 2)
load_sprite(1, 3, "extra_data")
end
function _draw()
cls()
print("this is a test", 0, 0)
spr(1, 0, 32)
spr(2, 0, 40)
spr(3, 0, 48)
end
|
The following code works:
for i = -32767,-32765 do print(i) end |
-32767 -32766 -32765 |
But this one just does nothing:
for i = -32768,-32765 do print(i) end |
Also, the following code works:
for i = -32765,-32767,-1 do print(i) end |
-32765 -32766 -32767 |
However this one causes an infinite loop:
for i = -32765,-32768,-1 do print(i) end |

This is round 2 of my "template" cartridge for building a basic game with multiple players, screens and additional entities.
I have now added an animation script, which will allow the writer to load in animation sequences (as sprites) ahead of time, and have a simple function called to advance the animation frame at the right time.
Animations can utilize the same sprites in multiple places, control the timing of the animation, and of course loop.
Anyways, I'm building these for my own foundation, but I hope anybody else can get some knowledge from them.
P.S. this cart uses Lua's fancy "multiple return values" feature, which now that I understand, is like a super power.
UPDATE:
version 1.4 - 2018
Major update!
- fixed major bugs concerning player alignment on the map (for real this time)
- updated the title screen - it's flashier now
- added more sound effects and audio cues
- added more dialogue with more NPCs to talk to
- some NPCs now say different things depending on player progress
- sprinkled in a couple new easter eggs
version 1.26 - 2016
- added missing image flip when turning left towards obstacles. Thanks to dw817 for pointing that out.
version 1.25 - 2016
- minor improvements to marinara behaviors
- fixed some positioning issues
- made an in-game tip easier to discover
- final boss is now slightly harder
version 1.2 - 2016
- Fixed slime behaviors. They no longer scale the walls when blocked in by the crate. Thanks to dw817 for pointing that bug out!
version 1.1 - 2016
- Fixed problem where entering the pizzeria caused the player to lose alignment with game map.
- Fixed some grammatical errors.
- moved a dungeon key slightly so it's more visible.
Controls:
Btn 4 (Z) to pull crate or turn 180(when not next to crate)
Btn 5 (X) to use weapon
This game took about a month to make. It's similar to my last game, EGGHUNT, in terms of the layout and walking, but is much more complex as this game has enemy AI, weapons, and crate pushing.
ENJOY!

Watch sand fall in interesting patterns.
Looking for advice on optimising (and profiling?) this. On my old macbook pro it runs at around 10fps at best. I can't see any profiling tools built in to p8 but maybe I missed something? What's generally considered slow? I've sped this up by reducing the size of the simulation and mirroring, so it's really only running a 45x64 sim.
Things I'm thinking about:
- some sort of "active islands" system for not updating the whole sim every update
- not clearing the screen but remembering the part of the screen that are unstable, to reduce rendering costs, but I think (again, no way to measure) that it's update-bound.

Hello guys! This was my submission for the Fermi Paradox jam and first "finished" pico8 project!
'Til the very end of this project there was no gameplay, so we squeezed some in. But you can just wonder around space and hyperdrive as you like (I find it pretty fun by itself).
There are probably a few bugs, but I haven't got the time to test it properly.
If you want to decrypt this simple puzzle, there's a hint bellow!
===========================================================
Puzzle Hint:
Example:
l u i y o u h e r ( lukeiamyourfather )
_u k e_a m y r f a t h
===========================================================
Description:
Wonder around Star Systems trying to find and decrypt alien transmitions.
This is an experiment project for the Fermi Paradox Jam.
===========================================================
Controls:
Arrows: Right/Left - Rotate Ship - Up/Down - Accelerate/Deaccelerate
X: Faster Acceleration
Shift: HyperDrive
Landing: Collide with the planet to land and move forward to take off
===========================================================
Made by:
@MatheusMortatti - Design, Code and Art
@PHString - Design and Writting

OVERVIEW
Welcome to exciting world of Freecell! Oft overlooked for the also-bundled-with-Windows Solitaire, Freecell is the thinking man's card game. Reorganize your eight cascades from King to Ace by making use of your free cells and return them to foundations to clear the board.
As an aside, this is the first game I've written. I wanted to take on something relatively simple to get a handle on PICO-8 and learn a little bit about organizing a game. If you encounter any bugs, let me know. I'm on twitter too - @somebrent
GAMEPLAY
The goal is to fill your four foundations with each suit starting with the Ace and ending with its King.
The board consists of
- four free cells (upper left)
- four foundation pools (one for each suit, upper right)
-
eight cascades of cards
- Cascades are dealt at random, but cards can be reorganized by alternating colours in descending value. (e.g., a red 2 can put moved to a black 3)
- Any single card can be moved to any free cell.
- A group of cards (a tableau) in valid order can be moved to another cascade if there is enough free cells or empty cascades to facilitate the move, and if the final card at the destination keeps the tableau in valid order.
- By reorganizing the cascades and moving cards to their foundations, [i]nearly

A while back, RhythmLynx posted a couple lowercase fonts that tried to use as little sprite space as possible. I had a lot of fun trying to pack the characters into overlapping regions on the sprite sheet to use even less sprite space.
But, recently I had an idea to skip the sprite sheet entirely and define each character as binary data that can be stored as a number in a table. This is the result. Press z to swap between demo text and a reference guide. The reference guide is stored on the sprite sheet, but is not used for the lowercase print function.
Some explanation hidden...
[hidden]
A number in pico-8 is stored in 32 bits (4 bytes), something like this:
0 0000000 00000000 00000000 00000000 ^ ^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^ | | integer part | | decimal part | | negative sign |
In hexadecimal, the integer and decimal parts are separated by a period, just like in base 10.
a = 30.25 b = 0x1e.4 assert(a==b) |
In Short Text, each character is laid out on a 4x8 grid. Each column is then treated as a byte and joined together into a number. For example, the letter "b" looks like this, where . is a blank pixel and # is a used pixel:
#... #... ##.. #.#. ##.. .... .... .... |
Converted to binary, starting from the bottom right and working up then left, we turn this into...
00000000 00001000 00010100 00011111 |
which, in hexadecimal, is written as 0x0008.141f, roughly 8.079.
So, we build a table that assigns this number to B.
... chars\["b"\] = 0x0008.141f ... |
Then, when we want to draw b, we just check each bit in that number and draw the ones that are set onto the screen.

Boing! v0.1
My first cartridge submission, Yay!
Boing! is an Amiga themed YASCL (Yet Another Sqaushy CLone) cart. I installed pico-8 and got started by following along with the Squashy article from Pico-8 Zine #1. After I finished the article, I wanted more, so I began playing around. Eventually, I created an Amiga theme by adding sprites, a map instead of a solid background, a Boing intro screen, and a guru meditation crash when the game ends. It may not be immediately obvious, but the player's final score is displayed as the first half of the guru meditation error code.
It still needs music and perhaps a cracktro ;)
-Mike

Hi,
i've been interested in developing some games in my free time for a while. I've tried the free versions of some other software and just never got around to finishing any projects. Is Pico 8 a good place to start? I like the simplicity of these cartridges i've played. I'm just looking for some advice if I were to buy the software and get started.

Hey All -- PICO-8 0.1.9 builds are now live on Lexaloffle and Humble!
Posting Carts via Clipboard
The handiest new feature is being able to post cartridges to the bbs via the clipboard, without ever saving it as a png. Use "SAVE @CLIP" to copy to the clipboard as text, and then paste it into a post (hit Preview to make sure it worked and to get rid of the wall of text). You can also copy carts from the BBS (look for 'Copy' under each cart) and paste it back into PICO-8 with "LOAD @CLIP")Posting GFX via Clipboard
You can also do the same thing with sprites. Using CTRL-C in the sprite editor also stores a copy of the sprites as text in the clipboard, and can be pasted back and forth to BBS posts. Here's an example: (click the 40x8 and then CTRL-C the text to copy&paste it back into a cart)






13 comments




