JohnnySheffield's Forum Posts

  • Updated server a little bit, check the first post for demo and screenshots!

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my node-webkit GUI plugin there are actions "enter fulscreen","leave fullscreen", "toggle fulscreen" which function properly. Haven't tested the Construct's "request fulscreen" in the browser plugin but i don't think it will work properly.

    Also, i did notice some inconsistency with text-box and text object when repeatedly entering and exiting fullscreen, and re-sizing window for a few times, but i'm not sure is it just improperly written package.json or a problem with construct or node-webkit, or was i just forcing it to fall apart with fast clicking.

    (actually i haven't tried fullscreen on mac, just on windows, so this applies only on win7)

  • yup... i will try and install some linux distro tonight and see how will that work! i like node-webkit more and more!

  • Sucessfully ported Space Blaster demo on OSX using node-webkit.

    Screenshot:

    <img src="http://i.imgur.com/7rvgI.jpg" border="0">

    Download zipped .app file here

    I will try to make an tutorial as soon as possible.

    Cheers!

  • Actually, if you're using node.js, there is no need to have that dependency, your server will serve the client automatically.

    As for multiple instances issue, try to change the id of the plugin and insert multiple instances of the same plugin, each instance with unique id. if that breaks the project, besides renaming the id, try to rename the socket variable in which connection is stored, so you get something like:

    var socket = io.connect('http://localhost/socket')

        , socket2 = io.connect('http://localhost/socket2');

    socket.on('some_event', function () {

        // do something

    });

    socket2.on('other_event', function () {

        // do something

    });

    It should work with juantar's demo, it's pretty much the same plugin, i added some actions and stuff and edited it so it doesn't break when you minify it.

  • If you're using node.js server should automatically serve client socket.io.js file, form the official wiki:

    The client is served automatically by the Node.JS server. In your <head> tag of your HTML, include:

    <script src="http://<uri:port>/socket.io/socket.io.js"></script>

    If your web app and socket.io are on the same server and port, you can simply include:

    <script src="/socket.io/socket.io.js"></script>

    Socket.io client can also include optional version numbers, in order to maximize caching performance. You can simply include the version number within javascript filename;

    <script src="/socket.io/socket.io.v0.0.1.js"></script>

    If you choose to serve the client through other means, you can clone the socket.io-client repository and look at the dist/ subdirectory.

    I'll look into that and change it asap!

    Index

    What server are you using (i mean code-wise, python, node.js etc..)?

    Also, how did you manage to have multiple instances of the plugin? it should be pf_singleglobal?

    Can you specify in more detail what was the actual error?

  • Path module provides string operations for manipulating file paths. Fs module provides methods for actual file operations.

    That way, you can take a path to a file from user, make some string operations on given path using path module, then do some file operations on a newly calculated path using fs module.

    I'm writing plugins in some (I hope) meaningful way; os for accessing info on operating system, then path to make path operations, then fs to use those paths for making file operations.

    Next, I'll try to implement URL and query string modules for URL� operations. That way we have some basic methods and modules exposed to use node.is part of node-webkit.

  • In heavy development - release often, release early

    File I/O is provided by simple wrappers around standard POSIX functions.

    This plugin exposes sync functions

    Use with absolute care, you can erase all data on your computer if you <img src="smileys/smiley35.gif" border="0" align="middle"> up!

    Demo - reads contents of c: and returns a string representation of returned array - ok to use

    Plugin

    This module exposes Bunch of stuff, sync and async, this is just a small small part of everything available!

    Exposed stuff:

    Actions

       - renameSync

       - unlinkSync

       - mkdirSync

    Expression

       - readdirSync

    I tested only readdirSync, so for actions i cannot guarantee anything!

  • This plugin contains utilities for handling and transforming file paths. Almost all these methods perform only string transformations. The file system is not consulted to check whether paths are valid.

    Contains just expressions!

    demo here

    Plugin here

    Info on the implemented stuff

    haven't tested it thoroughly so please report any issues, i will try to fix asap!

  • run the demo, point your browser to "localhost:54321" and see what happens.

    It's a socket.io/http local server running on port 54321. :D

  • Has anyone tried to export for mac or linux?

    If anybody has a mac or linux OS please test!

  • I made a tut on how to export to .exe with node-webkit.

    I hope you find it helpful,

    Cheers!

  • Made a tutorial on how to export. I hope it helps to make things easier!

  • They won't allow you, cause they don't have access to it.

    Beauty of node-webkit is in the simultaneous access to DOM and Node.js enviroment and possibility to "mix" the code

    When you have node.js server in the cloud, most simple would be using express module, or even node-static to serve your exported project.

    Fun thing with node-webkit and socket.io is in possibility to utilize node2node-socket.io module and then create a game that doesen't have a central server, but exists when nodes connect to eachother and create worlds and share data. Each client would be at the same time a server, and each server could take care of it's own data and security, but also accept orders form other servers on what to do with data. Let's call it "cloud-gaming".

    So you actually don't need a .js file from construct. if you need a .js file, open up a notepad++ and write it!

    We just need smartly designed, simple node-to-node plugin to make direct connections between clients/servers. and possibility for a wierd, but fun way to create multiplayer games in C2.

  • With just a plugin, and directly from the C2, don't think so.

    But with a custom-made C2 app that is utilizing "write to file" plugin, and has duplicated construct GUI and way of writing code (Constructception?) it's possible, but time consuming.

    OR, create a plugin that creates a function(or some object containing your server code) in C2 runtime, and, when you export it unminified and start the app, plugin provides access to that object's containing code and exports it to you as a .js file.

    I believe it's possible, but the solution would be hackish/impossible without some cooperation with scirra team.

    But the main problem currently for me with combining node-webkit, node.js and Construct 2 is how to transfer the asynchronous I/O nature of node.js to construct successfully and tidy with it's bunch of callbacks, and still preserve the simplicity of coding in construct.