How do I run a HTML5 game completely offline, no web server?

Get help using Construct 2

Post » Mon Jan 19, 2015 9:21 am

Is it possible to run the game completely offline, say from a USB drive? On both PC and Mobile? It has to be HTML5, not a native app.

I know you can't do this directly, but can I modify the exported .js or something to make it work?

Thanks.
B
5
S
1
Posts: 14
Reputation: 401

Post » Mon Jan 19, 2015 9:36 am

Compile your project with Node Webkit.
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Mon Jan 19, 2015 9:47 am

Doesn't that make a .exe file? Unfortunately, I still need it to be a .html and run in a browser. It also should work on mobile...

I understand the reason it doesn't work is due to browser restrictions on reading files from disk. Can the images and sounds maybe somehow get embedded in the exported .js files?
B
5
S
1
Posts: 14
Reputation: 401

Post » Mon Jan 19, 2015 9:51 am

You need then to upload to a server.
I don't know an offline solution. Sorry.
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Mon Jan 19, 2015 1:31 pm

That's what node-webkit is for, why do you still need to run it in a browser but offline?
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Mon Jan 19, 2015 3:40 pm

It was on a client's request ( I am a freelance game dev ) but it sounds like they are ok with an executable as well, so I guess I can do that.
B
5
S
1
Posts: 14
Reputation: 401

Post » Mon Jan 19, 2015 4:59 pm

Ok. Offline apps and games only with Node.
Image
B
16
S
7
Posts: 126
Reputation: 1,920

Post » Mon Jan 19, 2015 6:20 pm

@EstudioCelula3 with a virtual server, you might be able to make that work (as browsers are limiting how local content is read)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests