Juanito-cnstrct2's Recent Forum Activity

  • JonnyBritish : I am a developer based in the USA, I do have access to a Windows Phone 7 (my personal phone).

    Last time I tried to export a C2 game using phone gap (Cordova) with Windows Phone 7, the "touch" buttons in my game did not work (the user touch events were being ignored). Searching in Google, I found out that that is a current limitation of Windows Phone 7's IE control.

    On a related note, I am currently working on a XNA exporter for Construct2, the youtube video shows that the generated XNA was able to run in the WinPhone emulator. It is still a work in progress, but I have not receive any help offer in the coding area, so I am the only coder in the project.

  • I am working on a XNA exporter for construct2. So far I was able to make it convert one small (very small) game with one layout and about 10 events. The game does the very basics (8-dir movement, creating objects runtime, destroying objects, checking collisions).

    The tool reads a capx file and transalates its layout, events and project xml files into C# code. The C3 code uses the FlatRedBallengine which sits on top of XNA and works for PC, XBOX and windows phone. To do this, I had to implement the C2 methods and events in XNA; right now I have only implemented the ones used in the demo game (testxna.capx). Hopefully there are C# developers out there who would like to contribute and re-write or at least pseudo translate the plugins and behaviors from javascript into C#/XNA. If requested, I can create a project in codeplex to allow others to contribute to the code.

    The generated C# code is placed into a project chosen by the user. The folder must be however a template project that contains the C2 implementation I have so far.

    The zip can be downloaded here, look for the zip file named "XNAExporterTool.zip". This zip file contains 3 zip files:

    1. XNAExporterTool.zip: the Visual Studio project of the actual converter tool.

    2. XNAWindowsPhoneTemplate.zip: the zip file of the Windows Phone template.

    3. XNADesktopTemplate.zip: the zip file of the XNA Desktop template.

    Right now, the tool is not very useful for end-users. There are two reasons for this: the tool is in Visual Studio project form, so it is meant for people with a background in C# and a little on XNA who want to take a look at what I have so far and decide if they want to contribute or not. The second reason is that the events and actions I have implemented so far will probably not be enough for your game. If enough people are interested in contributing, I can create better documentation and the project at CodePlex. If not, I will still work on implement more events and actions in XNA.

    You can see a video of the converted game and the tool in

    .

  • rexrainbow : in my tests and for this simple game, the syncronization was good enough. If there was a lapse, it was very little. However, I do understand your concern. Some games woould designate one of the clients or the server itself as the authority in deciding if an event was true or not. In this case, one of the clients or the server, could decide if the bullet really hit a player or not. If it did, it could send a message to the other players telling them that a hit was made.

    It really depends on how you design your game what trade offs you want to take (the more messages, the more traffic that will need to travel over the wire)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I wrote a new post in my blog on how the multiplayer demo works in Construct2:

    http://jptarqu.blogspot.com/2012/04/how-to-create-online-multiplayer-html5.html

    I also uploaded a new video showing an iPad connecting to the game:

    Subscribe to Construct videos now
  • istanto i think you still have the old version because the line that says

    jpt_splice(dataStack, 1);

    Uses a zero instead of a one in the new version, so it looks like this:

    jpt_splice(dataStack, 0);

    thanks

  • istanto can you please open in notepad the following file in your construct2 folder:

    exporters\html5\plugins\socket-io\runtime.js

    At the end of the file there should be function called get_last_data at around line 179, can you please copy and paste those lines or take a screenshot of them?

    Thanks!

  • istanto : It was a silly mistake, I was calling the my splice function with the wrong index in the plugin code *facepalm*. I tested it in my machine and it works. I put a new version out there, please download this latest version and let me know if it works for you.

  • istanto did you get this error with the new version? I saw that problem and I though I fixed it in the latest release. It was a problem with the code in the example_server.js file (I was not using the broadcast method in the socket).

    Shiva I have not tried R84 with the plugin yet, I will give it a spin.

  • Very nice!!! Just what I needed!

  • Shiva : are you opening the web page by double clicking on it? that might not work, it has to be hosted in some kind of webserver. It works in debug mode in C2 because C2 uses a local webserver (localhost:5000) to host the game.

    Thank you for using the plugin!

  • chromstruct and noranka: Interesting... what browsers are you using? The "info- handshake" message that you get, where do you see it?in the console or the screen?

    Also, I uploaded a new version with a small fix in the example server, can you please re-download the plugin.

    Thanks

  • Bug in R.82:

    The Array plugin is setting the depth equal to the height when calling SetSize.

    In the method you can see that it reads:

    this.arr[x][y].length = h;

    instead of:

    this.arr[x][y].length = d;

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