Log In  

Hi there all!
I'm fairly new to the engine, and for now, i just have one question, that could be helpful for me.
Is it possible, to export an .html file, in which your games are exported like in the BSS section, only multiple of them. If i'm not clear, i'm looking for a vertical column of playable games in one .html file sou you can just press the play button and play. Is it possible? How can someone do it?
My main goal is to set up my github page in a way, that you can play all the pushed games in the repo. Not necessarily automated, little hand editing is fine with me.
Thanks in advance!

P#58968 2018-11-12 15:56 ( Edited 2018-11-13 03:52)

You want to play them all simultaneously? That's not going to be possible. They can't all have focus at the same time. Unless you only want to use mouse input? That might be possible. Just try, export them all separately, and edit the HTML file to include several JS files?

P#58969 2018-11-12 16:47 ( Edited 2018-11-12 21:47)

Assuming that, you want to be able to click into one and play it, then click into another and play it, etc etc-- yes, this is possible. Here's a quick and dirty hack:

  • Export each of your carts to html. Choose one to be the master page.
  • Add an "iframe" for each game near the top of the body, just inside the line that says "<center><div style="width:512px;">".

So it'll look something like:

<center><div style="width:512px;">
    <iframe src="game1.html" height="512" width="512" style="border:none"></iframe> 
    <iframe src="game2.html" height="512" width="512" style="border:none"></iframe> 
<!-- continue until out of games -->
    <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>

(Results not guaranteed, I only poked at this for a couple minutes. There may be a cleaner way but one was not immediately apparent.)
(Also OH BOY THE SOUND when they all boot up at once)

P#58974 2018-11-12 22:52 ( Edited 2018-11-13 03:52)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 21:06:23 | 0.005s | Q:10