Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General

The PICO-8 manual as it stands today is flawed. What I mean by that is not only is it organized in such a way that makes it harder to gleam certain information out of it, but it also has flaws and inconsistencies with what the PICO-8 actually is. It also omits important information, such as cycle count and the extra 16 colors. eevee has already taken note of some of these flaws, but I still believe there may be more out there. There's the PICO-8 wiki, but that's not fully documented either. What we need is a new way of organizing known information about the PICO-8 into a manner which makes sense and is simple to use.

I propose the creation of a PICO-8 technical manual, a manual that fully documents everything the community knows about the PICO-8, both it's version of lua and it's editors, as well as the programs on it. It will be a collaborative project. Alternatively, we could fix the current PICO-8 wiki in such a way that it accounts for these flaws, is more detailed and easier to use. Both of these options I think could really help people like me who wish to delve deeper into how it works exactly.

P#97120 2021-09-09 23:34

Cart #bufaghyu-2 | 2021-09-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

Figured Pico-8 needed a Burgertime! This is a Burgertime demake, it uses about half the resolution of the original. I tried to make it as true to the arcade version as possible. Includes all 6 levels, as well as the level 28 kill screen.

Did my best on the AI for the enemies and speeds, but with the size differences, and a few other things, probably plays slightly different than the bigger arcade version- but pretty close! I also tried to reproduce some of the bugs- for example it only shows up to level 18 in the HUD (3 times through the levels), as well as 9 lives, even though you can get more lives and keep going- just like the original.

This was one of my favourites on the Intellivision back in the day, so enjoy!

Press (Z) / Button 1 to use your pepper.

If anyone is good with sound and wants to tweak the level win, and the level start sounds, let me know!

If you have the Pico-8 desktop version and you want to play with the cart, inside of the Start_Game method, change your starting level, lives, or peppers. (LIVES, LEVEL, GLB_PEPPERS)

Some game play clips:

Updates:

  1. Updated timing slightly and eliminated a bit of randomness to better match original. If you use the grouping technique for level 1, it should work same as the arcade now.
P#97118 2021-09-09 22:55 ( Edited 2021-09-11 18:47)

THIS ERROR HAS BEEN RESOLVED (09-13-21)
Closing error ticket.

I was running into an error in the newest version of Pico-8.

If you have this code:

function _init()
cls()
for i=1,8 do
  a=rand(1,2)
  print(a)
end
end

function rand(a,b)
  if (a>b) a,b=b,a
  return flr(a+rnd(b-a+1))
end

And run it. It works fine in all versions of Pico-8.

However if in immediate mode you type:

print(rand(1,2))

It works just fine in version 0.1.12c but you get an ERROR message in version 0.2.3.
It does not matter if the functions come before _init() you get the same results.

If I read this correctly it means we cannot use immediate mode to debug our functions in the newest version whereas in the earlier version, you could. I personally need this so I can check my functions in immediate mode to make sure they are working correctly.

Version 0.1.12c is the latest version where it works correctly; you can call functions in immediate mode. All versions after this up to 0.2.3 will not let you. I checked and confirmed this.

P#97117 2021-09-09 22:30 ( Edited 2021-09-13 20:33)

Amika's Quest is a roguelite Zelda-like!

Controls:

X (X, V or M on a keyboard): Sword

O (Z, C or N): Item

Pause (P): Open menu

Once items are purchased, you can switch between items in the pause menu

Cart #amikasquest-0 | 2021-09-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Credits:

Design and coding: Tyler Davis
Character design: Te'shon Farr
Music: Cory Shane Davis

P#97116 2021-09-09 21:47 ( Edited 2021-09-09 21:50)

I've been working on a project for a week or so, and my PC crashed. When I loaded up Pico again it would not let me load the file. I simply get a 'could not load' message.

I can see the file clearly and even if I try to open through the file itself, it simply tells me again that it can not load the file - so either it has become corrupt or there's something else, but it is working totally fine before the PC crashed.

Any help is appreciated!

P#97111 2021-09-09 19:13

Conways Game of life

Created by Duffhause

Cart

Cart #conwaysgameoflife-0 | 2021-09-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Controls

You can only move cursor and toggle tiles while the game is paused

  • Move cursor with arrow keys
  • Press X to toggle a cell
  • Press Z to play and pause

Code

You can view the code on Github

P#97095 2021-09-09 09:43

Cart #portal_golf-2 | 2021-09-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

Chain portals together to collect all the gold!

Portal Golf is a physics puzzle game with portals. Place portals around the level in order to get the ball to collect every gold bar. You have no control over the movement of the ball and can only place portals before you start the run. Try to use as few portals as possible to earn medals, or just fill the whole level with portals and have fun!

Detailed Instructions are in-game

Controls:

  • Left click on any wall with a white edge to add a portal
  • Left click and drag an existing portal to move it somewhere else
  • Right click to delete an existing portal
  • Press C to start or stop a run

Note that the game plays much more smoothly on desktop than web - consider downloading it. This is the full version of a game jam game I made last year. Follow me for more gamedev! https://twitter.com/MaxBize

P#97092 2021-09-09 07:01 ( Edited 2021-09-09 07:23)

Cart #animmario-0 | 2021-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hello!

I am going a bit mad trying to figure out how to make a simple 4 frame sprite animation run on a loop, and then transition to a different 4 frame animation loop after a button is pressed.

Simply - I am trying to make this Mario sprite look like it is walking forward when idle, or pressing forward, and then look like he is walking sideways when pressing left or right. I can make him animate on loop when idle, but I cannot figure out how to make it animate as a different sequence after a direction is pressed, and ensure the animation runs smooth (for example, I can get it to change to the new sequence, but holding the button down keeps the sequence locked into the first frame of the animation).

I hope that makes sense! Does anyone have a simple solution?

P#97078 2021-09-08 21:39

Cart #devilchurch-0 | 2021-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

c'est mon premier jeux,
vous devez sortir vous et 12 autres personnes de leur maison et aller a la "satanic church".
ce jeux contient des references sur le black metal.
des clefs sont caches sous des arbres et rochers
la musique est de GRUBER.

P#97066 2021-09-08 19:25 ( Edited 2021-09-10 10:36)

Cart #zerpong-0 | 2021-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#97040 2021-09-08 03:10

Hello all, this is My First PICO-8 Game™︎ and therefore My First BBS Cart Upload™︎™︎, hopefully I've done it right.

Cart #unchecked_8-1 | 2021-09-08 | Code ▽ | Embed ▽ | No License
16

Unchecked-8 is a slight twist on the classic spike-jumping, maze exploration platformer. There are simply 10 stars to collect. Once you figure out how it works, I estimate it takes 15-30 minutes?

I wanted to dive into PICO-8, make something reasonably small, and actually release it - so I chose a remake/demake of my own short game Unchecked (previously existed in Flash and Basic). I like this so much it's now the canonical version of this game!

I first put it up on itch.io, because it had some HTML player customizations and also to hide My First P8/Lua Code™︎™︎™︎
https://rtouk.itch.io/unchecked-8
but now, with a minor update to the game, and the 0.2.3 release of P8 (with Lucky Draw!) I wanted to share it on the BBS :)

Cheers!

P#97038 2021-09-08 02:46

Cart #spaceshipgame-0 | 2021-09-07 | Code ▽ | Embed ▽ | No License

A game about shooting aliens that i made cause boredom.
The collision system is also trash but i can't make it better
[8x8]

Anyways, it's pretty cool and i have like 3 days working on it, so please tell me what you think in the comments too!
and also print("have a good day :D")

P#97024 2021-09-07 21:17

Cart #niwigidik-0 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Some rainbow squares.
The idea popped into my head at an inconvenient time so I had to write it down on my phone. Then I pasted it into pico-8.

Seizure warning maybe.

P#97023 2021-09-07 21:06

Hello all...
Two things I want to ask about but don't think it'd justify two separate threads.

1/ Can someone explain how to do a particle explosion thing that emits in a circular pattern?
I've experimented with particles for dust etc. but thought it might be nice to have a pickup emit a circular particle system when picked up. I don't know how to work with the x and y for each particle.

2/ Can someone point me to a tutorial or code, or whatever for those old school passcode systems for level/life/score saves. I wanted to have a system in their as a homage to games gone by that one would type in a 5 digit passcode and it would carry on the game where you left off. Like Bubble Bobble used to have.

Thanks for your time.
Peej

P#97018 2021-09-07 20:19

I-ve been using PICOCAD for a while now, and i just found out how it works!!! PICO-8!!! hahahaha i downloaded pico-8 in an instant!!!

im excited to learn more about this and maybe try programing something!!!

P#97003 2021-09-07 15:51

Cart #quarder-0 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Pay attention to the top row, where the digits 0123456789 have been shuffled. Move the cursor right and left to choose a digit; press a button to select the digit. Your goal is to select four digits which are in order, or in reverse order. (Keeping a consistent beat to your inputs will cost you less life.)

If the presented digits were 5709134682, you could win by clicking on 0, then 1, then 3, and finally 4 since those are four increasing digits appearing in that order within 5709134682. At that point, you will be presented with another puzzle. You can also win by choosing four digits in reverse order.

The visualization in the center makes it easier to find these patterns.

That this is always possible is a consequence of Dilworth's theorem.

P#97002 2021-09-07 15:13

Cart #pillogrim_1_0-0 | 2021-09-11 | Code ▽ | Embed ▽ | No License
1

Like the 99 bomb Spelunky Deathmatch I used to play, for 1 or 2 players.

This is my first real Pico-8 project (after a failed attempt at Pinball). I'm happy with how it's turned out. The AI isn't perfect, but can provide a really decent challenge. It may be improved in the future.

O is bomb, Down is pick up, O while holding is shoot, X is jump.

Changes

1.0 2021-09-11

  • Added a number of new maps
  • Added title screen music
  • Added item Whip
  • Added terrain Ladder
  • Pick up by 'down' instead of 'down + O'
  • Fix bug launcher missile hits if player moving
  • Fixes to lazgun hit
  • AI fixes including detecting freefall, preventing throwing teddy away,

0.2 2021-09-09

  • Added baseball bat
  • Fixed multiple times getting hit
  • AI will pick up item if running past
P#96996 2021-09-07 13:25 ( Edited 2021-09-11 05:49)

the product of an afternoon

Cart #wormthing-1 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#96986 2021-09-07 04:06

Cart #last_battle_of_angry_square-0 | 2021-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Angry Square must hold out as long as it can in its Last Battle against inevitable square-shaped oblivion.

P#96983 2021-09-07 02:22

PICO-8 0.2.3 is now up on lexaloffle, Humble, itch.io, and for PocketCHIP.

This update is focused on resolving runtime issues, with a couple of small but handy features thrown in for good measure:

Lucky Draw

To grab 32 random cartridges from the BBS, there is now a 'Lucky Draw' list in SPLORE. It is more likely to select cartridges that have more stars, but even unrated carts have a decent chance of appearing. Perhaps this will be a way to unearth some undiscovered gems, or just to find something new to play without scrolling back through several years of carts.

The list is cached, so it only changes every 2 minutes or so. But you can keep paging through the list to get new items forever.

Live Token / Character Count

Select some text in the code editor to view how many characters or tokens are contained within.

Shorthand Print Statements

The shorthand version of print (?"hello") used to require no preceding statement be on the same line, but you can now mix it with things like the shorthand IF statement, as long as it is the last thing on the line:

-- PLAY A SOUND EFFECT WHEN HIT
IF (PGET(X,Y)>0) HIT=1 ?"\ADAF"

Thanks to @Liquidream for suggesting this. It should be handy for things like tweetcarts and PICO-1K Jam (which coincidentally is also organized by Liquidream!)

New Manual

The PICO-8 Manual is still a work in progress, but it went through a large update last month, with new formatting, dark mode, linkable headers, and more printer-friendly. You can find it on the resources page:

https://www.lexaloffle.com/pico-8.php?page=resources

The changelog has been separated into a text file here:

https://www.lexaloffle.com/dl/docs/pico-8_changelog.txt

The pico-8.txt included in the distributables has changed to a short version that links to the online manual, but later on I'll bring back the full ascii version and keep it in sync with the html version.

.P8.ROM Format

This isn't a very useful feature unless you are manipulating PICO-8 cartridges with external tools, but it has always irked me that it is not possible to write 32k of PICO-8 cartridge to a file that is 32k!

> SAVE FOO32K.P8.ROM
SAVED FOO32K.P8.ROM
> LOAD FOO32K.P8.ROM
LOADED FOO32K.P8.ROM (0 CHARS)

Majestic.

Large Numbers

tostr() and tonum() now take format flags that make it easier to deal with large numbers.

https://www.lexaloffle.com/dl/docs/pico-8_manual.html#TOSTR

PICO-8's numbers are all 16:16 fixed point, which basically means that every number is internally stored as a large 32-bit integer that is divided by 65536 to get the value in Lua. So for example, if you want to use that large integer for something like scores that need to go above the usual maximum of 32767, bit 0x2 can be used to display it in the raw integer form:

?TOSTR(3, 0x2)
196608
?TONUM("196608", 0x2)
3

To add 10 points to a score stored in this way, you'd need to shift it right 16 bits:

SCORE += 10>>16

CPU Counting

