Hey everyone, I've made a little gui program with Python to export and import the lua code of the cartridges(only working for .p8 files for now).It even checks that the code size you're trying to import to the cart is less than 32k, tough i'm not sure if that is still the correct size. You can check it out here.
Contributions are highly appreciated!(Specially if you know something about tkinter, because i learned it doing this program and it's quite janky lol).
Cheers!
Hey everyone,
As apart of a project I am working on, I encoded the P8SCII font and character set into 2 C arrays (I couldn't find any existing such encoding). I also wrote a very small library around these arrays and released everything on GitHub into the public domain. If you’re ever working on a C/C++ project where you want P8SCII but don’t have (or want) disk IO, this library can hopefully prove useful!
So, as shown in my previous two posts, I'm making an operating system for Pico-8 called P8OS.
I am making it so that Z, closest to the window/whatever key, activates the app menu, and X, right next to it activates the task menu, where you can see which windows/programs are active. I need to check for both of them every frame. Shortened down to the problematic code, here is where it goes wrong:
function btnk(k) local p=stat(30)and stat(31) if k!=nil then if(p==k)return true if(p!=k)return false else return p end end if(btnk('z'))inmenu=not inmenu if(btnk('x'))intask=not intask |
It will not detect pressing X unless Z is pressed in the same frame, which is even more confusing.
Clearly something has gone desperately wrong somewhere in this code. I just can't pinpoint what.
P.S. Keep in mind that if you want to reproduce this you will need to call poke(24365,1) or equivalents at the start of your code.
This is my manifesto of sorts on how I plan to implement P8OS in the forseeable future. I will keep writing it over time. Basically, you'll see the post progress as I write it down.
Part 0: Decisions, decisions, decisions
First, I'll have to make some choices to fit the limitations of PICO-8. First and formost; will we allow external programs that can be installed onto any given person's copy of the OS? And if so, how will we fit this into PICO-8?
I have the answer to both of those questions. 1) Yes. 2) A VM.
A VM is perfect for this. If you manage to design a compact and efficient bytecode and run it efficiently, then you're set.
Second decision: Should our OS have multitasking? And, once again, if so, how?
Here are the answers: 1) Yes. 2) Instancing.
If we build our VM modularly, we should be able to have a single instance of the VM for each program, which if run asynchronously, would allow for multitasking.
Third decision: Should we use the mouse and keyboard?
As demonstrated by my extremely early and nonfunctional version of the OS, yes to both.
Here is a simple platformer based on the NerdyTeachers Platormer Tutorial for Pico-8. I highly recommend this tutorial for anyone who is starting off with Pico-8. Here is a small sample of everything the tutorial covers (besides the music).
Link to tutorial: https://www.youtube.com/watch?v=q6c6DvGK4lg
Slide down a slippery pipe being pulled by a fish. The fish loves slime and the slime leaking into the water will determine which direction the fish pulls you. But watch out for the slime enemies. Don't let them touch you when they are red or hit you with their red slime particles or you will lose hearts! Control the flow of the slime, collect money, and smash the enemy slimes. See if you can make it through the 9 levels!
controls:
press z to increase spin speed
press x to make the fish jump
press x while the fish is in the air to slam it down and smash slimes
use the arrow keys to serve back and forth / up and down while sliding
This is a very early version of P8OS(v0.2 as of now), a very creatively named operating system built on the one Pico-8 already has. I'm trying to do what the original Windows did, which is piggybacking on an existing framework and building off of that.
It really isn't much just yet, but here's a few lists for those who like them.
Existing features:
- Mouse and keyboard reading(really not much to brag about)
- Removed v0.2: A system clock on the menu bar
- A basic menu bar
- A (yet nonfunctional) app menu you can toggle with Z(closest to the Windows button)
- A very clever way of storing program names
- v0.2: An (also nonfunctional) task menu you can toggle with X(next to the app button)
About
Pico Off Road is a racing game inspired by the classic Ironman Super Off Road. There are 5 car colors to choose from (equal by parameters), three tracks that can be played in both directions. Player can choose from two modes - single race or tournament. There is one "hidden" mode: single race with 0 opponents can be considered as a practice.
Menu controls
- Z = confirm
- X = back
Driving controls
- arrows = turning, throttle, reverse
- Z = nitro
- X = throttle (for controllers if you can't press left/right + forward at the same time)
Tech
Pico Off Road uses combination of 2D sprites, 3D height map and real-time rendered meshes (cars).
Update 13-03-2021: New copy-paste and flood fill tools added.
Introducing: Sprite Animator
SPRITE ANIMATOR is a tool for creating simple looped animations and exporting the resulting data to a sprite sheet. Here's a quick guide on how to get started...
Draw the frames of your animation in the canvas. The canvas can be resized and navigated with the controls in the corners. Add and remove frames using the +/- near the track bar. You can even draw into an animation while it's playing!
A fun PICO-8 cover of the song "From the Gallows" by I DON'T KNOW HOW BUT THEY FOUND ME.
It also comes with a simple visualization modeled after the cover of their Razzmatazz album, courtesy of Tellexx.
The original song is here. (Content warning: reference to suicide in the lyrics.)
Learning-PICO-8:
Game development while learning PICO-8 step by step.
https://github.com/emutyworks/Learning-PICO-8/wiki
List of required token
https://github.com/emutyworks/Learning-PICO-8/wiki/List-of-required-token
This was inspired by u/TimeLoad's URL post, and my compiler is heavily based on his.
We all know how bad Pico8's default editor is, so I made a tool that would (hopefully) help your Pico 8 workflow.
I have the files + a detailed record on URL my GitHub.
Basically, compiler.py takes the .lua files and the assets.p8 from a project folder and compiles them to a cart (final.p8), export.py exports a given project to HTML and JS, and pico8label.py adds a label to a given cart (used in compiler.py).
If you have any feedback or you found any bugs please message me and I'll try my best to fix it!