Log In  

I was reading in the instructions something called, "breadcrumbs." I'm thinking this might be something like Gretel used to mark the path home out of the forest.

Can someone please explain how these are worked into PICO-8 and their usage ?

P#54808 2018-08-07 13:12 ( Edited 2018-08-09 06:36)

You've got the right analogy; breadcrumbs are a path leading back where you came from. Most often, the term refers to a sequence of buttons or links that point to each place you went through to get where you are. Just under the title of this thread, for instance, is "BBS > PICO-8 > Discussion". That's a breadcrumb trail.

In P8, it refers to a menu item that can be created with the load() function or to the argument that creates that item. If you run, say,

load("cart2", "go back")

While cart2 is running, the menu will include an item labeled "go back". That menu item is the breadcrumb. Selecting it will return you to that was running before.

P#54819 2018-08-07 14:55 ( Edited 2018-08-07 18:55)

I'm ... confused. Why on Earth would you run another program - unless I guess it's just to save some memory ?

Now the Apple ][ used something called, MERGE I think where you could load an Applesoft program in and its contents MERGED with the existing code - that could be useful.

But you're saying it exits one entire program to run another, yes ? Does it retain all its memory ? Or is that wiped clean only to be recovered with DGET() ?

P#54839 2018-08-07 22:12 ( Edited 2018-08-08 02:12)

Nothing from the first cart is retained in memory when running the second cart except for the breadcrumb. This allows the player to exit the second cart and return to the first cart.

The most obvious application is custom launcher carts, such as to host and publish the results of game jams, social collab events, or disk mags.

P#54844 2018-08-07 22:45 ( Edited 2018-08-08 02:45)

I'm wondering if the tile-data or visual screen is reset between carts. If not ? rubbing hands wickedly

P#54845 2018-08-07 23:35 ( Edited 2018-08-08 03:36)

Pretty sure vram remains as it was.

P#54883 2018-08-09 00:45 ( Edited 2018-08-09 04:45)

Correct, 0x4300-0x7fff is not overwritten by load(), just as it isn't when you type the load() command at the command prompt.

My prior statement was about the cart ROM area and Lua RAM. load() overwrites 0x0000-0x42ff with the new cart ROM. It also exits the first cart's program and resets Lua RAM, i.e. it pops the previous global frame and creates a new one where it evaluates the new cart code (along with the standard Pico-8 pre- and postamble).

P#54890 2018-08-09 02:36 ( Edited 2018-08-09 06:37)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 07:33:10 | 0.006s | Q:15