0.2.3 contains two changed to cpu costs which does not effect many cartridges:

  1. In 0.2.2c, it was cheaper to write "local a=0+b" than "local a=b" and also "local a=0-b" than "local a=-b". This is because the Lua vm instruction for addition was cheaper than local assignment (OP_MOVE), and for unary minus (OP_UNM). The best solution I could find was simply to reduce the cost of those two instructions to 1 cycle instead of 2, resulting in a slight speed increase in some cases.

  2. peeking or poking multiple values in 0.2.2c did not cost any additional cpu, so doing something like: poke4(0,peek4(0x1000,0x1000)) was completely free! The same line in 0.2.3 now costs the same as doing an equivalent memcpy.

Future Plans

Next up for PICO-8 is a 64-bit Raspberry Pi Build, and also a preview of a web version that is also handy for running PICO-8 on Chromebooks. I'm also still working on online scores, which required developing some bespoke infrastructure that is optimised for PICO-8's usage patterns, and can handle traffic from exported carts without needing to start charging for PICONET subscriptions or anything like that. I'll test it next month with the release of https://www.doodlemud.com, which is a multiplayer drawing game designed to battletest PICO-8's backend before exposing it to precious cartridge data!

Changelog


v0.2.3

Added: Lucky draw list in splore -- gives a random selection of carts
Added: load/save carts in .p8.rom format (raw binary 32k block)
Added: tostr(), tonum() take format_flags parameter to convert to and from 32-bit signed ints
Added: ord(str, pos, num) returns num results starting from character at pos (similar to peek)
Added: FOLDER takes an optional parameter to open other host directories: BACKUPS | DESKTOP | CONFIG | BBS
Added: Live character / token count of selected text shown at bottom right of code editor
Changed: Removed collaboration list from splore (can still search for sub:collab)
Changed: 0x808 audio has a slight lpf filter on it by default // turn off by setting bit 0x20 at 0x5f36
Changed: tonum(boolean_value) returns 1 or 0 instead of nil
Changed: cursor CR x position set only by print(str,x,y) or cursor(), but not by print(str) (0x5f24)
Changed: character wrap is on by default when using print(str)
Changed: force-pause-menu hold duration is 500ms instead of 300ms to prevent accidentally triggering it
Changed: default gif length for new install is 16 seconds
Changed: ? shorthand can be used anywhere on a line e.g. if (true) ?"yes"
Changed: allow while/if shorthand with no statement, using colon separator: WHILE(BTN()==0);
Changed: added warning to fullscreen_method 2 in config.txt (gives erratic behaviour under some drivers)
Changed: cheaper OP_MOVE, OP_UNM lua vm instructions so that e.g. "local a=0-b" is not faster than "local a=-b"
Fixed: peek() / poke() do not charge extra cpu when reading or writing multiple values
Fixed: fget(n) returns junk when n is out of range (0..255); should return 0 in that case
Fixed: dropped .PNG files not detected as images when filename uses uppercase extension
Fixed: line()/tline() illegal writes caused by faulty clipping when (x1-x0) or (y1-y0) >= 0x8000
Fixed: -accept_future 1 only worked with .p8.png files; now also applies to .p8
Fixed: ?"\a7f" does not play f (happens only when f is the first note)
Fixed: abs(0x8000) return 0x0.0001 (should be 0x7fff.ffff)
Fixed: parameter string (stat(6)) is dropped when passed via RUN command
Fixed: preprocessing of form: "x += x<0 and -1 or 1" broken for operators <, >
Fixed: tab not accepted as whitespace for some preprocessor operations
Fixed: stat(1) wraps around when cpu is >= 2.0 (regression in 0.2.2)
Fixed: pressing SHIFT+ENTER on "local function foo()" or after "if (..) else" doesn't insert "end"
Fixed: pal() does not reset secondary palette to system default
Fixed: 0x808 audio does not respect pausing / volume / is not recorded with extcmd("audio_rec")
Fixed: 'h' pressed in sprite editor toggles hex mode in map editor
Fixed: After pressing shift-tab to toggle 128x128 map view, active draw area is still only 128x112
Fixed: Attempt to navigate to non-existant tab after running: function _update60() _update60=nil end
Fixed: stat(101) not returning cart id when running from BBS web player
Fixed: print() wrapping + scrolling; e.g. from commandline: while(true) print(chr(254+rnd(2)).."\0")
Fixed: integer divide assignment operator (\=) costs 2 tokens instead of 1

P#96897 2021-09-06 21:26
View Older Posts
Follow Lexaloffle:        
Generated 2021-09-22 01:47:58 | 0.147s | Q:86