Multiplayer Demo in C2

Show us your completed creations made in Construct 2

Post » Fri Jan 06, 2012 10:40 am

[QUOTE=SullyTheStrange] I gotta say, this looks really amazing. I also gotta say, I have no idea how it works or what you're doing. I guess your ultimate goal is to make it so accessible that even people like me can use it! Keep up the great work.[/QUOTE]

you know the drill...what he said - lol.

this sir, looks amazing. if you end up doing half of what you intend, this will open up incredible paths for more game types.

i could finally make that networked cavemen checkers game...lol.

in the words of the surgically enhanced north korean dictator, fencer and ice hotel manager...you can sleep when you're dead.
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Fri Jan 06, 2012 11:35 am

@talkinghead: This sounds very promising.
The "messing in runtime.js" part will indeed be a bit complicated for unexperienced users. But it looks like you majorly covered the documentation part and so this should go smoothly and painlessly for most users.

@arandaschimpf: The better place to start is the manual SDK. This is progressive, have good links to learn about JS with references and guides.

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Jan 06, 2012 2:12 pm

Hi talkinghead, good work on the demo. Do you know how big is the lag? Judging from the new video it looks like something around 100ms (or 80 - 160 ms), which is ok, but how it changes if you join more than 2 players?
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Fri Jan 06, 2012 2:14 pm

The first multiplay concept I've seen since my start out here with C2. Hope it all goes to plan and works out, looks good so far!
B
7
G
1
Posts: 2
Reputation: 969

Post » Fri Jan 06, 2012 6:55 pm

i'm loving this because i would like to make some card game and turn based board games. so lag is of no matter to me. just being able to network two or more players for a game, and allowing them to interact is gravy on my potatoes.
but i definitely understand, for people doing more action type games, they would want it as lag-free as possible.
but if i can hook up players with this, then cavemen checkers...is a go - lol.harrio2012-01-06 18:56:55
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Fri Jan 06, 2012 6:56 pm

[QUOTE=harrio] i'm loving this because i would like to make some card game and turn based board games. so lag is of no matter to me. just being able to network two or more players for a game, and allowing them to interact is gravy on my potatoes.
but i definitely understand, for people doing more action type games, they would want it as lag-free as possible.
but if i can hook up players with this, then cavemen checkers...is a go - lol.[/QUOTE]

what he said...harrio2012-01-06 18:57:09
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Fri Jan 06, 2012 7:19 pm

@talkinghead This is excellent! I have been looking and asking about this since I've joined C2.

I am actually doing some testing today using socket.io & node.js but it looks like you are leaps and bounds ahead of me!

Can't wait to try this out! Are you running this on Linux or Windows?

The file system formatting is different for Linux & Windows backslash vs forwardslash - so projects with links to sub folders don't port well to windows.   

I am currently using Ubuntu and Windows 7 to run Node.js.

I have a post response here on how to setup Node.js on windows.
http://www.scirra.com/forum/set-a-websocket-server-that-is-compatible-with-c2_topic47632_page2.html

Also here is a little hack to get NowJS running on windows natively.
http://blog.nowjs.com/running-nowjs-natively-on-windows

Looking forward to see how you put this together!

This reminds me some of your video demo:
http://liveballs.nodejitsu.com

mars19852012-01-06 19:46:27
B
9
S
2
G
5
Posts: 54
Reputation: 3,546

Post » Fri Jan 06, 2012 8:37 pm

@talkinghead Really cannot wait for this!!! It's gonna be amazing to make my first multiplayer game!!! :D:D:D:D <---- Excitement :D:D:D:D
B
8
S
2
G
4
Posts: 55
Reputation: 2,555

Post » Fri Jan 06, 2012 9:03 pm

Damn this marks a really important step on C2 ascension :D Great work !! It opens a lot of new possibilities for us all :D
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Sat Jan 07, 2012 5:58 am

Hey everyone, thanks a lot for the encouraging replies! I really do appreciate this a lot!

Sorry for not being around the last couple of days, I was just so busy at work. Also haven't managed to progress a whole lot, plugin development wise. Will probably start working on the plugin from around Tuesday on, with the intention of releasing everything in about 2 weeks (hopefully, by that time, all will be a lot more stable).

I'm gonna try to answer everybody's questions now, so brace yourself for a wall of text. lol

@smitchell
This is indeed possible. However you will need to do a fair bit of coding, server side.

@arandaschimpf
Thanks. A good starting point might be Mozilla's Javascript Guide: https://developer.mozilla.org/en/JavaScript/Guide
Having the basics down will help out a lot, from there on its just a matter of phrasing your question the correct way and asking Google or Stackoverflow.

@GenkiGenga
Thanks for the kind words! Yes, you understood correctly. In essence I'll just provide an infrastructure, a framework so to say. I'll probably build in some more functions apart from "call function" and "receive response" that will hopefully make your life a lot easier as I go along. But essentially yeah, it's just a "two action" plugin and you will need to modify the runtime.js file as well as of course your server coding itself.

@Kyatric
Glad you like it! Extensive documentation is the plan, so hopefully it'll make the whole experience a lot smoother.

@Noga
Thats fairly hard to asses tbh. Firstly, node as well as nowjs are non-blocking and can handle events asynchronously. Node by itself is designed to handle maximal server load fairly efficiently. Node for example is a lot faster than Apache (maybe not the best example, but just for the sake of it), can handle a lot more requests and greater server load at the same time. However, node is of course more resource intensive. Nowjs is essentially a socket.io wrapper, so it will achieve more or less the same performance (however, keep in mind that nowjs is written and optimized towards real-time applications/games).

Another huge advantage of node is it's "out of the box" optimization. This matters greatly, because with node one doesn't need to embark on low-level concurrency optimization and can instead just write server code and deploy, most of the functionality will work out of the box.

That being said, a lot will depend on your server as well as your game/server code and nothing can be easily determined without a working demo or a specific test case. Some further reading that might be of interest:
http://blog.3rd-eden.com/post/5809079469/theoretical-node-js-real-time-performance

@harrio
Cavemen checkers is indeed a go. Oh and:
[QUOTE]in the words of the surgically enhanced north korean dictator, fencer and ice hotel manager...you can sleep when you're dead.[/QUOTE]

I think "what he said" has never applied more as it does right now haha.

@mars1985
Actually, the most recent stable release of node as well as npm comes with a native win binary, so no need to hack around with cgywin (at least thats what I used to do). Just download the exe installer from node's homepage, install everything. Open up cmd, type "npm install now" and you are good to go.

In regards to backslash vs. forwardslash, it is always recommended to go the unix way, so always use "/" whenever you can. Firstly, node will always normalize paths and windows itself has had support for "/" since forever (well, at least since winXP that is).

@Kiyoshi
Glad you are as enthusiastic about this as I am! Hopefully, this will allow for a ton of new content to come out of the C2 community.


Also, I just wanted to mention that I'll be including the following projects with the plugin (this includes server code, C2 files as well as modified runtime.js files).

1. "Hello World" (of course haha)
2. A real time game (most probably a clone of pong)
3. A turn based game (probably a simple multiplayer card game)
4. A couple of smaller projects
5. ??? (requests are welcome, as long as its not overly complicated)

Right, thats all for now. I've gotta run out and get some work related coding done (on a Saturday no less... but well, it's crunch season haha). Updates will follow.

Cheers everyone!
B
6
S
1
G
1
Posts: 23
Reputation: 833

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: corporatedrone and 1 guest