So after having a play with PICO for a while I've decided to sink my teeth in. I suspect I'm going to run out of tokens on this unless I get smart about how I implement enemy racers.
Cursor keys to control the ship, final game will have 9 stages (currently it doesn't check for end of game).
8/1/2015 - So far I've been focusing on the momentum of the ship and movement of the ground.
Next tasks...
-- add engine jets to each side
-- add engine noise
-- change the colour of the grid when you change stages
-- check when you've reached the end of stage 9
-- add enemy ships to bump into
-- bullets
-- lasers
-- music
I was wondering how long it would take me to build a partial version of PONG and I was kind of amazed that nobody really built a PONG for Pico-8 up to now. It misses a number of features but I created at in a few hours while listening to some conference talks at Eurucamp 2015 and I will hopefully give a lightning talk on PICO-8 tomorrow.
One thing that would be super handy for development in Pico-8 is an "assert" function which throws an error when a condition isn't met and can optionally print something in response, like the standard lua one.
eg.
assert(x != 0,"this shouldn't happen")
Another nice thing would be a way to write output to a console. you can do this with print, but it usually gets overwritten immediately and lost in the event you need to check up on some history.
log("frame: "..frame.." x is "..x)
also showing a full backtrace on error rather than only the head of the stack would be super helpful.
A game about flying a damaged ornithopter through a sand storm on Arrakis. 3 levels of windy action! Fake speech synthesis!
Instructions:
Reach the end of each map without crashing into the dunes below or being overtaken by the following sandstorm.
Controls:
left: tilt thopter upward (less speed, more lift)
right: tilt thopter downward (more speed, less lift)
x: fire jet (more speed, fuel recovers over time)
z: air brake (cuts speed, gain a little altitude)
About the game
This is my second PICO-8 game, following on the Dune theme of Shai Hulud; I wanted to make a little flying game about surviving the sand storms of Arrakis as an excuse to experiment with flight model stuff, screen scrolling, and collision detection. I did that stuff and also played with a few other goofy "what if" ideas, and so the code is in places a mess of hacks, which I'm trying to embrace as an okay way to go with experimental P8 games.

First cart! Made this demake of our jam game, Sumo Puckii for some practice! It's 2-player only, so I recommend both gamepads and some friends <3
Mwuah <3 kisses

An asteroids-like game for PICO 8.
Controls:
UP: thrust
LEFT/RIGHT: rotate
Z: shoot
X: blast (area attack radiating from ship; uses energy)
Don't get hit by the asteroids; shoot the asteroids for points. Big ones split into medium, medium ones sometimes split, small ones never do.
Each player starts with 3 lives, and also has a "power" gauge. The longer you stay alive, the higher the gauge goes. When it passes certain points, you automatically upgrade (upgrades: more bullets, longer distance bullets, multi-shot). When you die, it resets. The secondary attack ("blast") uses up 1 "tick" of energy (3 ticks per upgrade), so you can choose to use it to save yourself and rack up points, but it will slow down your upgrade path.
At this point, probably all that I'm going to polish on this is sfx and maybe some graphical tweaks.
[b]Original Post
I got to wondering whether you could rotate a sprite in PICO-8. Of course this facility is not provided, but it should be achievable, I thought.
How this works: 3 rotating objects. Arrows move the green cursor among them, and Z or X to toggle each object on or off.
The rotations are slightly ugly, but I think accurate. Smoothing could probably make them look better, but maybe not at reasonable cost. I don't know! Rotating the large sprite is CPU-intensive (and ugly!). I think for small objects this could be used in a game.
Issues:
- Sprites are rotated about their top left corner. I think this is needed to guarantee that atan2 is one-to-one. But it would be better to rotate around an arbitrary center!
- I forgot what the other issues are.

ADDED (7/31): Fixed some missing interactions; elastic collisions apply to the ship; re-did overlay; you can switch views; gravity calc is dropped at high distances.
Press 'Z' to switch views among ship and planetoids. Current view is displayed in overlay.
ADDED (7/31): Only detect collisions for nearby objects (fixes integer overflow issue).
ADDED (7/31): Elastic collisions (for planetoids), sound and music.
I've implemented perfectly elastic collisions between the planetoids. (I haven't done collisions for the ship, yet, partly because it's easier to detect collisions for circles.)
When two planetoids collide, a crashing sound plays and the planets exchange some energy and momentum (details). I'm pretty sure the math is accurate -- at least, the collisions look reasonably accurate. As with gravity, however, the math involved can involve large numbers and integer overflow could be a problem -- I don't know whether it actually does cause issues in the conditions I've built. (EDIT: I think it does. In particular, collision detection uses distance. But, because of integer overflow and sqrt, distances over ~181 roll back to 0. So very distant objects constantly collide with each other and go crazy. This makes the system less stable than it should be. A solution would be to only check collisions for nearby objects, using some cheap and safe heuristic (e.g. Manhattan distance).)

Update:
Finally fixed the map issue from changes in Pico8 and fixed the 10 minute game freeze bug.
Some dialog stuff and fixed a bunch of bugs, cabins now work and there are caves you can rest in.
How to survive your first day:
- When you wash up you're nearly dead, hungry, tired, and exhausted.
- Your health will drop if any statuses (hungry,tired,exhausted,cold) are in the red.
- Resting while your statuses are ok will restore health
- Quickly drink some water from your flask. (x -> items -> flask -> drink)
- Find some fruit/berries and pick them then eat them.
- Salvage wood from your boat, and chop down another tree and get the logs
- Build a shelter, eat, drink and rest, stay warm
- After this, focus on finding freshwater (it has white sparkles) so you can drink and fill your flask
- Then try and find some stone and build a cabin which will replenish your stamina fully
- Build bridges to new areas
Features:
- Day night cycle
- Weather
- Temperature (it's colder at night and when it's raining, stay warm in your shelter/cottage)
- Simple menu system
- Procedurally generated world
- Bridge building
- Building wells that fill with water when it rains
- Plants grows overnight while you're resting
- In progress
- Farms and farming
Plans
- Fishing minigame
- Wild animals and fences to keep safe
- Disallow some stuff at night to incentivise you to work during the day
I suspect code size optimisation will be quite critical =\

This is a really basic test of a supercover algorithm (for determining which grids in a square a line from square 1 to square 2 crosses). Potentially useful for collision detection or line of sight.
Algorithm is cribbed from online (with minor tweaks), and this is otherwise quite simple. Mostly a proof of concept, and to see how well it performed within PICO 8.
Up / Down / Left / Right: move the end point.
Z: change which end point you're moving
so based on a conversation from another thread, I decided to do an implementation of the one line program :
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
now i'm a hobbyist programer at best, so I pose the challenge to the community, what's the smallest program you can write to recreate this effect?
this is my effort - using sprites and in 50 tokens

I have started working on a version of " Combat" during the Outofthebit game jam.
blogpost
The game is far from finished, but I really think a 4 or 6 player version could be amazing.
to do :
- rotation of the sprites of the tank
- bullet creation
- bullet collision
- score
- explosion
- spawn the tanks randomly
- victory screen
- rematch
I

Per this thread, I wanted to figure out a method for pixel-perfect collision for a project I'm working on, and snaggled the in-project attempt so badly that I decided to start from scratch in a separate cart. This is the result, a little demo that shows pixel (and basic box) collision feedback in real-time on a couple of sprites.
As far as I can tell, the collision test is accurate under the assumptions this cart makes: each sprite is an 8x8 sprite referenced directly off the sprite sheet by sprite number, and any non-0 pixel is considered solid. But beyond that I am making no assumptions about it: I'm sure there are cleaner/faster/neater implementations of the same idea, and I'd encourage anyone who feels like taking a shot at cleaning it up to go for it.
This should also in principle be generalizable to arbitrary rectangles of sprite sheet info for e.g. larger multi-tile player sprites, and in fact I made some progress last night trying to generalize it, but that hasn't totally come together. Anyone who feels like tackling that, go for it.

Hey there, I just wanted to have a very quick play with PICO-8 and this seemed like a fun quick test. Single "large" sprite blitted across the screen while being flipped at random, no interaction. Pretty simple and painless, based on an old screen-saver.
Now onto something a bit more involved (but I expect not much).
This is again just a test for the web player, both on the music playing and the gfx rendering. I couldn't get the renderer to render a 1x1 thing, but I haven't tried too hard and I have absolutely no idea of what I'm doing when it comes to high perf pixel pushing. My hope is that this will be my first proper music release for the Pico-8, hopefully in August.






1 comment







