JohnnySheffield's Forum Posts

  • You never know, somebody could be hired by a russian company for a job! Anyways, c?????? ?? ??????? ??????!

  • This is great. I've just read a bunch of articles on UDP, NAP punch-through, etc... Never had a single problem with UDP in multiplayer games.

    And then this:

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

    :D

    Great!

    On the side note; has anybody had experience with this library:

    github.com/pereckerdal/eminet

  • Great info, Ashley, i'll look into NAT punch-through.

    This is just an experiment, and a fun way for me to play with Node API and C2 SDK.

    Nevertheless, it's a fun playing with C2 and UDP, and I think it's great that C2 is such a well written piece of software that allows experiments like this.

  • Bunch of internet applications use UDP; DNS, real-time video and audio streaming protocols, accounting, database systems, etc.

    It's used for multiplayer also, but because of it's possible data loss, sometimes UDP is not suitable for all multiplayer cases.

  • There are a lot of threads about making websites in c2. It's not recomended, but you can do it if you like. Here's Ashleys response in another thread why not to do it:

    "C2 can be nice for making banner-ad style splashes and eye candy. But don't use it to make the whole website. C2 is designed as a game engine, and Google likely can't index any of the content in a C2 project. So your website Google ranking will suffer really badly if you make the whole thing in C2. Go with ordinary HTML and a few C2 bonuses."

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • UDP is a connectionless protocol for datagram-oriented applications. Plugin works only with node-webkit export.

    I spent some free time working on this plugin and finally got some decent results. Here are some screenshots of the UDP plugin in action.

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

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

    ::Current functionality::

    Conditions:

    "On listening","Emitted when a socket starts listening for datagrams.

    "On Message","Emitted when a new datagram is available on a

    "On Close","Emitted when a socket is closed with close().","OnClose");

    "On Error","Emitted when an error occurs.","OnError");

    Actions:

    "Bind","For UDP sockets, listen for datagrams on a named port and optional address. If address is not specified, the OS will try to listen on all addresses."

    "Send", "Send UDP packet"

    "Close", "Close the underlying socket and stop listening for data on it."

    Exppressions:

    "Address", "Returns socket address"

    "Port", "Returns socket port"

    "Family", "Returns socket family"

    "Message", "Returns recieved message"

  • Google translate, if anybody is interested:

    "A good man got plugin for a nominal fee for its use in public servers. Now all the sources are filled on Git, - access to it is open. To download the plugin, go to bitbucket.org/AquaBarbus/c2-vkapi/overview right near Size 255.3 KB - there is a link to download. Install the plugin with Standard - put the folder in the directory with vkontakte plugins. Be sure to check out the example, which is located in the example, as well as with a working version of the online contact vk.com/app3518731 before asking questions. FUNCTIONS: - a list of friends, all of the information about them. - to provide data the current user. - Post a message on the wall (on your wall or the wall of another user.) - set the new title window vkontake - show the window to invite friends to an application - to show the input form of votes - to determine that the window is not in the focus of this works without the server side will be work without any free hosting php without mysql. In general, all "out of the box" such as the f-tion: - define what the user entered voice and payment is successful, the display order number - to determine that the payment was an error or the user canceled the payment (votes) - create an album - upload a photo to an album demand availability of the server-side, such as php. Regarding a rating points in the game - put the contact already a year f-tion setscore, because a rating of players and not the server will not work. Most important: Most likely I will not elaborate plugin, because if there are enthusiasts - crand project"

    AquaBarbus: Official language of the forum is english, but thanks for the info!

  • Hi Pode, thnx for the great plugin!

    I needed a possibility to add a class to my divs, so i did the following changes to the plugin:

    edittime.js, somewhere around line 116 / added a new cr property:

         new cr.Property(ept_text,"HTML tag class", "my_class", "tag class for the div")

    runtime.js , somwhere around line 64 / added a line of code:

    this.elem.setAttribute("class",this.properties[4]);

    Dunno if this is something that should be in the plugin, but i found it useful!

    Maybe it's possible to expand the idea, and have some action like:

    acts.SetAttribute = function (attribute, value)

         {

              this.elem.setAttribute(attribute,value);

         };

    But i didn't test the idea!

    Cheers, and thanks for the hard work!

  • I'm opening an old thread, but i missed out on this, so here's my two cents:

    Regarding my plugins, i wouldn't use any, except the "main" node-webkit plugin, that provides window control and some other stuff. That plugin is good enough, although it could use some improvements. Others, (especially FS) are just "proof of concept", whatever that means.

    That said, I think node-webkit is a totally new and different platform, and provides a set of features we wont see implemented in Construct soon, and i'm ok with that. We need C2 to be stable and as multi-platform as possible, and Ashely is doing a perfectly good job with this. I'm happy with current implementation of node-webkit in C2.

    I believe, that We as a community need to implement a whole Node.js API as a set of plugins. It's a set of features that is platform specific, and i think it's not Ashley's job to implement them beacuse it is not in the "write once export everywhere" spirit.

    But, if we as a community make those plugins, it will make a totally new and powerful way to make node-webkit apps, and provide a totally new way to use C2.

    I started some of that job with socket.io and http plugins (Ok, socket.io isn't part of node.js api, but i like it), and UDP plugin for C2, but decided not to release them, because i don't see any real need for them and not any developer interested it collaboration on improving them, and i don't want to make new members of community using something that is half-done. Current unfinished plugins are enough.

    I would spend my spare time on developing these plugins further, but i haven't seen any real need for them, except "wow, this is cool".

    If anybody is interested in collaboration, please contact me or start a new thread, we've got the whole task list done, it's right here

    Cheers!

  • Ashley

    Can we get some heads-up on what node.js features are you thinking about?

  • There were some effort to compile it for ARM environment (Raspberry-pi), but unfortunately unsuccessful as my knowledge goes.

    There's no reason for node-webkit not to be compiled for ARM. Node is running on ARM devices pretty nice, Chromium also.

    I think we'll see Node-webkit for Android pretty soon.

  • Here

    Blood Animations,

    Weapon Attack Animations,

    Bright Flash Animations,

    Electricity Animations,

    Fire Animations,

    Smoke Animations.

    Cheers!

  • Great work!

    Really glad someone took time to improve socket.io integration in C2.

    Cheers!

  • Great resources, thanks for sharing!

    My test have shown that with using socket.io i get acceptable real-time results (Acceptable for me), with hosting on nodejitsu (i'm in europe).

    It would be probably better if i'm using my own local server, but that's on the to-do list!

    Also, i'm not sure does it affect the performance, but for my games, i edit the plugin and add my own events to the edittime.js and runtime.js, so i don't have to split data, then compare the first element of array then do some actions. That way, the code looks messy and it's not easy to maintain.

    What i do is add a condition to edittime.js somwhere around line 22 like this:

    AddCondition(5, cf_trigger, "On my event", "My Category", "On My event", "Triggered when my event", "MyEvent");

    To the runtime.js somwhere around line 120:

              socket["on"]

              (

                  ?'MyEvent',

                  ?function(data)

                  ?{

                  ?instance.dataStack.push(data);

                  ?runtime.trigger(pluginProto.cnds.MyEvent,instance);

                  ?}

              );

    and finally add a condition to the condition list around line 265:

         cnds.MyEvent = function()

         {

              return true;

         };

    So i my code looks like:

    On My event ---> DoAction (Split data or not, your choice)

    And not like:

    On Data ---> Split Data

       ---> If LastDataElement(0)="My Event" ---> DoAction

    As for making it work with JSON, maybe look into the following plugins:

    Load JSON

    Hash Table

    And perhaps use them in combination with this plugin!

    Also, if you do some edits to the plugin, i'd be really grateful if you'd share the edits so i can implement them in the plugin, and if you have some test to share that would be great also!

    Cheers!

  • Thanks for this great plugin but I'm having trouble understanding the LastData bit.

    Why not present data?

    Consider:

    io.sockets.on('connection', function (client) {

            client.userid = UUID();

            client.emit('onconnection', {id: client.id});

            console.log('\t socket.io:: player ' + client.userid + ' connected');

            client.on('disconnect', function () {

                console.log('\t socket.io:: client disconnected ' + client.userid );

            });

         

    });

    Is this your server-side code?

    I do a connection, then check if any data is available. If I receive an event named 'onconnection' I spit out the alert with Socket.LastData.

    This comes up as 'websocket' before another alert '[Object] [object]' which is the one I want.

    What is this 'websocket', why do we look one step back in time?

    I must be missing something here!

    Ok, you probably don't want to use the socket.LastData expression, it behaves really strange, and messes up the data... If you read the explanation of the Socket.LastData expression it says:

    (Get the last chunk of data that was received via the socket. (Warning: this exression actually manupalates the data stack, be careful when evaluating it in Construct)

    Meaning: Don't use it!

    What you want to do is:

    On Data ---> Split data received

        ---> Access your data with Socket.LastDataElement(index)

    The "Split data received" Action actually makes the Data.split(','); so it returns an array.

    If you don't want to split the data, and just access the last data recived do the

    On Data ---> Access your data with Socket.LastDataElement(0)

    This is actually the main reason why this plugin isn't the best it can be, it doesen't manipulates recived data on the best possible way.

    Reason for this is that this plugin was originally written by Zack0Wack0, then edited by Juantar, then by some other members, and lastly by me... I added some functionality to it, made it minifiable, but it actually needs an overhaul. A lot of stuff isn't coded the best it could be!

    I'm currently waiting for the socket.io 1.0 to become official, because it makes some serious changes to the Socket.io module and possibly a different API, so probably would be waste of time to overhaul it now!

    I hope i helped,

    Cheers!