Log In  

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

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:

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.

✅ 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

P#144017 2024-03-21 08:16 ( Edited 2024-03-31 05:55)

P#144018 2024-03-21 08:17 ( Edited 2024-04-03 02:53)

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

P#144019 2024-03-21 08:23

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

P#144020 2024-03-21 08:34

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

P#144021 2024-03-21 08:55

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)

P#144024 2024-03-21 10:48 ( Edited 2024-03-21 11:48)

This is amazing, great work!

P#144030 2024-03-21 12:04

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

P#144040 2024-03-21 13:40

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! 🤓

P#144060 2024-03-21 18:07

@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.

P#144062 2024-03-21 18:17

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..

P#144068 2024-03-21 19:14 ( Edited 2024-03-21 19:16)

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

P#144073 2024-03-21 20:07

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

P#144075 2024-03-21 20:39

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

P#144076 2024-03-21 20:48

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

P#144079 2024-03-21 20:54

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

P#144094 2024-03-21 23:57 ( Edited 2024-03-31 04:26)

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

P#144202 2024-03-23 09:58 ( Edited 2024-03-23 10:00)

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

P#144254 2024-03-24 00:07

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

P#144256 2024-03-24 00:31 ( Edited 2024-03-24 00:33)

Oh really, need to update

P#144261 2024-03-24 01:15

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)

P#144330 2024-03-24 21:44

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

P#144335 2024-03-24 22:17

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)
    until costatus(co) == "dead"
    return result

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.

P#144359 2024-03-25 02:45

@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

P#144367 2024-03-25 03:40

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

P#144382 2024-03-25 06:05

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;)

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

P#144501 2024-03-26 05:47 ( Edited 2024-03-26 06:43)

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

P#144502 2024-03-26 08:06 ( Edited 2024-03-26 21:16)

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"

P#144554 2024-03-26 17:23

@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!

P#144562 2024-03-26 18:25

@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

P#144976 2024-03-29 13:38 ( Edited 2024-03-29 13:45)

@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.

P#144996 2024-03-29 16:10

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!!!!

P#145059 2024-03-29 23:58

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 :) ^

P#145216 2024-03-31 06:03

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. ^

P#145342 2024-04-01 06:35

That's amazing ! Good job !

P#145448 2024-04-02 09:20

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 ^

P#145461 2024-04-02 11:21 ( Edited 2024-04-02 13:44)

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

P#145506 2024-04-02 18:07

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

P#145514 2024-04-02 19:35

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

P#145696 2024-04-04 17:22

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

P#145717 2024-04-04 21:23 ( Edited 2024-04-05 09:33)

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

P#145797 2024-04-05 13:51

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

P#145833 2024-04-05 20:09

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

P#146087 2024-04-08 16:54 ( Edited 2024-04-09 18:51)

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 ^^

P#146104 2024-04-08 21:18

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?

P#146149 2024-04-09 10:57 ( Edited 2024-04-09 11:00)

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

P#146178 2024-04-09 16:50 ( Edited 2024-04-09 16:54)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-15 12:20:33 | 0.112s | Q:74