Log In  

I have never really liked to write code in BlitzMAX despite the fact it can work with a screen of 1980x1080 with true 64-million color pixels for a very simple reason. It takes time to compile the code and test it.

About 5-seconds to be precise, and that includes finding errors, even for a 2-line program.

My programming style if you are curious is a little like a rabid rabbit. It's like I take a cracker, nibble on it, look at it, nibble on it, look at it again, and nibble a little bit more.

That is - I write a bit of code, run it, add a bit more, run it again, then add a bit more.

My Dad was the opposite in that he could sit down and write a flawless program from beginning to end and NEVER have to run it once until he knew it was completely done. I can't do that.

So ... Pico-8 is a bit of my friend now for as you know when you RUN or press CTRL+R the language is already off like a shot and running.

Therefore I decided I could use it to write my Pico-8 website of favorite games.

And indeed I did.

https://dw-817-blog.tumblr.com/

All I'm doing is taking my text data file of:

# of stars
author's name
name of cart
description of cart
Actual cart ID name
Website where cart appears

Have a blank line separate, and then give the data for my next favorite cart if there is one, run my program, and the HTML to show what you saw above is saved and written.

So I wrote a program in PICO to read that text data and create a HTML file that has a neat and ordered table appear with the graphic cartridge and if you hover over any of them, you will get the number of stars, name, description, and author.

I even wrote it so it sorts all the data from highest number of stars to then on down so I don't have to do it myself manually. I could make it alphabetically sorted if someone feels slighted. :)

Here then is the program:

Cart #muzikufawu-0 | 2019-09-16 | Code ▽ | Embed ▽ | No License
3

Naturally it will not work in the BBS and is expecting a text file called, "list.txt" which has data as I described above. You need to LOAD this in immediate mode in PICO as follows:

load #muzikufawu

Here is a sample of the data to see what it is reading when it writes back, "web.htm"

list=[[

41
Alfonzo's Bowling Challenge
kittenm4ster
Not your average bowling game.
abc-0
https://www.lexaloffle.com/bbs/?pid=66371

12
Jack Of Spades
BoneVolt
Turn-based RPG using playing cards.
jostitle-5
https://www.lexaloffle.com/bbs/?pid=65294

]]

You must have your data appear exactly like this. "list=[[" two open brackets, blank line, the cart info, another blank line, and two ending "]]"

Once your TEXT data is complete, save it.
Bring up NOTEPAD++ if you don't already have it open.

Open that TEXT data in there if you haven't yet done so.
Select from the menu, View, Show Symbol, Show All Characters.

If you see CRLF inverted then select from the menu, Edit, EOL Conversion, UNIX/OSX Format.

Then you should see only LF inverted which is the correct carriage return for PICO-8. CTRL+S to save.

Now, run my program. You can set DEBUG=1 to see each and every cart as it is processed. DEBUG=0 will just blur through everything and compile it quickly.

In your filer, delete "web.htm" if it exists. Rename "web.htm.p8l" to "web.htm"

Open "web.htm" in Notepad++ if you haven't yet done so. If you have and it's different from what the engine just created, you'll get a notice that the file has been modified and would you like to reload it ? Select YES.

Check the appearance. If the title's first character appears like this, ⭐150â then in the menu select, Encoding, Encode In UTF-8 Without Bom.

Then all the special characters will change to their designated icons. ⭐ and 🎮

Bring up your free website. If you can't think of any may I suggest TUMBLR ... or do you know of a good free site to build your website in ? Tumblr is 100% free and allows true HTML paste - which is what we need here.

In your "web.htm" tab in Notepad++ press CTRL+A to select everything there. Then CTRL+C to copy it to the clipboard.

Then in your internet browser in the area where you can type raw HTML for your custom website, press CTRL+V to paste the contents of web.htm directly there.

Save it, view it, enjoy it. :)

Please let me know if you do decide to use my code to build your own website or to assist you in this endeavor, I'd be curious to see it !

Once again, comments, questions, or kerosene. Let me know what you think !

P#67770 2019-09-16 20:30 ( Edited 2019-09-17 01:30)

wait, does that mean you just quite possibly made a web browser for PICO-8? Or did I miss read you

P#67777 2019-09-16 22:01
:: dw817

Hi Scrub.

No, the program I wrote BUILDS a webpage (like you see above). You must provide your own free internet server. As for me, I like TUMBLR because they allow you to post raw HTML for free.

That's getting to be a hard thing to find where a price-tag isn't usually attached.

My program takes a list of carts from a text file (as you see above) and converts it to a .HTM webpage that you can then upload to your server of choice.

It's still pretty unique in that aside from doing all the groundwork for the HTML table, layout, and hover-text, it also sorts the carts in the visual table according to highest stars first.

The best browser you're ever going to find for PICO-8 will be bringing up the system and typing in immediate mode the letter s followed by the ENTER key.

The best website you'll find for PICO-8 ? I think we're on it. :)

P#67778 2019-09-16 22:08 ( Edited 2019-09-16 22:11)

Well now I know of a quicker way to the splore! =]

P#67779 2019-09-16 22:15
:: dw817

Always something to learn, Scrub. Glad to help.

P#67780 2019-09-16 22:19

well done, it's a clever use of pico-8 ;)

P#67792 2019-09-17 09:05
:: dw817

Thanks, Farvardin !

Here's hoping future Pico-8 lets you load, save, and maintain normal text files.

READTEXT(filename,string)
SAVETEXT(filename,string)
RENAME(filename1,filename2)
DELETE(filename)

In all cases, extension must be ".txt" for safety and security.

P#67808 2019-09-17 17:08

awww man! I wanted a pico-8 virus that swaps your operating system with Pico-8 :p

P#67828 2019-09-17 21:15
1

"As for me, I like TUMBLR because they allow you to post raw HTML for free."

GitHub is also useful for that, you can just make a repository and host it with GitHub Pages. (If you don't know how to use Git, I'd suggest using GitHub Desktop or VS Code) The only con is that your source code must be public.

P#67839 2019-09-18 04:27
2

I usually use neocities for my closed source projects. It's completely free unless you want a custom domain or a little extra storage.

P#67870 2019-09-18 19:49

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-10-23 11:14 | 0.023s | 2097k | Q:46