nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
5.03k stars 488 forks source link

SURF the internet..? #311

Open codeartisticninja opened 7 years ago

codeartisticninja commented 7 years ago

Might it be possible to get surf to access websites other than just tic.computer..?

Not necessarily like a HTML-browser, but just basic directory browsing on websites that have TIC-80 carts on them..

That way we might be able to create own little TIC-80 internet :)

nesbox commented 7 years ago

hmm, yes it's possible if you implement some API on your side you can see how it looks here for example https://tic.computer/api?fn=dir&path=play/Games and I could add mounted folders list to the config

codeartisticninja commented 7 years ago

We might have to standardize the api a bit.. It would also be nice if it didn't require any server-side code, but could work with a simple static webserver..

Perhaps SURF could discover a TIC-80 compatible page by looking for something like

<link rel="tic-80" type="application/json" href="my_games.json"/>
darkhog commented 7 years ago

You mean, like a crawler? Nah, I think it'd better if it would just look for ticgames.json in the root of the site's directory in the same way browsers look for index.html if no specific file is provided in the url. That would make it even easier since you won't need to make custom html changes which may not be possible in your cms of choice, just plop a file with a specific name on the server.

codeartisticninja commented 7 years ago

Why not both..? It could start by looking for the <link rel="tic-80"> in the html, failing that it will look for tic80.json (or whatever) in the same directory..