Log In  
Follow
Alamantus
Follow

Is there any way to save data from the Pico-8? I'd like to have persistent high scores in my game, but the Lua file io doesn't seem to work (either that or I'm doing something wrong).

Has anyone done this or have an example of how to do this, or is it just not possible?

P#14784 2015-10-01 09:58 ( Edited 2015-10-02 18:51)

Cart #13867 | 2015-09-08 | Code ▽ | Embed ▽ | No License
7

My first Pico-8 game!

There's actually gameplay stuff this time! Instructions are in the game, 4 enemies are in the game, and you can lose!

The enemies appear randomly, and you have to learn the correct spell to use on each type. After a certain amount of time, the enemy will attack, and with each defeated enemy, the next is even faster. Cast your spells quickly and get as far as you can before being overtaken by the horde!

How to Play:
Boot up your pico-8, load the cart, and run! You’ll see a wand and a target (which is just for show). Use your wand to cast any of the 4 spells (fire, ice, elec, and rock) in the game by matching their directional formula and casting the spell. Every time you run the game, the 4 spells’ formulas randomize, so you’ll need to learn the spells from the spellbook before you can cast anything successfully. You can’t move your wand while looking at your spellbook, though. That’s preposterous! So learn those spells and cast away!

The correct spells to use against enemies never change, so if you die while learning the correct spell to use, you can still use the proper spell next time. But don't wait too long to cast your spells, because your entered spell expires after 2 seconds! The spell expiration never changes, but the time before the enemy attacks does change, so be quick!

Controls:
• Arrow Keys: move your wand
• Z: Cast your spell
• X: Open spellbook
• Z while holding X: Change your wand (just cosmetic)
• Ctrl + R: Restart cart (if you want to change the spells easily)

Plans/Thoughts:
• Save feature for consistent spells/high scores using Lua’s io—is it possible?
• Combo spells. (Ice -> Elec does more damage, etc.)

If you have any ideas, please let me know! I just thought the mechanic would be fun, and I didn’t have any solid ideas for how to play with it, but if you have any thoughts, let me know!

Below is the original proof of concept cart. It contains nothing but casting spells with no time limit. Could be good to practice with before trying for a high score run on the most recent cart! (Note: no high scores are saved yet.)

Cart #13691 | 2015-09-04 | Code ▽ | Embed ▽ | No License
7

P#13692 2015-09-04 13:51 ( Edited 2015-09-24 01:46)

Follow Lexaloffle:        
Generated 2020-08-06 00:54 | 0.123s | 2097k | Q:35