bhavanvaishnav's Forum Posts

  • Re-releasing a plugin as a mod, the "mod" being a bug fix, does not sound right to me.

  • In that case, I think Ashley it should be safe for you to make that change, its been stable for me, and I can't see it causing side-effects.

  • Hi Zacko,

    I was using juantar's modified plugin to do some testing and found a bug while connecting / disconnecting / reconnecting sockets.

    This could be of use to you.

    It is explained here:

    scirra.com/forum/topic52809_post331439.html

    I also found a fix (which is explained on the post), it would be great if you could let me know if this could cause problems.

  • I have a fix for this (runtim.js of socket.io plugin)

    change:

    socket = io.connect('http://' + host + ':' + port);

    to:

    socket = io.connect('http://' + host + ':' + port, {'force new connection': true});

    The socket does not connect when you reattempt a connection while switching layouts. I guess the socket.io plugin was designed to have one connection throughout your game. I don't know the side effects of this change, but if you guys think this could cause problems, let me know.

  • btw while testing I removed the comment on (runtime.js of the socket.io plugin):

    //socket = new io.Socket(host,{port:port,transports:["websocket","flashsocket","xhr-multipart","xhr-polling","json-polling"]});;

    But that should not make a diff, as it gets reassigned on the next instruction. And I can verify this happens even with the original code.

  • Hi,

    I have been messing with Zacko's socket.io plugin for a bit, learning javascript as I go.

    I have got an environment setup where I can get two clients to handshake.

    But an interesting bug / limitation has come to my notice.

    Download this:

    dl.dropbox.com/u/24356445/socketiostuff.zip

    Unzip

    execute runserver.bat. This runs the server. I have included the socket.io module in the same folder. If you have issues setting this up, look at Zacko's page about installing nodejs and socketio.

    now openup the socketiostuff.caproj, this is a simple two layout project, where if you click, you move to layout two, which initializes the "handshaking" (connects to localhost), if you click again, you disconnect from the server.

    What is interesting is if you disconnect, it seems to be destroying the plugin instance?

    If you disconnect-> go to layout 1 -> and look into your javascript console for errors, you see a call to OnDisconnect (from the socket.io plugin) on a null object. So basically the application crashes.

    I noticed this first when trying to have two clients on localhost, while trying to test my handshaking stuff. The examples we have seen on socket.io do not cover disconnect. (but it is of course essential that you disconnect from the server when needed)

    I will dig into the socket.io code later, but just wanted everyone to know this happens.

  • I am a programmer, a c++ kind. A skeptical about js, and html5 kind, but I have to admit that I enjoy working with c2, and its design, and its simplicity. C2 basically lets me do things in an hour, things that generally would take me a day to balance and polish.

    Basically, c2 is fantastic, for programmers, and even better for people just starting off. If you want to make interesting, innovative games, or simply want to prototype ideas, its amazing. Keep up the good work, and keep pleasantly surprising us with your awesome updates. And we will surprise you with some kickass games, we promise.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could not find this anywhere.

    I tried adding some AI to my game but its extremely deterministic.

    Is there a way I can set random seed to system time without getting into javascript?

  • thanks for the update.

  • We can enable CCD on physics bodies with

    bodydef.bullet = true

    Normally it is not advisable to have CCD on dynamic bodies, but there are scenarios where you might want to do that and take the performance hit.

    I was having trouble with collisions on fast moving bodies, and that change on my exported javascript solved the problem. I only have two bodies in the whole game so physics performance is hardly an issue.

    I think this should be an option in the editor.

  • I guess you guys are super busy and have probably already looked at this. But if you could confirm this is a bug, I will not look at crazier ways to try and implement a similar mechanism.

    Also note that this could be related to the touch not working on mobile bugs we have been seeing lately. Because the problem event seems to be the "is in touch"

  • Just tried appmobi. Have to say it looks good. Most parts of my game ran smooth.

    Found a few minor bugs, thought this might help.

    dl.dropbox.com/u/24356445/appmobibugs.capx

    I use chrome for testing, and I have tested this with the appmobi simulator as well as iOS5.1 (on an iPhone4s).

    1> the capx has some ios like scrolling. But appmobi always scrolls to the top left of the layout. You can view the intended implementation working on chrome.

    2> text object is not supported on appmobi? I have placed a small text object in the center of the layout.

  • JohnnySix:

    A template layout.

    Well, since c2 requires you create an instance of an object before you create something for the first time, it makes sense to have a template layout (which is never used in game) and dump all your objects into that one layout. Apparently all c2 needs is an instance somewhere in the game, to know the objects default properties.

    This way you do not have to recreate this first instance in all your subsequent layouts. Making things cleaner.

  • Oh wait,

    You dont have to set objects as global on a template layout....

    Hmm seems you guys thought of everything! My bad. That's "clean" enough.

    No changes required!

    The problem is not so interesting after all. :D