[request] headless exporter

Discussion and feedback on Construct 2

Post » Thu Jan 29, 2015 5:05 pm

JohnnySheffield wrote:
Ashley wrote: has no rendering overhead or use of the DOM.


Thank you for your input, but with all due respect this is false.


Can you expand on this please?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Thu Jan 29, 2015 5:37 pm

JohnnySheffield wrote:
Ashley wrote: has no rendering overhead or use of the DOM.


Thank you for your input, but with all due respect this is false.


Why? It will spend no CPU time in draw calls, and the only DOM usage will be an unchanging canvas element. Maybe there will be a bit of memory overhead, but most machines have gigabytes of memory these days.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Thu Jan 29, 2015 7:13 pm

@Ashley

It is not possible in my knowledge to use the generated javascript without the accompanying index.html and some canvas object in it. With canvas and html comes an overhead of chromium or some other wizardry like jsDOM to make it execute. Although the renderer is idle, and the DOM is probably not used in any active way, the utter existence of them in your process and memory provides an overhead. Sure, that can be avoided by throwing more resources to it, but is that the right approach? I dunno, that's why i'm here to talk.

It could be possible to make an plugin and/or introduce some settings to the editor to make the "nw headless" exporter easier maybe, and provide some communication channel to the headless instance?
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Thu Jan 29, 2015 11:41 pm

newt wrote:So basically you want something like a server without a gui?

Yes, I tried to find a way to deploy JavaScript application made by C2 on heroku server (node.js) before.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Fri Jan 30, 2015 12:33 am

A way to program node.js like we do in C2 would be interesting.
Especially considering all the existing npm's.
Of course I doubt those would be used easily by C2's runtime.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Tue Feb 03, 2015 9:58 am

@Fimbul
@JohnnySheffield

I had tested the ability of firebase with a very small mmo demo.

Each client will communicate to some other clients by firebase. A game server might be another kind of client which control NPC or other system events.
This would be another use-case of headless exporter, since this game server does not need UI. So any user could use C2 to create game server, and run at node.js (without any database -- firebase is a database already)

Run in browser also fine for developing stage I guess.
Last edited by rexrainbow on Mon May 04, 2015 5:09 am, edited 1 time in total.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Tue May 05, 2015 7:54 am

newt wrote:Especially considering all the existing npm's.
Of course I doubt those would be used easily by C2's runtime.


I don't see any problems with using existing npm's with c2runtime,. It's all javascript after all, right? :)

@rexrainbow
Thanks for updating about your progress, i believe there are many use cases for this kind of "exporter"

@Ashley
Can i kindly ask you to provide some information is this kind of functionality planned for C3? I hope headless exporter would be easier to achieve with plans to utilize nw.js for C3...

Cheers!
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Tue May 05, 2015 8:07 am

@JohnnySheffield
@Ashley

I got trouble while running project (at previous post) on host like heroku or linode server -- they do not have any browser.
"Headless exporter" might be a better solution for those cases, to run application on node.js.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Oct 04, 2015 4:15 am

seems the question is not only applying to c2 but for most developers over internet that uses node ... and i was trying to figure it out also this week.. till i found your post.. and seems is not possible :|

here is a topic for headless verison and seems that node.js already does it.. but not nodewebkit which is a different thing.

and also the phantom.js is doing same thing ... but im no plugin exporter developer.. so all this lays in your powers if you can develop a new nw.js like exporter plugin ... sounds easy but i know is not ...

ah.. and there is this repository also... git phantom nodewebkit

im just a noob dont beat me with rocks ...


however this thing may not be needed since you can install a GUI on linux ... and run ur app.. as i did (but was painfully long process)... another option... if u willing to put some server maintanance cash down... rent a windows server and its done(what im using now but its heavily expensive then a normal linux server 5x times more) ... but then just adding the ability to set window "show" to "false" in the manifest when exporting wold also do the trick.
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 31 guests