talkinghead's Recent Forum Activity

  • 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: 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:

    blog.3rd-eden.com/post/5809079469/theoretical-node-js-real-time-performance

    harrio

    Cavemen checkers is indeed a go. Oh and:

    n the words of the surgically enhanced north korean dictator, fencer and ice hotel manager...you can sleep when you're dead.

    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!

  • septeven

    Really nice post mate! Great idea!

    Currently, I'm most interested in the multiplayer aspect of things. You can have a look at what I've done so far over here: http://www.scirra.com/forum/multiplayer-demo-in-c2_topic47724.html

    Cheers

  • GenkiGenga rexrainbow

    Thanks for the kind words guys, I really appreciate that.

    Kyatric

    Haha, you are too right. I'm prone to being affected by the "feature-adding" syndrom as you call it. Ha, but no worries, I'll release it as soon as I can.

    Here's a little bit about the design of the plugin (suggestions are welcome):

    So as I've mentioned a little bit of coding knowledge will be required. Fortunately, we are dealing with javascrip so nothing too complicated. So basically, nowjs works in the following way.

    Lets suppose you have a function called receiveMessage(msg) on your server. To make it accessible to the client (the player that will be participating in the game) you will have to put the prefix "everyone.now." in front of it. So your function turns into "everone.now.receiveMessage(msg)". To access this function from the client (speak, from your HTML5 application) you simply call it with "now.receiveMessage("Your message goes here")".

    The same thing of course works the other way around.

    Now, CS2 plugin wise this would be very difficult to implement without limiting the potential of nowjs. To make it really simple I could just "hard-code" a couple of functions into the plugin and whoever uses it will be able to call them (like for example receiveMessage, registerPlayer and so on). However, I feel like this would be the wrong approach, as I really don't know which functionality you guys are interested in the most.

    So I feel like doing the following:

    Firstly the plugin/behaviour will have two core actions: "call function", "receive response". Now "call function" will just call a function that you yourself have defined already. This would involve a couple of modifications to the runtime.js file of the plugin. I know this might sound a little complicated, but thats why it's taking me a little longer to release this and make it accessible to everybody.

    Everything will be fully commented and explained. I'll also include around 10-20 examples of C2 project, plugin modifications + server codes as well as point you to some comprehensive resources in case you get stuck.

    So that's the plan for now. What do you think?

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Jesus... I've almost managed to miss work cause of construct... Somebody is getting a little obsessed lol.

    Kyatric

    thanks for fixing that link mate, I must have been a little sleep deprived earlier... Feeling better now after a cup of coffee. And lol Jeff Buckley. No that's the star child himself there, mr. David Bowie.

    As for the recording soft, I use camtasia studio which is unfortunately not freeware. Just had a license from way back which I have been recycling and moving from computer to computer.

    SullyTheStrange

    Thanks! Well some coding knowledge will still be required I'm afraid (until someone makes a construct for network coding that is). However, I'll try to keep everything as simple as possible.

    So yeah, going back to the job... Will probably work on the plugin during lunch break. I'm thinking, with nowjs working, introducing some type of ingame store/purchasing functionality might be nice. I'm gonna take a peek at a couple of solutions later on.

    Cheers

  • Updated post with new video!

  • Joshua

    Spaceport looks very promising, thanks! I might just give it a try some time. Roar engine can be combined with construct, as it's simply an API to "socialize" your game (I guess leaderboards, in game shopping, etc.). All about accessing their online API then rendering the response, then adapting this data to your game.

    More generally speaking, yeah social games can be created in construct, however not natively... Shouldn't be all too difficult though with good, working knowledge of JS as you can write your own plugins and so on (tha a look at now.js: http://nowjs.com)

    "Never trust the client" as they say haha. Anything on the client side can be exploited, manipulated, etc. Is it a single player game? Easily hackable and there's really nothing you can do about it. Multiplayer? Make your server the end authority point and validate each and every request (still, cheaters will be cheaters and cheating will still happen).

    Cheers

  • You'd open yourself up to malicious attacks if that were true. So it's in place purely for security reasons, as browsers running JS for example could be easily exploited otherwise.

    Anyhow, I've kinda given up on the awesomium idea for now... While certainly one of the best frameworks out right now, its sadly just not there yet. Managed to write a wrapper for it, also managed to build in an automatic local server deploy, however it all feels rather unstable. There are constant sound problems, occasional problems with catching mouse input, lag at times and the list goes on...

    I'll be waiting for their next stable release as it is said to eliminate the sound issues and some more stuff... So yeah, guess we'll just have to wait and see...

    Cheers

  • 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

  • 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

  • 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

  • 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

  • I personally love the style!

    Really nice work.

    Cheers

talkinghead's avatar

talkinghead

Member since 31 Dec, 2011

None one is following talkinghead yet!

Trophy Case

  • 12-Year Club

Progress

12/44
How to earn trophies