Log In  


Cart #piconet_explorer-14 | 2024-03-31 | Embed ▽ | License: CC4-BY-NC-SA
47

HI! I thought it would be neat to have a little isolated version of the internet for the Picotron! This is a very rough start of what I think that might look like (I have no idea how web protocols or any of that stuff works). This is also serving as kind of a test, because I wrote a program to scan a BBS page for a certain word and add it to the browsing catalogue, and I haven't tested that just yet.

There's a few bugs here and there tho; I'm not sure how you're meant to sort the draw order in a GUI so things may float on top of the tabs when scrolling. Also I've noticed that the homepage of one of my demo pages occasionally causes the program to run out of memory. I'm pretty sure it has to do with the gif imitation thing, but I have no idea why that would cause that.
Edit: it may be that this memory issue is actually a picotron problem! I suppose I'll just wait for future versions. But if it's not and anyone has a way to fix, let me know!

Anyway (IT WORKS NOW!), to add a page to the browsing catalogue, you need to type a comment in this format, replacing the plus symbols with caret symbols:

+PICOSITE+ link + title + about +

Notice where the spaces are placed! this is actually important lol
an example:

^PICOSITE^ https://raw.githubusercontent.com/May0san/piconetdemo/main/home.lua ^ PicoNet Homepage ^ The homepage of the PicoNet! ^

Try to not make your "about" too long. I apologize in advance for the messy disorganized code lmao, I'll probably be working on it. If you want to download files, add a "downloads" folder to your system at the root level. If anyone wants to propose a better standard for this, feel free :)

As for writing the actual page, you can view my examples on this github repo:
https://github.com/May0san/piconetdemo/tree/main

EDIT: looks like it crashes on the webplayer so you may have to download the cart

Update: downloads will now create the downloads directory if it doesn't exist.

Features:
✅ visit and display hosted file with gui data (a "picosite")
✅ catalogue all the sites posted on this forum page into a browser list
✅ allows use of a "gif" which is really just an image with multiple sprites in one and is indexed with sspr to advance the animation. (subject to modification when sitebuilder is complete, will mostly still work the same though.)
☑️ create a "sitebuilder" site (and also corresponding cart) to graphically design and export websites as code
❌ sort the catalogue by newest by default
❌ allow tags on the listed sites
❌ extract from the forum page how many stars a reply has and use that to gauge and display that on the catalogue
❌ sort by popular, search by tags

47


2

ah bummer, the page scanning isn't working rn. hold on a moment and hopefully it will work soon. It definitely is able to access the online pages tho! so paste the link I put above in the url bar to see my demo page


4

That is an awesome idea! Now I want webrings of picotron creators making cute gif!


haha! thank you! hopefully I can get it working soon lol


1

Update! The browse is working! Feel free to add your own pages by posting a comment in the format like I described! don't worry if it goes over a page, I've got some ideas with how to deal with that :)

it also turns out the downloading is working, but you may need to first create a downloads folder in your system root

Uploaded a new version-- it should be less crashy as far as I'm aware (the web embed is still crashy tho)


1

This is amazing, great work!


3

If you can make a BBS viewer with download cart button for this that would be insane


2

This is awesome - excited to see where this might go. 👍

I had a similar concept years ago to use the PICO-8 "cartiverse" to make a mini internet (back around when remote cart loading was added to P8), where devs could have "home" cart (site) and link around.
Alas, the P8 resolution/resources didn't really make that feasible.
This however... might have some legs! 🤓


1

@Liquidream Oh that's sweet! It woulda been cool to see an internet thingy in pico-8! Yeah I think this program is inherently a lot more friendly to that sort of thing-- downloading webpages and getting web content and whatnot. The gui system is also super great for making standardization in web content and more generally, simplicity of making a page.


5

very nice! this gives me an idea about making a gemini protocol browser in Picotron. I believe most of the content is text or lightly marked up text.

here is a very nice example of a gemini browser

i'm sure something like that would be very involved and take a lot of time, but a simple reader should be easier..


1

Oh that's sweet! From what I understand after a quick skim, a system like that would be able to access and read from any Gemini-based Internet page? Again I don't really know anything about Web protocols.

For me it feels like a semi-isolated Internet where Picotron users create all the content is more true to the system... If that makes sense?

Idk, I'd be interested to hear thoughts about this; but if it's as simple a system as Wikipedia claims I'm sure it would not be too hard to make a viewer as you say. I don't think it's even currently natively possible to send data over the Web


1

Totally agree!! sorry I got sidetracked thinking of the possibilities :)


Ah it's no worries lol, I do think it would be a fun challenge!!!


If there's one thing I'd love to see though, it would be some kind of dumbed down chatroom-- it would probably require quite some investment; maybe installing something into picotron to handle sending data? idk


2

^PICOSITE^ https://raw.githubusercontent.com/May0san/piconetdemo/main/coolgifs.lua ^ GIFs ^ Come see a catalogue of gifs you may want to use! ^


2

I'm working on a sitebuilder! I've only got the very basics of it done now and elements can't be edited, but it can place/move elements and export the page as a site file. You can find the sitebuilder site on the browse page (click browse on the homepage). note though that the pod file import/export isn't working rn.

There's also a new version of the base browser with some small fixes


1

Little cute explorer
I really like the idea of PicoNet, tryna create my own lil site rn
Also found a bug:
palt() needs a bool value as second argument, so the alpha color of gifs doesn't work


thank you!!
i thought I fixed that bug! do you have the latest version?


Oh really, need to update


I just uploaded a small change to how gifs work in advance of the sitebuilder so that it's more compatible. the speed and alpha are now specified in the draw function, you no longer have to pass in the frame width and height to the new_gif function. additionally, the gifs now take raw pods (so if you're copying and pasting from the sprite editor, just remove the unpod() part)


looks like fetching a url no longer works in the newest version as far as I can tell (no idea if it's intentional or not), so this will stay in 0.1.0b for now


1

URL fetching still works, but it's asynchronous now, which means it won't work as expected unless you use it in a coroutine. A simple hack to make it work like it did before could work something like this:

local fetch_old = fetch
function fetch(url)
	local result
	local co = cocreate(function()
		result = fetch_old(url)
	end)
	repeat
		coresume(co)
	until costatus(co) == "dead"
	return result
end

This starts a coroutine to fetch the target URL and doesn't return until fetch is finished.
That said, maybe you want to do something else in the meantime, like show a buffering icon - in that case, you'd want to create the coroutine yourself and do one coresume on it per frame until it finishes (costatus(co) == "dead"). Asynchronous flow is probably less important for a minimalist web browser though, so it's up to you how far you want to go on this aspect.


@Ulhar Thanks for the tip!! I had someone else mention this but I didn't really know how coroutines work in lua, so the code snippet really helps :D I'll be putting a pause on the pagebuilder and workin on fixing all this next


yay! piconet explorer works for the latest picotron version! I may do some kind of loading bar, maybe an hourglass icon for the mouse (hehe) in the future but I wanna get the sitebuilder out and done first


1

The sitebuilder is up!! should have enough functionality to make a site, but it does have its quirks... not to mention its code which I almost definitely could have generalized and finished way sooner, but I just pushed through (im still learning ok ;o;)

note:
It would be wise if you saved your site as a .pod frequently as you work because I've had picotron run out of memory a lot on me while I used PicoNet Explorer. Idk what causes it exactly (as far as I can tell it's kinda weird and inconsistent) but lmk if you know how I can fix that lol


1

Maybe add some kind of autosave? Store a file somewhere after every change or every minute etc


1

Little suggestion:
You may add

addressbar.key_callback={enter=function() notify("enter pressed") end}

to the address bar to load a page using enter instead of manually clicking "go"


@Feyn Autosave is a great idea! and also that code snipped is super helpful, I was wondering if there was a way to do that!


1

@Maeve I did some research and found that creating new userdata every frame in piconetutil.lua > function load_page > return> draw > local bmp causes memory leak after several minutes of rendering page, cuz I think this userdata doesn't have enough time to be deleted, so you should reduce userdata creation.
I made a small fix that uses the same userdata until size of the page changes and seems like it helps


1

@Feyn Oh, thank you so much for the tip!! I was wondering where that was coming from! That's also really good to know for the future. I'll try to fix that, and there were a few other changes I was wanting to make too. To be honest I'm sure there's another memory leak somewhere else but it's good to plug at least one hole lol.


1

ok, I think I vaguely know the source of the problem causing buttons to appear over the top of the tab section, but I think it'll take me a while to figure that out, so in the meantime, here's an update with a back/fwd button, enter now visits the link in the address, and also I made the userdata not recreate itself each frame. Thanks @Feyn for the help and tips!!!!


2

Updated it to work a bit better with the newest version (changes in palt apparently messed it up)

Also changed the "download" function to automatically get the name of the download if no name is provided instead of downloading it as "untitled.pod" (lol)

made some fixes to the sitebuilder lua exporter, there were some things that were causing it to be syntactically incorrect. You may have to take a peek at the lua file and double check that it doesn't have any big issues. If you can't figure it out and the browser is still saying it can't load, then feel free to send me a link to the site page and I can try and find what's causing it to fail :)

also, here's a new site I made for fun!

^PICOSITE^ https://raw.githubusercontent.com/May0san/piconetdemo/main/meivuusite.lua ^ Meivuu's Site ^ A site where I'll post some stuff I've made :) ^


3

I made a picosite! Really wish there was a way to have nicer URLs in the browser.

^PICOSITE^ https://raw.githubusercontent.com/PixelDud/picosite/main/index.lua ^ PixelDud's Site ^ My little corner of the PicoNet. ^


1

That's amazing ! Good job !


3

Finally made my own picosite :O

^PICOSITE^ https://raw.githubusercontent.com/FrndlyFox/picosite/main/home.lua ^ Feyn's home ^ My first picosite with some text about me :D ^


1

I love the sites!! It makes me happy people are using this :))

@PixelDud nicer urls is a great idea! The full github url is excessively long, I agree. I think what I'll try and do is set up a custom url/domain system where you can provide the actual url under which all your subpages appear and the browser will substitute your custom url. It may be some time before I get to work on this tho


1

I’m hoping to learn more lua so I can make my own “Picosite” too!


1

@Maeve I’ve discovered that ”nekoweb” can easily host lua files with no problem :3


2

^PICOSITE^ https://widgetotaku.nekoweb.org/home.lua ^ WidgetOtaku's site ^ My first picosite on NekoWeb X3 ^


toki pona?????????????????


2

^PICOSITE^ https://raw.githubusercontent.com/dualmeower/Test-Picosite/main/test.lua ^ Test Site ^ This website tests every feature on PicoNet ^


2

^PICOSITE^ https://raw.githubusercontent.com/bouncyblock/firstpicosite/main/bouncy_blockssite.lua ^ Bouncy's Alcove ^ The location where all roads meet ^


Nice sites everyone!! Looks like I'm gonna have to upgrade mine soon lol!

@Bouncy_block on your page there's a link that directs to itch.io. Unfortunately, piconet explorer can't display typical internet webpages like itch.io, so I recommend setting the button code to direct to another page you make that has info about the jam, or make it set the clipboard to the webpage link (I also recommend using the notify([message]) function to tell the user that it has been added to clipboard or something) lmk if you want example code or something ^^


1

Ok, thanks! I'll change it! (thanks for making a sitebuilder. its awesome). Just wondering though, (haven't used the sitebuilder enough) how would I go about copying the link to clipboard?


yeah! in the code section while editing the button, you can put
set_clipboard([link as a string])


1

1

^PICOSITE^ https://raw.githubusercontent.com/dualmeower/My-Picosites/main/zoot.lua ^ It's Zoot! ^ Look at this little guy!^


1

^PICOSITE^ https://raw.githubusercontent.com/dualmeower/My-Picosites/main/pico.lua ^ Pico Industries ^ The official website of Pico Industries ^


1

This project is so cute I can't wait to see the PicoNet grow!

^PICOSITE^ https://raw.githubusercontent.com/caar292/pppicosite/refs/heads/main/pottedplantsplace.lua ^ Pottedplant's Place ^ Hi PicoNet! ^



[Please log in to post a comment]