0 Favourites

HTML5 Game to EXE

  • Hello,

    just for curiosity I've realize in Visual Studio a litte wrapper for the HTML5 game produced by Construct 2.

    It's a single .EXE file: launch it and the game starts.

    It's a wrapper, so it contains a Construct2 game (you have to move a cat jumping to evitate some obstacles) and the wrapper that loads the game inside a window (using the Internet Explorer engine).

    If you want to try it and leave me some impression, I thank you all.

    It's downloadable here: http://www.progettistart.it/Construct2%20-%20Sample%20game%20html5%20to%20EXE.zip

    Bye,

    Steven

    <img src="http://progettistart.it/SampleGame.jpg" border="0">

  • Great! Thanks for this <img src="smileys/smiley1.gif" border="0" align="middle" />.

    How does it work? Does it still use the web browser?

  • In my machine an error occurred, and apparently was because my ie does not support html5 (maybe 'cause this outdated, Since I do not use ie) :P

  • That's amazing! o_o HOW ?!

  • Hi all,

    there is'n any magic or extraordinary code behind the EXE

    <img src="smileys/smiley2.gif" border="0" align="middle" />

    In Visual Studio I have simply created a window filled with a "Web Browser" component. This is a standard component in the Visual Studio tools and it's just integrated on any version of Windows OS (so you have no need to download / install something).

    The "Web Browser" component is an interface of Internet Explorer, so it's functionality depends from the installed version of Internet Explorer. For this reason, if you have IE 8, the EXE / the game will not work because version 8 doesn't support HTML5.

    The EXE I have distributed is a ZIP file containing:

    • the game files, exported from Construct with HTML5 exporter
    • the EXE I've created with Visual Studio that execute the game (it loads the index.html file)

    When you click the distributed EXE, all files are extracted in the temporary folder and automatically the "EXE launcher" is executed to start the game.

    It's just an experiment to see if it's possible to wrap a Construct HTML5 game for distributing it in EXE format. I've seen in other posts that someone wanted for it. I think actually this is the only way to "convert" an HTML5 game to EXE. A real conversion without a web component I don't know if it's possible or maybe a few complex, considering that the HTML5 guide lines are not definitive.

    Thanx,

    Steven

  • This will require the user installs IE9 before it works, and only about 10% of people have it installed at the moment, and also means the games can never work on XP since you can't get IE9 there. It's something I looked in to before but I thought the limitations made it impractical for real distribution.

  • I'm also a bit curious, for Visual Studio, will it only use IE? Or can it use other browsers like Firefox or Chrome? I wonder if another programming software can do the same thing but not limited to IE.

  • I'm also a bit curious, for Visual Studio, will it only use IE? Or can it use other browsers like Firefox or Chrome? I wonder if another programming software can do the same thing but not limited to IE.

    You can with visual studio, you just have to import a webkit/gecko implementation (usually a dll).

  • This will require the user installs IE9 before it works, and only about 10% of people have it installed at the moment, and also means the games can never work on XP since you can't get IE9 there. It's something I looked in to before but I thought the limitations made it impractical for real distribution.

    Are you guys working into a solution to export the projects to .exe ? Or is the Construct2 entirelly aimed to HTML5 development and will therefore not aim the creation of Aplications for Desktop (.exe and stuff)? Sorry to ask, I believe you already had to answer this a thousand times... ><

  • LemonDROP we're very much aware of the answer for an EXE exporter but you know, if there's a little workaround, people would want to look at it and see if it works :P

    From the screenshot in the first post, although there's tons of limitations, it somehow kinda works. So I guess people who wants the EXE exporter would want to try that.

    EDIT: Sorry, read your post the wrong way, C2 currently focuses on HTML5, there is a possibility that EXE will come next but we can't tell as of now since Ashley hasn't really completed all features of C2.

  • Hello,

    the HTML5 wrapper I've proposed has a big limit (as Ashley says): it requires that IE9 is installed, with all the conseguences.

    0plus1 has said a right thing: I can try to use webkit/gecko/other engine (Firefox / Safari / Chrome, ecc.). In this case there are some things that need a test:

    • can the engine be used without the Browser installed?
    • can the engine be used directly without to ask the user to install something?
    • can the engine be used in any Windows OS version?
    • does the engine fully support HTML5 and, particularly, all the Construct 2 games features?

    The best thing is to execute a real export of the Construct project to EXE, a kind of compatibility between Construc2 project and Construct classic project, but obviously this isn't my competence...

    Thanx for the replies,

    Steven

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Hello,

    I've tried to create a new wrapper using WebKit, following the suggestion of 0plus1. This the EXE:

    http://progettistart.it/CatGame_webKit.zip

    I've tested the EXE in a PC with a fresh installation of Windows 7, without any installed browser (except IE 8).

    Now:

    1) the EXE works independently from the installed browser. It uses the dlls of the WebKit engine

    2) the game starts quickly respect the IE version of the wrapper

    3) the EXE file weight is greater than the IE version, because it contains about 11Mb of engine files

    I don't know if it's work in other Windows OS versions and with a more complex Construct 2 games.

    Steven

  • Very very good! Can you share the source code? So that we can start to work on it collaboratively..

    If it's not a problem!

    EDIT: Did you use this webkitdotnet.sourceforge.net/index.php

  • Sounds pretty exciting to me.

    If anyone can actually accomplish this they will have the thanks of the whole c2 community - and should also recieve a legendary forum badge ;)

  • I've already investigated other WebKit-based wrappers like Adobe Air. However, features like GPU-accelerated canvas 2D and WebGL (and maybe audio, can't remember) are in the browser layer - you don't get them with WebKit. So it's really slow - and although that's a really cool tech demo you can see a bit of lag even in that simple game.

    Awesomium just released 1.7 with WebGL support. That's definitely worth checking out - it's based on a full browser engine, not just WebKit.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
763 305,650
asikanddestroy's avatar
asikanddestroy
Unread hot topic
232 177,673
Tetriser's avatar
Tetriser
Unread hot topic
126 15,928
Nathanial's avatar
Nathanial