Log In  


[128x128]

Hello.

One of the limitations of Pico-8's educational edition is that you cannot import or export sprites. So - making use and only making use of the system itself, I show how you can actually do so.

First off, if you do not have Pico-8 yet, you can either purchase it HERE:

https://www.lexaloffle.com/pico-8.php

Or get more information and make full use of the educational edition, HERE:

https://www.lexaloffle.com/bbs/?tid=47278

Now the primary restriction to the educational edition is the lack of SPLORE, which is well-worth the cost of the system ($15) in all cases. You just boot up Pico-8. Type out SPLORE followed by the ENTER key and you have a wonderful frontend for all the gaming carts written in Pico-8 - sorted by popularity, how new they are, and you can search for carts by key words and names such as "star trek."

The other is using the IMPORT and EXPORT command, also disabled. Yet importing and exporting sprites for the educational edition of Pico-8 is the focus of this topic - it can be done after all - and it does not require outside code.

To load any Pico-8 cart in the educational edition from the website Lexaloffle, type in immediate mode, load # include that pound sign, and the name of it, for instance, see the frame here:

Notice to where the arrow is pointing. Here is an enlargement of that area:

So the name of this cart is "dialog." Do not include the minus "-" or any text after that.

To load this in the educational edition of Pico-8, type in immediate mode, load #dialog followed by ENTER.

And now you have some sprites to experiment with !

Either use this cart or any cart that has sprites you'd like to test - to see how to save off as a PNG file.

To save off these sprites to a PNG file, remove the code. You can do this in the code editor by pressing CTRL+A and the BACKSPACE key. Then type the following:

memcpy(24576,0,8192)
extcmd"screen"

Run this with CTRL+R.

This will create a saved image as seen as a small square to the right of your programming frame. In there, RIGHT-CLICK your MOUSE and choose "Save image as ..." to save off this spritesheet as a 128x128 pixeled PNG file.

To recover the original source code, back in the code editor press CTRL+Z until the original code reappears highlighted, then press any arrow key to remove the highlight and the code is back.

Be aware there is no easy way to IMPORT a PNG file to Pico-8 educational edition, yet you can transfer graphics between these carts, read on.

You should also know that you can have more than one educational Pico-8 frame open at a time yet they DO NOT share files. You can see this by working in one frame, type in immediate mode either DIR or LS followed by ENTER and see the files you work on do not appear in both frames.

So always save your files to your HD, you can easily do this by typing in immediate mode: save test or whatever filename you want, folowed by the ENTER key.

To load a file you have saved on your hard-drive, type out: load withou anything else followed by the ENTER key and a filebox will come up letting you load that cart from your hard-drive.

Now to transfer graphics between one cart and the next, first off click in the red bar above the icon that looks a little like a demon.

You will get this screen:

Press CTRL+G to add grid and there you go. Here is where all your graphics go. I'll draw a few and return. Draw some yourself if you like.

[32x8]

OK we have 4-sprites. To transfer these to another Pico-8 educational edition tab that is open, to start left-click on the first sprite, the "1" Now holding down the SHIFT KEY drag the mouse to the right until all 4 are highlighted, then release the shift key. It should look like this:

Still maintaining the highlight on these 4-sprites. Press CTRL+C to copy that to the clipboard.

Now go to your OTHER Pico-8 educational edition frame, go to the spritesheet where you want to paste these 4-sprites, IE here:

Now right where the cursor is, press CTRL+V. You will see your 4-sprites posted.

Use this method to save your sprites from one Pico-8 educational edition cartridge to another.

Now if you want to post some sprites in Lexaloffle, still having your clipboard with those 4-images, you can anywhere in your message also press CTRL+V. It will appear as such:

[gf×]20080000000000000000000000000000000000888000099999900aaaaaa00bb00000000880000900099000000
aa00bb00bb00008800000000990000aaaa00bb00bb0000880000999999000000aa00bbbbbb000088000099000000a0
00aa000000bb000888800099999900aaaaaa000000bb000000000000000000000000000000000[/gf×]

But when you PREVIEW or POST, it will appear as such:

[32x8]

If you want to save these graphics for later, you can also save them in NOTEPAD or really any normal text editor. Just paste them and maybe put a label above what the sprite is supposed to be.

When you are ready to use this image in your code, highlight all of it minus your notes telling you what it is, and in your sprite sheet, press CTRL+V. It will paste the correct image accordingly.

OK !

Now you know how to import and export graphics between the educational edition of Pico-8 ! :)

If you found this helpful or have further questions, please let me know.

Thanks !

5


This can be a valuable workaround for those who don't have access to the SPLORE feature in the educational edition. It's great that you're sharing this information to help others make the most out of their Pico-8 experience. I am always looking for resources to study, I recently wrote dissertation in college I used this resource to help. It's a good practice to encourage feedback and engagement. Overall, it looks like a well-thought-out and informative guide.



[Please log in to post a comment]