While enabling mouse input:
POKE(0x5F2D, flags) -- where flags are:
0x1 Enable
0x2 Mouse buttons trigger btn(4)..btn(6)
STAT(34) -- Mouse buttons (bitfield) with
0x1: Left
0x2: Right
0x4: middle
poke(0x5f2d, 3) function _update() if (stat(34)==1) print("l") if (stat(34)==2) print("r") if (stat(34)==4) print("m") if (btn(4)) print(4) if (btn(5)) print(5) if (btn(6)) print(6) if (btn(🅾️)) print('🅾️') if (btn(❎)) print('❎') end |
Left mouse button (1) triggers button 5 (❎)
Right mouse button (2) triggers button 4 (🅾️)
Shouldn't this be the other way round?
Slowboarder2
A highscore, arcade game about snowboarding!
Arrow keys - Move
Z or O - Jump
X - Spin
Collect stars, kill skiers and yetis and get the highest score you can!
Killing yetis will grant you a health pip, collect 4 to regenerate a heart!
Your momentum is locked when you are jumping and spinning so be careful not to crash into anything!
There are 3 powerups to collect:
2x Score
Slow
+1 Health pip
I've recently finished writing a page on my personal wiki about coroutines, and quick examples on how to make the most of them. I would appreciate any feedback people have, including misconceptions I have regarding the execution model. Most of my PICO-8 work as of late has been figuring out how to create easy animation engines that are also expressive and flexible. I think I have the functionality down; now comes the hard part of nailing coroutine and data structure design for complex animations!
I'd love to read what you guys think of it.
https://wiki.zlg.space/programming/pico8/recipes/coroutine
Thanks for reading!
There seems to be some kind of flaw on my system when playing music via the music pattern editor: it'll start playing normally, with the display scrolling, but despite my making no input with mouse, keyboard, or controller, it will abruptly stop scrolling and leave the cursor behind.
My first thought was that perhaps the active SFX in the SFX editor had started, but that wasn't the case in any of my tests. There's no obvious pattern to it - it's not after a fixed duration, after a fixed number of patterns, or after a specific pattern appears - but in each of the files I tried, it stopped on the same places in two separate tests.
The music continues playing as normal and correctly - it's as if, at an unpredictable point, PICO-8 decided I clicked on the SFX or the cursor or something to edit the current SFX.
Edit: I posted below that this seems to happen when the SFX in the selected channel changes from one pattern to the next; doing a quick test on 0.2.4, I didn't see it happen there. It looks like this may have been introduced in 0.2.4b.
Screenshots
The Game
It's a sim-city like game with monsters and zombies of unknown origin.
You have to run a small colony, protecting the survivors and stacking resources.
It's my first Pico-8 Game, and I'm, learning by doing. I did a prototype in December and then rewrote everything.
I had many functions and objects in mind, but I realized I was close to the tokens limit.
So I had to choose only the most important features.
Controls
Z - action / selection
X - cancel action / selection
How to Play
TO LOAD THIS CART in Pico-8, type in immediate mode,
load #draw_vs_update
Press 🅾️ to swap between using _update() and _draw(). When in _draw() mode you may need to hold 🅾️ down a bit to get it to the opposite mode.
Yet this confuses me. Why is it that draw() runs faster than update() ?
And yes you can change it to update60() that does run faster, but still not as fast as draw().
Pointsketch is a simple art tool based on points with three parameters: x, y and color. These points can be easily edited, and all of them are connected by lines in the order that they were created.
There are several things that can be done in Pointsketch, so here's a little guide:
Overview
- Section A - insert/delete/edit points
- Section B - select/customize colors (alternate colors are marked with ◆)
- Section C - save sketch (⬇️) / load sketch (⬆️)
- Section D - change mode (draw/edit)
Controls
General use
- Arrow keys - scroll
- O/Z, X - zoom
Section A
TO LOAD THIS CART in immediate mode, type:
load #map_cpu
Press 🅾️ to swap modes:
MODE_______________ CPU 0 = map() ......... 12% 1 = rectfill() .... 1% 2 = for/end map ... 201% 3 = for/end fill .. 54% |
I am not understanding how it is that map()
is so much slower than rectfill()
when on modes 2 it is only 4x slower than its fill counterpart, mode 3.
It is not the details which should be pretty straight-forward. I mean isn't rectfill()
also plotting pixels just the same one each time when compared to map()
?