CrowdGaming - your smartphone is your controller

0 favourites
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • Ashley responded on Twitter:

  • Yeah, support for a networked controller really ought to be done by a custom plugin, rather than adding binary support to websockets. It would hardly be intuitive to use if you had to send and receive binary data. It would be much better if the plugin looked like the Gamepad plugin, and all of that happened internally. And Javascript can of course send and receive binary data.

  • Ashley I agree that it could be a good idea to make it into a plugin, I will keep that in mind when moving forward. Thanks for the input! My approach when using the existing plugins, so far is to abstract away everything "complex" so that a developer would only have to "include" the engine event sheet, to build a game, or the controller event sheet to build a controller. I've also included examples of controllers and games, built on top of the engine/controller "base event sheets". This of course gives the developer 100% control to change the base if they want to. That said I do think simplicity weigh heavier than control.

    Also here is a preview of the CrowdGaming beta v4, new in this release:

    • joystick controller
    • new template game (simple shooting game)
    • made it a bit more generic, the actions are now only called action1, action2, action3 instead of left, right, jump etc then it's up to the game maker to decided what to do with the value of those actions.
  • Keep up the great work OneMuppet

    I've had a lot of fun the last few days playing with it and coming up with game ideas.

  • Congratulations...your work its incredible.

    Take my money please!!

  • ximo justifun

    Thank you! I really think this can open up some interesting new possibilities for Construct 2 developers!

  • justifun ximo Amadeus russpuppy rocky53204 nonom oldandgrey socialpilgrim miketolsa stefanos

    I've given it some thought regarding creating a plugin for the CrowdGaming Controller and MainGame, and I've decided to give it a shot. I will build a custom plugin that modifies and extends the current websocket plugin. This will expose less of the paring logic to the developer since this is done in the plugin.

    I have a fairly ok plugin right now and the next step is to start converting the example games and controllers so that they are using the plugin instead of excessive event sheet string parsing.

    A brief plugin featurelist:

    • Set Action1, Action2, Action3, Action4, SingelAction1, SingelAction2
    • Send Actions, checks if there are anything new to send and sends it
    • Send Actions To, same as above but to specific "player" OR use 'all' to broadcast to all players at once.
    • Send Avatar Type To, send avatar type to specific player
    • When OnMessage is triggered, ReceiveAction1, ReceiveAction2 etc will be available
    • On Avatar Received
    • On Player Dropped

    And some more things

    Because of this the beta v4 release has been a bit delayed, but hopefully I will have enough time the coming days to release it this week.

    Looking forward to your feedback!

  • Hi ,

    just wander why you limit to 4 Actions and 2 SingleActions ?

    I thought we can create as many global number and global text as we need, and send our customized actionstring to the game...

    "Send Actions To" : nice !

  • If you want feedback from someone else I would be happy to be on your beta tester list

  • Amadeus

    I do think that this setup will cover a majority of cases. One action can contain a lot of information, that you could "parse" with your own logic. Or you could use the Array Object, fill it with data:

    use Action1 = "array" and

    Action2 = array.AsJson

    and then on the receiver side write the logic:

    On Message

    CrowdGaming.ReceiveAction1 === "array"

    Array Load From Json CrowdGaming.ReceiveAction1

    You could do things like that to send and receive whole objects, but that is more for turn based games than platformers of course, because of the data size.

    That said I would love to hear more thoughts and ideas. I could add a "send custom actions string" Action that you can use to send anything you want and then also a simple receiveCustomActionString expression that would be filled when On Customer Action String is triggered, for example.

    russpuppy could you PM me your email address, if you havn't allready and I'll add you to the list of beta testers.

    I have finished creating the first version of the plugin and I have also converted the example games and example controllers to use the new plugin. I will test it a bit more and in a best case scenario send out a the beta version 4 pack to day, otherwise tomorrow.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • CrowdGaming beta v4.2 is out and you should have received an email if you are in the beta program.

    There are some important things to note:

    • A lot of the logic has moved from the event sheets to the CrowdGaming plugin
    • Remember to "install" the plugin, by copying the folder "C:\Games\CrowdGaming beta v4.2\plugin\CrowdGaming" to "C:\Program Files\Construct 2\exporters\html5\plugins\"
    • The CrowdGaming plugin has a property called "server ip-address" make sure you set this to your current ip.

    Try it and let me know what you think

  • I'm still trying to make sense of what's going on with this, sorry if my questions have already been answered before. I'm trying to think ahead to how this could be made into a marketable game. Hopefully my questions aren't too confusing, let me know if they don't make sense and I'll try to ask another way.

    I'm wondering what the best alternative will be for people who want to run the game server not in Construct 2 preview over LAN (for example, a game that is distributed via Steam can't rely on Construct 2 to host the game over LAN). I'm wondering how players will access the game.

    There's a few possible ways I could see this working:

    • The controller game file is hosted on a web server somewhere, players could go to this URL and type in the IP address of the server they want to connect to
    • The controller game is a downloadable APK file (distributed via Google Play or elsewhere), the IP address could be typed in. Would this work with Crosswalk?

    Or is there something I'm not understanding about how the nodejs server works? It doesn't distribute the game files over the network does it (for example, if the server game was run with nodejs server and the NW.js compiled executable)?

    I guess I'm a little confused about ports too and how this will work out... will the player hosting the game need to go through the firewall port settings to allow other players to connect?

    Thanks

  • russpuppy I haven't looked into this yet, my first priority is to get this up and running. For people that want to build CrowdGaming games in that is hosted in a "controlled way". For instance if you have a client that want's to promote their new product at an expo. You could build a cool game for them that anyone walking by their stand could connect with their smartphone and play the game with a chance to win. Or for the office party, or connect your game to one of the big screens at Times Square New York, and let anyone that walks by play the game with their smartphone

    But what you are mentioning is of course very important. I got pretty far when testing this morning. By simply including the server.js file into the project, then using NWjs run file "node ""server.js""" On Start Of Layout in the start layout (weird thing is it only connects correctly every other time (could be some sort of current directory issue?). After this I can use my smartphone to access the same ip as you do with preview over LAN, the NWjs starts a webserver on that ip, it seems. So what does this mean? Well for me it tells me it is possible to have CrowdGaming games on steam , I will look into this more when the foundation of the CrowdGaming concept feels stable enough.

    If anyone has experience with launching games on steam using NWjs I would love to know more.

  • I did something similiar using the multiplayer plugin. It actually worked pretty well.

    For example: Tablet put onto table holds the texas hold em cards. and each player connects via their phone as peers.

    The only hickup was you hand to have your game screen device connect first to create a room and password and become the host. Then the peers could connect knowing the private room name and password.

    Worked pretty well when webtrc was working and the signalling server was playing nice - lol

  • DUTOIT webrtc is definitely the way to go, but until it has support in the browser on iOS devices I think websocket is the best option.

Jump to:
Active Users
There are 3 visitors browsing this topic (0 users and 3 guests)