CrowdGaming - your smartphone is your controller

  • nice !

    i'll give a try to the plugin this afternoon.

    Thx !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OneMuppet Very nice !! I would like to try this plugin!

    I think the best way is Webrtc and UDP/IP ...but its not supported for any browsers.

    DUTOIT ...is posible use multiplayer without signalling server? Only LAN automatic conexions...and the first is the master/game server.

    Please I can try as he has done your experiment with multiplayer?

    Tx!

  • ximo, no you need a signalling server to connect the players, once connection is made you no longer need signalling server. The signalling server is just to make the connection.

  • Tx dutoit..but my question is ...is posible by example 1 apk server/player . The first connection is game and the others its player?. All whitout server online ...only LAN offline

  • I thought part of the idea of using the websocket nodejs server was that a signalling server wasn't required (am I wrong there?)

    If you're using WebRTC though you have to either have an internet connection to connect to the signalling server or else use the signalling server from the scirra store https://www.scirra.com/store/game-makin ... server-161 -- though the problem I see with buying that is sadly the license only allows you to use it yourself, not distribute it to people that buy your game. So you could really only set the signalling server up for yourself, not for people who have bought your game on Steam and want to set up their own LAN game (for example).

    Sorry if that's taking this thread too off topic, I'm just still trying to make sense of webrtc vs websockets/nodejs vs other alternatives....

  • russpuppy I think the main point is that the web socket/nodejs works great but it does take a bit of set up for anyone that wants to host (display the main screen) by having to do all the nodejs set up when the Signalling server just takes connecting to it and that's about it. Although I don't like the having to set up nodejs on a computer on the same network, I still like it more than having to deal with WebRTC and that damn signaling server crap.

    Haven't tried the new version yet but setting up the basics for a multiplayer snake game was pretty damn easy so far on the last version. Thanks for all the hard work!

  • I see the biggest use of a plugin like this for couch co-op party games. There's a few out there already that use this type of multiplayer setup.

    One is Quiplash: http://store.steampowered.com/app/351510/

    and the other is Fibbage:

    Subscribe to Construct videos now

    but there's so many cool game ideas that could use the same sort of mechanics.

    Imagine and RPG where the main screen is the dungeon where you encounter monsters, and each player on their tablet is an adventurer. You could design the game so that it encourages players to talk to each other and play off each other's characters talents etc. Each player could issue commands from their phone on when to attack/heal/buff etc.

    There's another game out there that i forget the name of, but its a spaceship game where each player is a different crew member. One player is responsible for steering, while the next is in charge of shields etc. Each player has a completely different set of controls on their phone screen to deal with. You all have to work together to make the ship fly.

    I can't wait to keep playing with this plugin even more.

    OneMuppet - Few thoughts.....

    1) Its spelled "Single" not "Signel" if you were trying to describe an action that takes place only once. Or perhaps you meant "Signal"

    2) also, i'm not sure in the joystick controller event sheet (event 4) where there's a condition "Action ="j"

    what's that being used for?

    3) Is there a way of having more than 4 actions and 2 singleactions in a project?

    Keep up the great work!

  • justifun

    Thanks for the feedback!

    1) I'll fix it

    2) It's just a leftover from the ctrlPlatformer eventsheet (it can be removed)

    3) you cannot send more than 4 simultaneous action plus 2 singelActions, no. However an action is just a string of text. I don't see a real limitation here, but I'm willing to listen if you see any limit with this setup. In the first version there was just one action and I did all the parsing in the C2 event sheet. You could for instance use Action1 as the keyword, and Action2 as the information bearer.

    Like this:

    You could also use an array object fill it with info, use array.AsJson and then use load from Json on the "other side".

    Would these solutions cover your use cases? If not, let me know what's missing and I'll look into it

  • OneMuppet - Ok i guess i'm not fully understanding how the actions being sent are supposed to be used correctly.

    The way i'm "thinking" it works, is that each "action" is like a button press from the player

    action1 = jump

    action 2 = shoot

    etc

    and therefore if you have a lot of input controls for your player, then you will run out.

    So perhaps you could explain the differences between an "action" as you call it, and a "signelaction"

    what cases would you use one or the other?

  • justifun

    SingelActions are actions that are only used once like jump or fire.

    After you've sent them using CrowdGaming.SendActionsToMainGame or SendActionsTo a singel action will be set to zero, automatically. The condition Has new data to send will check if the current actions string (action1+action2+action3+action4) is different from the lastActionStringSent OR is any singelActionIsActive.

    So with normal actions you constantly have to feed the game is you want to change the value but with singelActions you only send 1 (on) and then it resets it self. I wanted to spare the sending of a full actionsString then a singelAction went from 1 to 0 that's why I have designed it like this.

    This optimization and sending delta is mostly important when dealing with games like platformers etc. But with turn based game it is not important at all.

    For the two example controllers in the beta package I use:

    • platformer controller

    * Action1 = 1 (left), Action2 = 1 (right), SingelAction1 = 1 (jump)

    • joyStick

    * Action1 = 0 - 360 (angle), SingelAction1 (shot)

    Let me know if you have a case where you need to send more actions, in my mind it's hard when using the smart phone as the controller to have loads and loads of buttons, I think it needs to be pretty simple.

  • How do i communicate from the main game to a specific controller? eg: when a player gets hit, their controller flashes for example.

  • justifun

    Set action1 to hit

    use the send action to and set gamers.connId as param

    Then use on message, receiveAction1 = hit, and flash away

    here is an example using the space/joystick setup in the beta package:

    with this kind of setup you could pretty easily cover a great variety of use cases.

  • new release - beta 4.3, with minor updates:

    • Added camera object and removed scroll to on gamers.
    • Added event sheet for camera to zoom out and in depending on where the gamers are
    • Server - reinitialize game, when main game is restarted all the connections will reappear in the game. This will be useful for when moving from one game to another and keeping the gamers. Or when having time based games (matches) that restart. More to come on this.

    make sure to "update" the plugin and that you run the new server.js file.

    Check it out!

  • OneMuppet - I've been having a lot of fun playing with the Crowdgaming plugin.

    One issue i've run into using the scenario like in your example (where the main game is sending an "action" to all of the controllers, is that its not very reliable for the controllers to receive that command.

    You can see it the other way around as well, when the controllers are sending the information to the main game in the "space shooter" example you provided.

    If you count how many times you press the shoot button, and how many times the bullet spawns and shoots it won't add up. Especially if you click the shoot button rapidly.

    Is there any workarounds or solutions you can think of so that its a bit more reliable? I'm guessing lag is the issue, but you are the master behind this plugin.

    thanks! Keep up the great work!

    btw both 4.2 and 4.3 exhibit this issue.

    If it is indeed a lag issue, perhaps there's some clever way i can program something in C2 to solve for it?

    perhaps instead of sending a single action, i send it multiple times, but as soon as it receives at least 1, ignore the rest? I dunno, just thinking off the top of my head

  • with more tinkering this morning i was able to resolve the issue. In case anyone else is experiencing similar issues, it boiled down to not following the instructions laid on in the example project properly.

    wrong way: using a simple compare 2 variables (crowdgaming.onreceivedaction1 = "hit")

    correct way - it should be a sub event of a "on message" event

    eg: ->Crowdgaming On Message

    -(crowdgaming.onreceivedaction1 = "hit") -> do stuff

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