Velojet's Forum Posts

  • Taurian

    Thanks very much for your encouraging reply.

    Yes, your reference to Op Codes does ring a bell. I'll be using PhotonPeer.Lite.raiseEvent (eventCode, data ) to send the player's position to the server. I see the Photon JDK documentation says that its parameters are:

    • eventCode <Byte>   The event code (I guess this is the Op Code you refer to)
    • data <Object> A JSON object with the event data (so it uses JSON rather than CSV, as you mention the Socket IO plugin does).

    I'll certainly get back to you if I hit a snag.

  • Update: I now have more than just a stub plugin in a simple C2 constructed 20x15 grid.

    What I've now got is a PhotonPlayer plugin that's a modified Sprite plugin (ideally, it would be a PhotonPlayer behavior that could be added to a Sprite).

    It dynamically loads the PhotonPeer.Lite JavaScript interface to the Photon server running locally, draws the PhotonPlayer sprite on the screen (movable by arrow keys) and sets up buttons for 'connect', 'join', 'disconnect', 'leave' actions, which enable it to join a game in a game lobby. That bit works.

    To do next (the real multiplayer bit): enhance the plugin to send a PhotonPlayer's position via the server to another C2 grid in another browser and have it appear and move there (along with the local PhotonPlayer object), and vice versa.

    Questions/suggestions welcome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • maguilakindafunk

    My Building a platform game - a beginner's guide shows you how to set up and manage a scoring display.

    Have fun! (And never apologise for being a newbie - we were all newbies once :)

  • Worth having a look at this thread. The roar.io developers themselves chimed in, but now seemed to have cooled off.

  • ... I can hear everyone laughing!!!o. no, we're saying, we've been there and done things like that - and weren't so honest about it.

  • Keep up the good work! If its not too much, could you share with us a video of that in action?

    I'll post a capx when I've got something worth sharing ...

  • Schoening

    Yes, what exactly do you want to do?

    Do you want a button in a game that you can click that takes you to a website?

    More details please!

  • bhavanvaishnav

    Sorry, it's not Ashley's job to modify third party plugins - let him use his time to make C2 even better.

    Why not have a go at making the mods yourself and re-release the plugin? (People like Taurian will bless you even more :)

  • brandyshea

    You need to give us more details of your problem:

    • Has Construct 2 worked for you before?
    • Exactly what error message are you getting?
    • What are the specs of your system?

    (And a more helpful topic title would be good :)

  • Update: Continuing to work on a Photon plugin. I've put a stub plugin in a simple C2 grid/map game (well, not really a game, just a sprite moving round a 20x15 grid), then exported the code and took the C2 runtime.js and have begun to fill out the Photon function with code modified from the Photon realtime demo. Promising results so far ...

  • ...

    Javascript Multiplayer Map Demo

    I've never seen this before, didn't even know they had a Javascript demo. Was it in the Java SDK? If so, it's probably targeting the Photon Server(Hosted) and not their cloud (Which is still ok).

    ...

    Yes, look for realtime.html in the samples dir. And yes, it does target the Photon Server(Hosted), but I'm hoping that a C2/Photon plugin that works on a self-hosted server would be an easy port to the Photon Cloud.

    Thanks for the CJR Gaming ref - I'll have a good look at that.

    And thanks very much for your offer of help with the Photon server itself.

  • Taurian (seeing we seem to be the only two discussing this topic) :

    I have now managed to take a look at the Photon JavaScript SDK. As you indicated in the Photon forum (I'm assuming you're the Taurian over there), their documentation isn't very helpful in figuring out how it all fits together.

    However, I am managing to get my head around their realtime.html Javascript multiplayer map demo and have started exploring how it might be plugged into Construct 2. Going to be a slow process though, I think. As you discovered, the Photon people don't seem to be at all interested in doing something on their side. Pity.

  • pinastro

    If you're wanting "the game to be played using a GAMEPAD" (as you say in your blog), then take a look at the Gamepad (beta) plugin. Studying its code will show you how/where C2 gets its peripheral input (at a basic level, it's handled by the OS rather than by C2 itself directly).

  • I'm using the built-in "Socket" plugin. I'm also not claiming that it's a Construct 2 bug, but I assumed it could be posted here as the plugin is included with Construct 2, or maybe I'm wrong about that?

    bolosaur

    I'm afraid you are wrong about that - sorry. As Ashley says there is no socket.io plugin included with Construct 2, so if there's a bug, it's not in C2 or its own component plugins.

    Where did you get the socket.io plugin from?

  • bolosaur

    You can't access socket.io functionality directly from Construct 2. So are you

    a) using one of the existing thitd-party socket.io plugins, or

    b) (as Ashley suggests) writing a socket.io plugin yourself?

    And in that case why have you come to the conclusion that your connection failure is due to a C2 bug rather than a plugin bug?