Node-Webkit, Download?

Get help using Construct 2

Post » Thu Sep 05, 2013 11:10 pm

Heya,

It's been a while since I played with Construct 2, and now that it have the ability to run the program as a normal program I am looking forward on getting myself a copy!

I was wondering is it possible to download a file at a specific location using the Node-Webkit or Javascript? I know it will be impossible via browser, and is there any plugins/scripts out there that can do this?

I am looking forward on making a application that can update itself and add new content.

Thanks for any help in advance!
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Fri Sep 06, 2013 12:36 am

I see, this is interesting! It really depends on what kind of files are you talking about, I think.

For instance, you CAN download a .json or other text-file-like formats to your game, then write/overwrite a file that already exists, but if you're talking about graphics/sounds/code, since it's all in the package.nw file, you'd have to re-download your entire game basically.

The best way to achieve an updatable game with Node-Webkit would be having a separate application that would be able to open the package.nw file, change it's contents, then re-zip it, I think.
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Fri Sep 06, 2013 1:35 am

Yeah dlc is somewhat of an issue since you cant introduce new objects on the fly.
What you can do is a mix of things with what andreyin said, and heavy use of instances that you can change textures on via url, all though that method is pretty complicated.
Its doable, but will require quite a bit of forethought.

One thing that I find really interesting is that the problem of making objects on the fly is lessened if you use a server like nodejs that has no ties to graphical objects.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Fri Sep 06, 2013 12:44 pm

You can download text files to disk by AJAX requesting them then using the node-webkit object to write a file on disk with the data returned from AJAX.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests