Log In  
Follow
KeyboardDanni

Cart #three_shears-0 | 2026-10-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

This cart performs sprite rotation using an old technique called "three shears rotation":

  1. Do an X shear on tan(angle / 2).
  2. Do a Y shear on -sin(angle).
  3. Do the first shear again.

One interesting property is that no pixels are created or destroyed, only displaced. This got me curious how it would look, so I went ahead and did a small implementation in Pico-8. Ended up being a bit disappointed in the quality, but maybe someone will find it useful.

It has some precision issues due to how it works (it offsets scanlines onto another buffer, then samples from that buffer for the next step). I tried to counter that by introducing a rounding offset to the first and third shears, with limited success. I might tweak this some more to see if I can preserve some of the subpixel precision. For now, you can swap the X and Y shears and see if you get better results with one over the other.

5
1 comment



The Picotron map() function has several bugs related to out-of-bounds ranges:

  • If tile_x or tile_y are negative, the map is displaced up/left while drawing more columns/rows than specified in tiles_x/tiles_y.
  • If tile_x or tile_y are larger than the map width/height, garbage tiles are displayed.
  • If sx/sy are both outside the screen, CPU usage increases the farther out you go (i.e. 4000, 4000 takes 38% CPU, even if you're drawing a single tile)
  • If tiles_x or tiles_y are negative, the results are unexpected (seems to draw the whole map, not sure if there are other issues, and maybe this is working as intended, but I would expect the function to simply draw nothing).

Attached is a cart demonstrating these issues, along with a function that fixes them in the way I would expect (clamping past the edges, not drawing negative ranges, avoiding high CPU outside the view)

0 comments



Cart #libseven-0 | 2026-08-23 | Embed ▽ | License: CC4-BY-NC-SA
29

About

libSeven is a library for creating "Mode 7"-style 3D worlds, using billboard sprites for objects and flat textured planes for the terrain and other effects.

Features

  • A data-oriented API where you maintain a userdata of points and feed it into different functions to transform, project, sort/clip, and turn the points into batches that can be fed into draw ops like sspr.
  • A higher-level, object-oriented API for convenient drawing of scenes, with most of the drawing pipeline handled for you.
  • "Mode 7"-style flat 3D plane drawing, with support for height, pitch, and FOV.
  • Map caching to reduce the per-pixel cost of map tline3d.
    • The system maintains a cache image that is updated as the camera moves (or updated once if the entire map fits in cache).

[ Continue Reading.. ]

29
9 comments



Cart #ud_sandbox-1 | 2026-08-16 | Embed ▽ | License: CC4-BY-NC-SA
5

Userdata Sandbox

Userdata is one of the more powerful tools you get in Picotron. It lets you do bulk operations while avoiding the usual per-element overhead you'd get doing the same thing through Lua for loops. It's especially vital if you need to draw thousands of elements, as otherwise you're using double digits of CPU just to iterate and perform draw calls. But while there's existing userdata documentation, a lot of people have struggled with it, myself included.

In my case, I was having trouble understanding the difference between self/lhs, src/rhs, and dest, the userdata:op parameters and how they control iteration, and how the target data is mutated. So I made this tool to help me visualize what's going on. Folks on the Discord seemed to really like it, so I went ahead and did some cleanup and added a few useful extras like Recipes. I hope this helps get more people into userdata!

[ Continue Reading.. ]

5
0 comments



With the CPU cost adjustments in 0.3.0d, the userdata() constructor costs a lot more to use. I understand that this is to push users to allocate once and reuse, but there are several userdata operations that only apply to all rows, meaning you have to reallocate the userdata every time the size of your data changes. Fire a laser? Reallocation. Collect an item? Reallocation. And for large enough lists, the reallocation costs are quite significant.

I'm working on a 3D graphics library. The idea is you have a list of sprites along with an object transform. The object transforms are applied to the individual point lists (so list 1 uses transform 1, list 2 uses transform 2, etc.). Afterward, they are all concatenated into a list which is sorted on Z using ud:sort, translated into a sspr batch, and fed to sspr.

The transform step uses ud:matmul3d, which can batch operate on a list of vectors. But it always operates on the full list of vectors, so I can't create a temporary buffer of, say, 16k vectors and only do matmul3d on the 3k vectors I want to draw. Same with ud:sort, which only has parameters for which column to sort on.

[ Continue Reading.. ]

0 comments



Picotron's mouselock() does not capture the mouse cursor correctly. It's very easy to move the cursor fast enough that it escapes the window, preventing tracking and allowing the user to click on other windows they didn't intend.

How to reproduce:

  • Run Picotron in the default windowed mode (not fullscreen)
  • Call mouselock(true)
  • Move the mouse vertically
  • Mouse escapes window

The mouse movement itself also seems to be rather jumpy with mouselock enabled, probably due to sampling the OS mouse cursor between moving it to the window center.

This is using Windows as the host OS.

Since Picotron uses SDL2, ideally it should be using the relative mouse mode: https://wiki.libsdl.org/SDL2/SDL_SetRelativeMouseMode

This should guarantee that the mouse stays within the window and will report raw mouse movement needed for first-person games.

1
0 comments



Cart #rekey-2 | 2026-08-31 | Embed ▽ | License: CC4-BY-NC-SA
10

Re-Key

Because not everyone wants to use Z/X.

If you're like me and prefer Space or some other key instead of Z, you've come to the right place. Re-Key lets you easily change which keyboard keys are mapped to the btn() controls.

Up until now, this functionality was only available in Pico-8. Picotron recently added this as a feature, but does not include its own UI and normally requires hand-editing a .pod file and entering numeric keyboard scancodes. With Re-Key, you just click the key you want to rebind, press the new key, and that's it.

System requirements

Re-Key is a front-end GUI for editing key_controls.pod, which was introduced with Picotron 0.3.0d. If you have an older version of Picotron, this utility will not work!

[ Continue Reading.. ]

10
2 comments



I tried making a shortcut to the (accidentally released) Neko Puzzle to put in my launcher apps, and was a bit confused when I saw that it tripped the "modified /system" flag that locks you out of the main leaderboards until reboot.

Steps to reproduce:

  • On a fresh boot, go to System Menu -> About.
  • Check that there's no "modified /system" label
  • Open filenav and navigate to /system/apps
  • Right-click neko_puzzle.p64 and click "Make Desktop Shortcut"
  • Observe "modified /system" label in About.
1
0 comments



Cart #picobench-0 | 2026-06-20 | Embed ▽ | License: CC4-BY-NC-SA
6

Picobench

Picobench is a benchmark cart covering a number of common drawing operations in Picotron. By pressing X, you can time each scene to see how fast each operation is under various circumstances. Benching can be done on individual scenes, or en masse.

I got the idea for this cart while making a particle system. I wanted to know what graphics functions would be the most efficient, but I was also curious about other aspects, such as how many scrolling parallax layers Picotron could handle. That's why the primary metric for these tests is "screenfills/frame".

There are currently over 70 different scenes in Picobench. With this project I wanted to explore and demonstrate several aspects of Picotron's performance:

[ Continue Reading.. ]

6
0 comments



Cart #shakeleste-0 | 2026-04-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

What?

Shakeleste is Celeste with entirely too much screenshake.

Why?

This mod is intended both as a goofy art piece, and as an example of how not to make a game, in the spirit of Game Over: Because No One Can Save the Universe.

Features

  • Jumping causes screenshake.
  • Walljumping causes screenshake.
  • Dashing causes screenshake that gets worse with each level.
  • Failed dashes cause screenshake.
  • Recharging your dash causes screenshake.
  • Collecting strawberries causes screenshake.
  • Angering strawberries causes screenshake, too.
  • Springs cause random amounts of screenshake.

[ Continue Reading.. ]

8
2 comments



Cart #gem_factory-1 | 2026-03-31 | Embed ▽ | License: CC4-BY-NC-SA
18

Gem Factory

Picotron got scoresub with the 0.3 update, so naturally it needed a head-empty gem-themed matching puzzle game with a hidden layer of galaxy brain strats.

Instructions

Click and drag to slide a row or column of gems. You can release the mouse at the original position to cancel the move.

Match three or more gems in a cluster to clear them and get points. The gems don't have to be in a line, but they do need to be 4-way neighbors.

After every move, new gem crates are dumped in. These crates cannot be matched, but will open to reveal new gems on the next move.

The clock on the right counts down in realtime, and resets whenever you make a match. If the clock runs out, gem crates will slowly fill the board. Click and hold on the clock to speed up the timer.

[ Continue Reading.. ]

18
2 comments



Cart #libbtnstate-0 | 2026-02-16 | Embed ▽ | License: CC4-BY-NC-SA
3

libBtnState is a small library that works around inputs getting dropped when the framerate drops below 60 FPS. But it also has several goodies designed to make life easier.

  • Object-oriented, so you can have multiple copies of state
  • You decide when input is updated
  • Simple button remapping
  • Ability to get whether a button was recently pressed (within N frames), and then mark it as held (for things like buffering jump presses)
  • Ability to get whether a button was recently pressed without auto-repeat

Basic usage:

include "src/lib/require.lua"

local BtnState = require("libbtnstate")

local btn_state = BtnState:new()
local is_pressed = false

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=184049#p)
3
0 comments



Cart #dueling_snakes-0 | 2026-01-23 | Embed ▽ | License: CC4-BY-NC-SA
8

Watch computer-controlled snakes battle it out to be the last one standing! Features a number of different maps of various shapes and sizes.

Controls: Just watch. Or hold C to speed things up.

Also works as a screensaver or wallpaper! In wallpaper mode, it will use the desktop colors from your theme and reduce processing to save on CPU.

8
1 comment



Cart #places_pane-1 | 2026-01-20 | Embed ▽ | License: CC4-BY-NC-SA
12

NOTE: You will need to unsandbox this (via About dialog) because it needs to be able to launch filenav.

If you're anything like me you probably have a bunch of folders open for moving things around, editing your work, and referencing other stuff. Navigating back to the same location every time is a pain, so you keep a bunch of windows open, and now you have a cluttered workspace. Well I wanted to do something about that, so I made this.

Places Pane is inspired by the left-side pane found in modern file managers, where you can drag your favorite folders to pin them for quick access later. Picotron doesn't offer a lot of screen real-estate, so having it on every filenav window would make things messy. Instead, Places Pane sits on your desktop, like a tidier replacement for desktop shortcuts.

[ Continue Reading.. ]

12
6 comments



Cart #festive_lights-2 | 2025-12-19 | Embed ▽ | License: CC4-BY-NC-SA
8

Holiday string lights for your Picotron desktop! Light on CPU, doesn't obstruct mouse clicks. Launch it again to open the settings dialog which lets you quit the application (may require unsandboxing for this to work).

Inspired by an old Windows 95 program called Holiday Lights.

Season's Greetings!

8
2 comments



Cart #springloader-6 | 2026-05-01 | Embed ▽ | License: CC4-BY-NC-SA
19

NOTE: You will need to unsandbox this (via About dialog) because it needs to access your app folder to launch apps (surprise, surprise).

Recently came across Picotron and picked it up because I love the idea of a tiny fake desktop computer. I wanted a nice way to run my downloaded programs, something better than double-clicking raw filenames in the file manager. So I made this.

Springloader is a full-screen app launcher. When you run it, it'll sit in its own workspace for easy access from just about any app, windowed or full-screen.

Features:

  • Based on a central app folder. Defaults to /desktop/apps but can be changed to any location.
  • Uses subfolders as categories.

[ Continue Reading.. ]

19
34 comments