Log In  


Cart #stripper-1 | 2022-10-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

(v01 10-03-22)

TO LOAD THIS PICO-8 CART, in immediate mode, type: load #stripper

Hello.

In lieu of this post:

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

I have since written a utility to remove all extraneous spaces in your source-code.

NOTE: This program works online as well as offline.

To use it, either run it and read the directions or press a key to continue.

From there press ALT-TAB to choose the Windows task that has the Pico-8 code you want to fix.

Press CTRL+A and CTRL+C to highlight and copy it all to the clipboard.

Press CTRL+V back in my program.

It will be pasted and examined. Any leading spaces on your code will be tallied and truncated.

If you are running this online, don't forget to press CTRL+C.

Once that is done, return to your highlighted program and if you are using the puny font anywhere in your code, go to press CTRL+P now. Then press CTRL+V. Then press CTRL+P again.

If you are not using the puny font, just press CTRL+V only.

And there you have it !

Neatly truncated code without invisible spaces eating up the 64k of your program !

For instance, I checked my game "Mildew Manor" and found it had 33-empty spaces in the code. Truncated and saved back now.

HOPE THIS HELPS !

2


This is so cool, but can't find it when I type it into google. I just get a lot of... interesting pictures.


@marinamakes: Nono. Don't use Google. Everything to trim your code is right here.

I named it after an old Apple ][ handheld device called, "The Stripper" which would scan vertical lines from print in Apple ][ magazines and convert them to code. It actually went by many names:

It was lots of fun to read these strips and play tiny games.

And yes this was before I saw bar-code scanners in grocery stores.


I wanted to add if you want to see this process take place in your code, before you press CTRL+V, click the bottom right number that shows 8192

That will change from 8192 to 65535 where the number to the left of that is how many characters are in your code.

With your code still highlighted, look at the # of characters, it could be 13321 for instance.

Then press CTRL+V and watch the number go down ! In my case it went to 13314, proof that the extraneous spaces in your code have indeed been removed.

To return your editor to view tokens instead of characters, click on the 65535 and then the number with a % percentage and you'll be back to viewing token count again.


i have more lags with this project but dw12 you an help me create save and load system please


Hi @Dobroposter.

Can you please post an example of this ? I will be glad to help if I can.



[Please log in to post a comment]