Juanito-cnstrct2's Recent Forum Activity

  • A little bit off topic, but Is anybody working on an "unofficial" way to run c2 games in ejecta? I tried it and with minor tweaks to the rintime.js, i was able to get ticks and draw calls but the sprites are not drawing on the screen. I know for sure that the sprite's draw function is being called with the correct params because i added a console.log right before it. All i get is the white background from the layout.

  • remy-jay I think JohnnySheffield's version (http://www.scirra.com/forum/plugin-zack0wack0s-socketio-mod_topic56503.html) fixes this issue.

    I think you can also add the disconnect event and adding an action there to disable the ondata received event (system->disable event group). You will need to put the ondata received in its own group.

  • Mainly performance. The link says that the Cocos2d approach could be faster than DirectCanvas, but again they don't show any numbers so they could be just making that up.

  • I noticed that Cocos2d (a mobile, native engine) has a Javascript binding:

    github.com/cocos2d/cocos2d-iphone/wiki/cocos2d-and-JavaScript

    I was thinking that maybe, instead of accelerating the mobile games at the low Canvas calls level like AppMobi probably does, Scirra could create a special Cocos2D based runtime that would accelerate at the entity level (sprites, backdrops).

    My guess is that the Cocos2d JS bindings would allow most of the JavaScript in the runtime and the plugins and behaviors to "just work". any Input or sound related javascript would have to be specially handled at the C2 runtime level, but I guess that is also a requirement in DirectCanvas. Any custom plugin or behavior that relies on canvas or webgl calls would also have to be converted, but I think that is a small percentage of the user-created plugins.

    I understand that such an exporter would not have all of the plugins and behaviors of the HTML5 engine, but neither does DirectCanvas and I would think that the Cocos2d exported games would perform faster than the DirectCanvas.

    What do you all think?

  • zingzong it is possible in the sense that you can have something working after spending a good deal of time. You will also need to come up with a way of translating the logic of the game into the Events/Actions. There is not a "strategy template" or "strategy unit" that come with Construct2.

    I do however suggest that you start with something simple, as in a small strategy game where the player click on a unit in a small square grid and then moves one square only. With simple attack/defense values stored in instance variables.

  • Anggi do you have Chrome? can right click the page-> inspect element and then check the console tab. What does it say?

  • Schoening : yes, sort of. The count variable it would get massive if there is a massive amount of players joining. The count variable gets incremented only when a new player joins so that the server can assign a unique number to that player.

    The server script in the sample was not designed to be run forever. It works more like the old games: you would start the server part of the game every time you wanted to play a multiplayer game, let you friends know about the IP address of your game session and then close it when you were done with the match.

  • Schoening Exactly. The server script takes care of incrementing the player id every time a new player joins.

    The "Array int(Socket.LastDataElement(1))" part is basicaly saying:

    1. get the affected player id number from the message we receive from the server. In the sample, the messages always put the player id in the second position of the message, that is why you need to get the element from the last data that resides in index 1 in the internal message array. The first position is the type of message.

    2. Once the number if obtained, convert it to an int. This is because the raw network message is of text type.

    3. Once the affected player id is converted to an int, use that number to lookup the UUID of the sprite that belongs to that player.

  • Schoening : it gets set when C2 receives an I (initialization) or a C (create another player). Basically it gets assigned when a new player gets created (including the player that "owns" the current game instance.

    That array just holds the UID of the players' sprites to allow picking them when a network event arrives affecting them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there any way of implementing a "cost" for each node? That way it would try to choose the path with less movement cost?

    Thank you!

  • bjadams I made a plugin that incorporates copperlicht to C2, allowing you to use 3d webgl graphic. Search the plugins forum.

  • sorry, I have only tried it on local networks. You can try serving from your home connection (if you have a good internet connection) or get a trial for a virtual hosted server.

Juanito-cnstrct2's avatar

Juanito-cnstrct2

Member since 26 Apr, 2010

Twitter
Juanito-cnstrct2 has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies