Hello, I am looking into buying an impact licence but I am not sure if I can use it with my current build system. As it stands I have a node server running that uses browserify to take my a bootstrap coffee file that uses node require to compile one big js file for the client side. I notice that impact has its own require system. is there a way to not use it if I am in node?
1 decade ago
by Joncom
Generally speaking, ImpactJS runs in the client browser.
And nodejs is used for other things, such as a socket server.
So I don't see where the overlap would occur... Would you mind elaborating?
1 decade ago
by Nico
You're about to hit the exact same wall I did, I think.
To setup a secure, high performance, multiplayer system you need to emulate most of the main functions of Impact on the server-side. I managed to hack some of the impact functionality into node but it was really dirtily done. The main problem I came up against is that Impact expects a Window object and I could't figure out how to emulate it on the server.
A few talented people have gotten farther than me around here, you should just do a forum search for 'node'. Though, I've still yet to see a really good nodeJS + Impact setup that performs consistently across all clients.
Hopefully this is what Dominic is working on for the next release :D
The overlap lies in using Node and Express as the web server for serving the impact framework, html, and other assets. I'm currently working on making this a working reality, and tossing in coffeescript too.
Currently running into some issues with serving the font, and game.main being already defined, but it's only been a couple hours.
Whoops, I forgot to delete the leftover game.main code from my impact.min.js minified impact library. That error is past, I just have to figure out how to serve the font from express. :)
Spamming the forum, that last bit is done.
Just needed the following coffeescript in my index.coffee
app.get '/media/:filename', (req, resp) ->
filename = req.params.filename
resp.sendfile 'media/' + filename
Page 1 of 1
« first
« previous
next ›
last »