JohnnySheffield's Recent Forum Activity

  • jayderyu C2 packages app automatically when you export to node-webkit.

    Maybe something like this could be used to make an installer for a nw exported game?

  • Cool, thanks for the detailed answer and clarifying things up, when (if) i make some test, and get some decent results i'll post in forums.

    Cheers!

  • Hey, great idea, i wish you all the best with the application development business.

    I've completed the survey, so you got my data! Do you plan release the result of the survey when you're done with data-analysis?

    Cheers!

  • Yup, it seems that it isn't supported yet...

    I wonder would it be straight forward to implement these methods (functions? whats the proper name?) in a third-party plugin or are there any limits regarding C2 engine and/or Cocoonjs engine?

  • ahhhh... Don't run nodejs.exe. It's just node console, you can use that to test your ideas, or learn node.

    To start some .js file in node try:

    Open up command line (Start -> cmd) got to the folder where your .js file is, (c:/path/to/my/file) and then try "node myfile.js" command.

  • That's actually expected behavior...

    Node is waiting either for connections, or something else, depending on your code.

    So, let's say your code looks like this (a simple hello world http server):

    ---

    var http = require('http');

    http.createServer(function (req, res) {

    res.writeHead(200, {'Content-Type': 'text/plain'});

    res.end('Hello World\n');

    }).listen(1337, '127.0.0.1');

    ---

    It actually won't throw anything to the console, it just sits and waits for connections.

    If you add a line on the end of the file:

    ---

    console.log('Server running at http://127.0.0.1:1337/');

    ---

    It should write the message once you start your server.

    Cheers!

  • Just a quick response, im in a hurry, so sorry if this is just pile of crap;

    Runtime.js, around line 149 there's a workaround for cocoonjs:

                   if (method_ === "POST" && data_)

                   {

                        if (request["setRequestHeader"])

                        {

                             request["setRequestHeader"]("Content-Type", "application/x-www-form-urlencoded");

                             request["setRequestHeader"]("Content-Length", data_.length);

                        }

                             

                        request.send(data_);

                   }

                   else

                        request.send();

    Could you use this snippet, make a varible like this.myHeader which you can set, and then replace the "setRequestHeader" with this.myHeader (and other stuff you need), and in construct before making the ajax call set this.myHeader with an action, and then make the call.

    "Need to have something working by end of day :(" -> Ahh, the good 'ole deadlines :D

    Cheers!

  • I've read the User Media runtime.js, and it seems that it doesn't work on cocoonjs. Is this correct?

    If one would try to write a plugin to get access to a camera on cocoonjs, would it be possible to use the:

    CocoonJS.Camera.startCapturing(0, 50, 50, 30);

    CocoonJS.Camera.getAllCamerasInfo();

    methods to get access to a camera? (Methods from here)

    Cheers, and thanks for all the responses!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could try and search "multiplayer" on the forums. There's a lot of demos and examples. You'll have to modify them to suit your needs, or write 'em ground up, or make somebody to do it for you!

    Cheers!

  • Yup, it's possible; you can do it multiple ways;

    One route is to use official websocket plugin, and write-up a server in python, node, or whatever suits your need.

    Other is to use socket.io plugin, there are several versions available on the forum, latest stuff was added by aceofspades, i think. The route is the same, you'll need a server in some language that has bindings for socket.io.

    Other libraries you can use are now.js, sock.js, even pubnub.com.

    For this application, i would probably use official websocket plugin, it's most stable one, and i think you can do everything with pushing text messages around connected clients!

    Cheers!

    Edit: Actually, for a quiz there's no need for websockets, you can do it with Ajax!

  • From the mailing list:

    "node-webkit requires at least OS X 10.7, 10.6 will also work after

    fixing this bug:

    https://github.com/rogerwang/node-webkit/issues/97"

    Also this, regarding minimum spec for node-webkit mac export:

    "Currently we require 10.7.x, after fixing this bug we will only

    require 10.6.x, and Chrome requires 10.6 as minimum which means we

    would never support 10.4.x."

    For osx 10.6, one must build node-webkit on it's own; a prebuild package can be found here:

    github.com/toxygen/10.6-node-webkit

    Not sure is this the issue here, but i haven't seen any info on the osx version this bug occurs on.

    Cheers!

  • Did you try macgap for mac export?

JohnnySheffield's avatar

JohnnySheffield

Member since 31 Jul, 2012

Twitter
JohnnySheffield has 1 followers

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies