CrowdGaming - your smartphone is your controller

Discussion of tools and resources for game developers

Post » Thu Jun 25, 2015 9:03 pm

@oldandgrey
Thanks! I had my answer in preview while watching tv so I missed that you answered. More options are good :)
B
39
S
9
G
4
Posts: 163
Reputation: 6,516

Post » Fri Jun 26, 2015 3:41 pm

@OneMuppet

Thanks! I just try it and it works fine! I was also able to play on my connected TV! (but the browser is shit and it was very laggy...)
BTW, hope I'll have some time this weekend to dig more to see how it works and experiment some ideas!
Great work! :D
B
6
Posts: 25
Reputation: 300

Post » Fri Jun 26, 2015 5:02 pm

Sorry if this is a dumb question but I'm curious why you are using a nodejs game server instead of the webrtc multiplayer plugin?
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Fri Jun 26, 2015 5:24 pm

@russpuppy
That is a great question! WebRTC was my initial choice. Unfortunately there is very limited support in the browsers on iOS for webRTC. There is a browser called Bowser that supports it, but the thought about CrowdGaming is that you should only need your smart phone and not have to download any specific app to make it work. Most smartphone browsers supports websocket, which is why I went with the nodejs websocket server. When the world is ready I'll look into doing this with webRTC :)

http://caniuse.com/#search=webrtc
http://caniuse.com/#search=websockets
B
39
S
9
G
4
Posts: 163
Reputation: 6,516

Post » Fri Jun 26, 2015 8:29 pm

@OneMuppet

Oh, that is unfortunate—I didn't know about iOS not supporting it because I've only been testing with Android. I hope iOS Safari gets on board soon.

So, next question. let's say hypothetically you wanted to make a game that anyone could download so they could run their own party game. With the nodejs websocket server do they have to set up nodejs stuff themselves or could they run a single executable to get the game up and running? Watching your video it looks like the host player would have to open the command line up to get nodejs going. Seems like that would be a complicated step for lots of users (if you were to distribute the game on Steam or something, for example).

Thanks :)
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Fri Jun 26, 2015 10:26 pm

@russpuppy

Hi,
I just try it, so I also asked myself this question but I think nodejs can be run with a .bat easily.

@OneMuppet
The question is more how to get user IP and modify the game to host the game on this IP and send it to the player (maybe via a QR Code). Also how to easily force windows firewall to open the needed port...
By now, you need to do this yourself, (modifying the capx file) so, on a standalone version, this need to be automatic and completly invisible for user.

I also wander, for a web hosted game, what kind of ping we can have with nodejs? with wifi connection and with 3GS... I don't know if this can be reactive enough for a platformer or a shooter game...

Some idea : In this version, the first device connected show the game screen, any other device connected after will be controllers. I wander if it's possible to add a button on the controller to switch to game view. So we can have several game screen and several controller, playing the same game.
Exemple1 : I play with 2 friends on my PC in my living room, and 3 others friends play in another room on another computer (like Team1 vs Team2)

Another idea would be to create different game view and different controllers.
Exemple2 : on a RolePlay game, 1 player is Master and have a specific controller (maybe specific game screen too), the other players play on a different screen (on another computer) with different controllers (maybe each player would have a specific controller with specific info, characters sheets, inventory, etc...)
That could be really fun ! The Master may modify the map in realtime, add PNJ, items, etc...
And each player may have his own character sheets, stats, inventory, secret objectives, etc.. maybe a chat between players to send secret message or exchange items...


Sorry to ask so many questions :) But I really think it has a great potential, cause many "traditionnal" board game or roleplay game can be "digitalized" using this concept.

Thanks for reading
B
6
Posts: 25
Reputation: 300

Post » Sat Jun 27, 2015 1:27 am

I have a three line text file saved with Windows word pad.
It looks like this...

cd C:\CrowdGaming Beta-v3
npm install nodejs-websocket
node server.js

I start the word processor and 'cut' then 'paste' into cmd.exe opened in administrative mode...
Adjust to suit your install. Have not tried it as a .bat file yet.
As development continues documentation will catch up to it.

WebRTC is still used by only a few browsers. Moreover, you need a specific web server. If that server
goes down for any reason your program will no longer function. Ability to run off the internet with any reasonably current browser is a defining feature offered by this innovation.

Co-operative games whereby players need the help of others to accomplish a goal is another way in which this could be used.
Last edited by rocky53204 on Sun Jun 28, 2015 2:02 pm, edited 1 time in total.
B
10
S
2
Posts: 11
Reputation: 582

Post » Sat Jun 27, 2015 7:35 am

@russpuppy
I think it could be possible to distribute the nodejs binaries together with your game, it's not something I've tried yet. If anyone knows more please share.

I also think that the NW.js exporter could be a good choice since we could start files from the OS with the nwjs plugin. Hypothetically we should be able to run a .bat file or equivalent On Start of layout in the "Start" layout and when running that bat command try to find out the ip (ipconfig) and then start the nodejs server (node server.js) then instead of having prodUrl as a static variable in the construct 2 project we could read this from a file which we modify in the start.bat with something like:
for /f "delims=[] tokens=2" %%a in ('ping %computername% -n 1 ^| findstr "["') do (set thisip=%%a)
echo %thisip%

So then the user would just click on the CrowdGaming.exe file from the NW.js export and everything would setup itself. That's just from the top of my head and that will need quite a bit of work and tuning to be streamlined but it should be possible.

I'll look into a bit more regarding the server pushing out messages, I'll probably rewrite the nodejs abit to make it more generic, so messages starting with p are interpreted as from p(layers) and messages starting with a s are from the s(erver) and if it comes from the server without specifying to whom it is for it will be interpreted as a broadcast message, that will be sent to all clients.

I'm also very interested in knowing if @Ashley are considering looking into adding binary data sending into the websocket plugin? What are the know issues and the reason it has not been added yet? With binary data it would be a lot easier to minimize the load sent between the controllers and the server.

Thanks for all the great ideas everyone keep messing around with the beta package and I'll send out an update when I have something new.

Next I will keep adding to the example game, making the server more generic and also add new example controllers. But it's great that people are thinking ahead about steam publishing and so on, it's always good to consider those things early.
B
39
S
9
G
4
Posts: 163
Reputation: 6,516

Post » Wed Jul 01, 2015 3:11 am

Trying version 3 beta - I run node server.js and adjusting the IP in the event sheet. Then after starting the construct preview, it starts the game but no logs are showing up in the command prompt window.

i tried disabling my firewall and also adding exceptions for port 50000, and 50001 like in the video.

doesnt seem to connect to nodejs

EDIT: ok im dumb. In case anyone else runs across this issue. Make sure you are running the "Start" layout first. duh. i was running the main game one.
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Thu Jul 02, 2015 12:20 am

OneMuppet says: "I'm also very interested in knowing if @Ashley are considering looking into adding binary data sending into the websocket plugin? What are the know issues and the reason it has not been added yet? With binary data it would be a lot easier to minimize the load sent between the controllers and the server."

Totally agree with that.. any news?
B
15
S
5
Posts: 40
Reputation: 1,221

PreviousNext

Return to Tools and Resources

Who is online

Users browsing this forum: No registered users and 0 guests