Multiplayer Demo in C2

0 favourites
From the Asset Store
Demo Game Multiplayer Online with member registration system
  • Hey there,

    here's a little demo of my multiplayer implementation done in construct 2.

    Update [05/01/12 - NowJS]:

    http://vimeo.com/34595294

    After a sleepless night, I've finally finished recoding my main nowjs functions. All client/server communication is now running on Nowjs and I must say I'm very happy with it. Accessing client/server function directly from client/serve is very, very useful and allows for rather fast development.

    I've added a chat/notifications system as well as bullets! Have a look at the video above to find out more.

    As far as the plugin/behaviour is concerned there's still a lot of work left. I'd like to make it as accessible as possible to newbies and pros alike, so I'm working on writing out some generic functions which then could be used in many games/on many server setups!

    Anyhow, next I'll be working on an interactive world, highscores/scoring system as well as some basic gameplay. Stay tuned!

    http://vimeo.com/34491260

    Sorry there's no playable version yet, but hopefully I'll have it up soon enough (I'd like to introduce some type of registration system first, a chat and some actual gameplay).

    This little game will be based on "I Have No Mouth And I Must Scream" by Harlan Ellison (a brilliant little story, definitely worth a read if you haven't read it already!), but more on the story/gameplay some other time...

    Networking wise, I'm using a socket.io v.0.8 implementation to send/receive/broadcast events to the server (the server is running on node.js btw). The game essentially runs on the server, thus preserving game state without the need to worry about clients/loss of state. I'm also experimenting with some data-compression techniques right now to eventually save bandwidth and so on.

    Here's a short-term TO-DO list for now:

    -Registration system

    -Chat

    -Destructible game world

    -Basic gameplay

    I will also try and release all of the plugins as well as the server code as soon as I'm somewhat comfortable with the project/have cleaned up my spaghetti code.

    So stay tuned guys, any questions/feedback are very much welcome!

    Cheers

  • "The game essentially runs on the server" is a good idea to prevent cheat and sync problems, however it will increase the gap of game development, since the logic is not in C2(clients).

    That's why kbdmaster will ask a server which can be created in C2.

  • Nice video.

    It seems to work very good on local. Have you some lag compensation measures planned nevertheless ?

    And what plugins did you make ? (You made your own implementation of socket.io but what else did you make ?)

    Anyway, good job, keep it up.

    This will be nice having this around.

  • Nice quick progress Talkinghead!

    All aboard the multiplay train "Wohooooooo"

  • rexrainbow

    Servers created in construct would rock man :)

    Kyatric

    Thanks mate. We'll I've tested it out on my remote linux box and it seemed to run fairly well... That being said I haven't really done much latency-prevention wise, apart from the pretty basic that is. Keeping an array buffer with previous character states on the client helps with synchronizing with the server (say client's state differes from server's state->server remains end authority->current client state gets reversed to previous client state). A circular buffer would serve this better than an array though, I'm working on a plugin for this now (which will also be released).

    Apart from that. Here's something rather interesting: nowjs.com

    I might try working on this tomorrow, wrapping it up in a plugin, and see if this could potentially replace the sockets model. Sounds very promising that's for sure.

    GenkiGenga

    Haha, thanks GenkiGenga

    Anyways, I'm going back to coding this, will take a look at nowjs and see if this could be implemented easily.

    Cheers

  • talkinghead

    nowjs.com seems amazing, nice job.

  • How cool would that be if C2 had a nodejs exporter, allowing to code the logic in C2, but still export as/to a web server in the end ?

    It's probably not for any time soon.

    As for nowJS it looks interesting, but will it be possible to implement it as a plugin with a shared workspace in the sealed C2's SDK ?

    And also, how will it behave for action games ?

    I'm curious what the result of your experimentations will be.

  • Warcraft3 is a multi-players game, I had used it's game editor before (just 3 months). In the editor, designer does not need to know which part is server/client, moreover, designer does not need any network knowledge. (The same as in editor of starcraft2)

    Could we make a network plugin that any fool can use like the editor of warcraft3?

    Well, I know browser can not be a server, so there is a big different between html5 with general socket application. So it's not easy...

  • Hello. Amazing work, can't wait to make my own game multiplayer :)

    NowJS seems nice BTW.

    My first multiplayer test was made in AJAX, and worked quite well in local but only saved player position. Also, it was ways too heavy.

  • Kyatric

    Just tested out nowjs by writing a really, really (really) simple plugin that allows you to define a nowjs function (or several nowjs functions for that matter) which can then be called from the server or vice versa. I'm pleased to say that everything is working as it should be!

    So now the next step is simply expanding on this. I'll be working on fleshing out this plugin little by little. Next, synchronizing variables with nowjs and stuff like that. Very excited about this, opens up many new doors (sockets are a bit cumbersome after-all). Hopefully I'll be able to pub a new video by tonight (and of course the plugin itself some time this month haha).

    rexrainbow

    I see what you are saying, then again, it's better to just learn some things. I mean sure, warcraft 3 editing might be a complex procedure however you can more or less have a "walled-garden" approach development wise. As you only need the editor to perform one (or several limited) goals. With servers and networking thats... well that's a whole other level, but I'm sure you are aware of that.

    Morhaus

    Thanks mate! I'm hoping that we'll be able to expand C2's functionality tenfold. It's certainly an amazing product. So, the base is there, up to us to make the best out of it!

    Cheers

  • Sounds good. Looking forward to see more.

  • Sounds good. Looking forward to see more.

    what he said...

  • ervers created in construct would rock man :)

    What he said :)

  • Save the Cakes!

    What he said.

    Lol just wanted to bump this - I bet your a busy man talkinghead, no pressure to finish quickly. Just supporting!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bet your a busy man talkinghead

    What he said!

    Haha, just continuing the trend.

    GenkiGenga & Kyatric & everybody else

    Thanks for the support!

    Got a minute to write a quick update now (late lunch break, hehe). Ok, so what I've managed to do so far is to get nowjs working. So now I can access object properties (for example the players properties) directly from the server (well thats of course an illusion as far as actual access goes, but yeah its a lot faster/easier than sockets).

    I've wrapped the whole thing into a plugin/behaviour. The plugin is there for global operations (such as authenticating with the server and for example registering your username) while the behaviour is there to access object properties from the server. Currently rewriting my original multiplayer test + adding new things, I'm hoping to publish a video update tonight and get the plugin/behaviour up sometime next week. But who knows, so busy at work right now...

    Anyhow, I'll keep you guys updated,

    Cheers

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