Log In  

So you can put your pico-8 games on your own site/dropbox/whatever. Ability to make standalone export (pico-8 with embedded game that launches after you click exe) would also be great.

P#13333 2015-08-30 17:21 ( Edited 2015-09-21 21:45)

:: matt

Would iframe share functionality work? like YouTube offers

P#13379 2015-08-31 04:59 ( Edited 2015-08-31 08:59)

It still would depend on Lexaloffe's servers to be up, but it'd be a good start, sure.

P#13383 2015-08-31 08:34 ( Edited 2015-08-31 12:34)

+1, I love pico-8 but not being able to upload my games to my own server is a bit disappointing :(

@matt TBH I'd like to be able to distribute a playable version of my games without relying on 3rd party servers.

P#13391 2015-08-31 12:01 ( Edited 2015-08-31 16:01)
:: alexr

+1 for this and 100% agreeing with @ladybenko: no 3rd party servers please.

P#13396 2015-08-31 12:49 ( Edited 2015-08-31 16:49)

How about this: Zep could make simplified version of current webplayer that autoplays, don't have that close button at the top, basically just canvas and it would always read file named webgame.p8.png as a cart. Aside of small changes I've mentioned, it'll just behave like regular Pico webplayer and would be bundled with the software in self-contained html file that can then be put on your server and into iframe

P#13402 2015-08-31 13:10 ( Edited 2015-08-31 17:10)
:: alexr

Why would an iframe be necessary?

P#13403 2015-08-31 13:13 ( Edited 2015-08-31 17:13)
:: alexr

I think I see. You're saying that an iframe on our html would have its src attribute set to the path of your self-contained html file?

P#13404 2015-08-31 13:16 ( Edited 2015-08-31 17:16)

I don't think we need an iframe. We just need a JS file that can play a game if provided a canvas element and the cart.

It would also be nice if we could configure parameters such as key mapping for this webplayer.

P#13406 2015-08-31 13:17 ( Edited 2015-08-31 17:17)
:: matt

Yeah I think it's iframe if lexaloffle want to host everything, or just access to a hosted the JS file if we want to self host the canvas.

P#13411 2015-08-31 15:51 ( Edited 2015-08-31 19:51)
:: alexr

@lexaloffle might be the first person to regret such -- hosting everything -- a requirement. The current setup detracts from the appeal of pico-8, IMO. And if despite that it still becomes popular, server costs will increase sooner or later. Compensating for that by charging the users would not be popular, I suspect.

P#13413 2015-08-31 16:10 ( Edited 2015-08-31 20:10)
:: alexr

Also, what if someone wants to create a standalone, raspberry-pi+linux based, game console using the pico-8 as its core engine? Solving this issue (locally hosted engine) would bring this idea one step closer to reality. Not solving it voids the idea outright.

P#13414 2015-08-31 16:14 ( Edited 2015-08-31 20:14)
:: azlen

It is certainly possible currently to put a pico-8 game on your own site/server.

I made something similar to this, at https://pico8.herokuapp.com/

And you can even embed it with this code on a website (replace the 5 zeros with the number of your cartridge)

<iframe src="https://pico8.herokuapp.com/?00000" style="width:580px;height:540px;border:none"></iframe>

The code behind this could also be repurposed to run anywhere and load cartridges without depending on lexaloffle or any other server (other than your own site/server).

With something like this there is also a lot of room for customization. I was playing around recently with CSS + SVG effects with the canvas and it produced very interesting results. I also added mobile support (which is currently up and running at the link I provided), if you load the link on a phone it should add some buttons which let you interact with the game (for best experience you might need to add the link to your home screen, this way it can remove the browser chrome/GUI).

P#13450 2015-08-31 22:32 ( Edited 2015-09-01 02:32)
:: alexr

Thanks for the tips. Will test it at once.

P#13451 2015-08-31 22:35 ( Edited 2015-09-01 02:35)

@azlen where did you get pico.js from? Are we legally allowed to include it in our own servers? If so, it would be nice of zep to do a formal statement about that file, so we can use it without fear of copyright infringement.

P#13560 2015-09-02 12:53 ( Edited 2015-09-02 16:53)

Oh man azlen that is awesome!
I just tired it on my phone and it runs great!

It would be cool if you could package that into an app with a cartridge downloader/selecter.

P#13570 2015-09-02 14:03 ( Edited 2015-09-02 18:03)
:: azlen

@ladybenko I found pico.js here, most of the code there looks like it's for emscripten, the actual code for pico seems to be hidden behind a wall of numbers (which seem to almost correlate with keyCodes). It definitely would be nice for zep to say something about the file.

@UrbanMonk, packaging this into an app could be really cool and not very hard (there's tools like PhoneGap). I wonder what zep's thoughts are about a mobile pico app.

I'm sure @zep will respond to these questions in due time

P#13574 2015-09-02 14:52 ( Edited 2015-09-02 18:52)
:: AfBu

If you look into html&js code of player on bbs you can quite easily figure out how web player is loaded, then you can extract it and add to your own server.

pico8.js contain a method called "gd" which handles input, so you can call it like this to simulate key presses:

/*
kc = 90; // z
kc = 88; // x
kc = 37; // left
kc = 39; // right
kc = 38; // up
kc = 40; // down
*/

gd( { type: 'keydown', keyCode: kc } );
gd( { type: 'keyup', keyCode: kc } );

Sure it will be better if we would be given official way to embed js player, but I assume it's not done because it's still in pretty early state of development a lot of things will change over time.

P#13579 2015-09-02 17:11 ( Edited 2015-09-02 21:11)
:: AfBu

Ok, for all you guys wanting easy and customisable way to embed your games on your websites, I have created simple wrapper that you can use on your own server in the meantime the pico is still being developed and don't have official embedding api. There is tutorial and two examples in the repo on github:

https://github.com/AfBu/PicoLoader

Advanced Example Live

With this wrapper playing your games on your site is as easy as calling "LoadPico('container','cart.p8.png');"

P#13588 2015-09-02 20:59 ( Edited 2015-09-03 01:06)
:: matt

Very cool work everybody.

P#13605 2015-09-03 06:01 ( Edited 2015-09-03 10:01)
:: impbox

very nice AfBu!!

P#13606 2015-09-03 06:22 ( Edited 2015-09-03 10:22)

This is looking good but I have an issue: I am trying to get a local server to run AfBu's PicoLoader on my Android phone to play others'/my p8s during my commute and offline... almost there, the current advanced.html example uses mouseup/mousedown events which are ignored on touchscreens, so I've replaced with touchstart/touchend but this is a bit hit and miss (sometimes works, sometimes doesn't for a given key). I don't know if this is due to response time or just my bad js, but any help would be appreciated. I will try a few more times before hoping that Zep will just give us something awesome (as usual).

P#14273 2015-09-16 20:00 ( Edited 2015-09-17 00:00)

I agree that an official release of the web player would be really fun to play with.

This is a real hack but here's the current web player integrated with three.js. You can rotate the camera around by dragging the mouse, scroll-wheel to zoom.

http://labs.benpurdy.com/pico8webgl/

P#14293 2015-09-17 03:06 ( Edited 2015-09-17 07:10)
:: gizmo

purdybot: just WOW! \o/

P#14295 2015-09-17 06:37 ( Edited 2015-09-17 10:37)

Really cool. Could you release it as sources and a way to change cabinet graphics (textures)?

Also similar thing, but in "home" environment (couch, crt tv, and top loading Pico-8 with cartridge of a game sticking out) would be swell too!

P#14359 2015-09-19 12:28 ( Edited 2015-09-19 16:28)

Yes! That is exactly what I was thinking.

My idea is that there could be a small bit of javascript that would expose the game screen as a three.js material which could be applied to any object in the scene, and expose a way to associate light sources with the actual screen content (as is the case in that demo).

Similarly you could have objects with specific morph targets or position/orientation values for objects like buttons and joysticks which would also be automatically updated to match the pico8 button states.

With something like this, the scenes could just be swapped out for whatever environment you'd like (arcade, living room, etc). Also three.js is pretty easy to use with VR headsets... :)

P#14464 2015-09-21 14:01 ( Edited 2015-09-21 18:01)
:: Ivoah
P#14470 2015-09-21 17:45 ( Edited 2015-09-21 21:45)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-12-02 00:27 | 0.042s | 4194k | Q:68