Log In  

Just wondering if there was a method of creating save files, obviously to keep players data like progress in a cartridge, I mainly want to add a scoreboard system in my game that saves data through multiple sessions.
any help appreciated :)

P#91234 2021-04-28 07:10

see dset/dget in manual - these are the functions to save game state/scores.

P#91239 2021-04-28 11:19

It's called persistent cart data or cartridge data - there's a section in the manual about it that talks about the basics.

P#91244 2021-04-28 13:34

thanks guys! :D

P#91270 2021-04-28 23:40

Why does no game use that? Haven't found one yet at least. :(

P#107178 2022-02-18 16:31

Many games use it! That’s how puzzle games keep track of the levels you have unlocked (example: Cake Monsters), or other games keep track of inventory (Mai Chan's Sweet Buns).

Other games are meant to be played in one session (X-Zero), so they don’t save anything.

P#107183 2022-02-18 17:17

I tried ESC (ingame in Celeste)
save progress.p8 (Enter)

... but I don't think it works.

P#107261 2022-02-19 18:27

@Tarik My game uses it. It's called Orbital, and has a save system that saves all kinds of data for reload. It even contains some functions for saving up to 32 booleans to a single number value. Since dset can save up to, I think, 64 values, this function can allow you to save up to 2048 on-off switches (true-false values).

@dfilskov That's how you save a Pico-8 file you are working on, not your game progress. In order to save game progress, the creator of the game, or you if you have access to the code, has to create a function that uses dset() and dget() to save certain values to the cart, then reload them in-game. I'm not sure if Celeste has that feature.

P#107290 2022-02-20 02:10 ( Edited 2022-02-20 02:12)

@UnitVector - Thanks! - that's what I
"feared". I thought that all carts came
open source with the code freely
accessible (by tapping ESC).

I've tried Orbital now on the web but I
couldn't find a save-state/game option.
It makes sense, though, if it's only
available in a normal Pico-8 engine :)

P#107308 2022-02-20 06:37

I don't think you understood me. All carts do come with open source code. The method you described is how to save the code. We are talking about saving in-game progress, like saving that you are on level 3 and have 1000 points so you can continue from there next time you play.

My game does have that. While playing it, press "Z", then go to option and press "save game". There's also a "continue" button on the main menu, and it also auto-saves, with a pop-up saying "game saved", as soon as you finish watching the intro. I don't understand how you could have missed all that.

If you are trying to save the cart to your computer, click the tiny image of a cartridge at the bottom left of the game window, then save the png image that pops up. Then open this in your Pico-8 program.

P#108080 2022-03-05 05:49 ( Edited 2022-03-05 05:54)

Thanks! - That's cool. Where is the progess

I'm quite new to pico-8 and have only tried
connecting a keyboard once to tap Esc. But
I didn't see any code. Just a prompt. And
the saved .p8 file didn't show code when I
opened it in a text editor I think so I
figured it was binary.

I didn't go into Options the first time
around and was looking at the "main" menu
for save game:

P#108082 2022-03-05 06:52

@dfilskov It's saved in pico8>cdata, the cartdata("string") will create a string.p8d.txt file.
reminder you can use folder in the command line to bring up your application support folder or whereever if you don't know where it is.

P#108089 2022-03-05 13:20

Escape goes from game to command prompt, press Escape again to go from prompt to editor!

Games from the BBS are saved as PNG. From pico-8 itself you can load one and save as P8, which is a text file.

P#108096 2022-03-05 17:38

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-11-28 11:56:49 | 0.061s | Q:27