... use node in preview?

Get help using Construct 2

Post » Fri Jul 05, 2013 8:34 pm

how do you actually test node in preview now with the new beta version?

I learned quickly that attempting from the browser was a no no. I also downloaded node-webkit itself, but I guess I am using it just like a browser and get the same javascript error.

So how does someone actually go about testing their game without having to export. I searched and was unable to find a tutorial as of yet either.

Also, exporting my game as node does yield the correct results. I do get my text file in the user directory with the correct content in it. But I do not know how to actually make this happen with preview.

Thank you
B
8
S
1
Posts: 62
Reputation: 1,212

Post » Fri Jul 05, 2013 9:39 pm

From the patch note of R137,
[Quote]Add     
Query string ?nw can now be appended to the preview URL to force the engine to detect as node-webkit, e.g. http://localhost:50000/?nw. Useful for previewing quickly with node-webkit specific features.[/quote]

It wasn't possible before, you just have to change your preview settings to add the ?nw at the end :)
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Fri Jul 05, 2013 10:47 pm

What exactly do you mean by preview settings?

I know it sounds silly, but I guess I am failing to understand where to actually do this. In the browser? Open a nodewebkit?
B
8
S
1
Posts: 62
Reputation: 1,212

Post » Fri Jul 05, 2013 10:53 pm

Yeah I don't really get it either. Elaboration needed! (Why not just add node webkit in the browser preview list? >:T)Tokinsom2013-07-05 22:54:09
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Jul 06, 2013 1:03 am

I haven't been able to test this using C2's built in node webkit export because of my antivirus flagging it as a false positive, but here's a way I just tested:

Download node webkit from it's web page, extract it from the zip file
Open nw.exe
Open a C2 game, press preview
Copy the address from the window that comes up
Paste it in node webkit's address bar, add ?nw to the end of it, hit enter
Press preview in C2, and it updates the node webkit window
Close the browser window that you copied the address from
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Sat Jul 06, 2013 1:29 am

Thanks for the reply,

Unfortunately I have tried that and end up with:

[quote]
Javascript error!
Uncaught ReferenceError: require is not defined
http://localhost:50000/NodeWebkit_plugin.js, line61(col undefined)
[/quote]

Anyhow, thanks for trying to help out.
B
8
S
1
Posts: 62
Reputation: 1,212

Post » Sat Jul 06, 2013 2:30 am

Likewise. Not very convenient either!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sat Jul 06, 2013 5:02 am

Argh, I'm getting that error too, I didn't actually put the node webkit plugin in the project when I tried it. Sorry. Man, I have been messing up the testing process on this repeatedly...

Anyway, looks like it should be reported as a C2 bug.

I also agree it would be nice if we could just choose node webkit from a list instead. I tried using the custom setting but it didn't work for some reason.
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, MadSpy, MaxxMunnn, Uk4dee and 35 guests