Jump to content

Technologies for a small multiplayer game


joerrey
 Share

Recommended Posts

Hey everyone,

 

i'm building a small idle game (like http://www.kongregate.com/games/junjo/idle-farmer) and want to include a small multiplayer part. Some kind of bonus to stat xy if connected to and playing together with a friend.

So no realtime issues or hard network stuff i think. Admittedly i have no experience with networking.

 

Also i thought about most of the code to run serverside to prevent cheating. So there is just visualisation and user input on the clientside.

I this a realistic goal considering server costs and programming effort? Is this even necessary?

 

 

I'm familiar with C and Matlab and also made some simple stuff with JS and Phaser. 

 

 

After reading a lot of threads i decided to move on with

 

- node.js and socket.io for the server and communication

 

- MongoDB and Mongoose for my database

 

 

Should this be working for me? There are so many alternatives. I picked those for a common reason: i don't have to learn (yet) again a new language, since i just learned JS.

On the other side, i very often read about "standard" PHP, Python, Ruby and MySQL. 

Link to comment
Share on other sites

Hi @joerrey, this is exactly why I wrote eureca.io library, it's a nodejs package that make client/server communication transparent.

I wrote a tutorial on how to use it with phaser to make a simple multiplayer game http://ezelia.com/2014/09/tutorial-creating-basic-multiplayer-game-phaser-eureca-io/

 

but for simple client/server communication you can check my tchat tutorial on the official web site http://eureca.io/

 

 

for data storage, MongoDB is good, especially if you need to check players proximity so you only send updates to players inside a given region (MongoDB provide native 2d geographic search)

 

Link to comment
Share on other sites

I think Mongoose is overly complicated for what you're describing, I'd go with mongoJS instead. Not a big difference, just easier to set up and use - fewer advanced features (e.g. Joins), but it doesn't sound like you'll need those.

Link to comment
Share on other sites

Hey joerrey,

 

 

 

 

So are you planning on using your own backend? Where do you want to host your game ultimately? on some platform website or do you want to make your own website/app for it?

socket.io is def interesting. ruby can be good if you want to preserve yourself from coding authentication stuff and other things like this.

Link to comment
Share on other sites

I'm not sure about the hosting options. As far as is can see, hosting on platforms like Kongregate supports the frontend and some backend feature APIs for authentication, chat, scoreboard and microtransactions, which is all really nice and saves a lot of work. Plus there is a huge fanbase...But still i have to host the game + Database on my own server.

 

So, I guess I need to build my own backend. Are there other options? Any suggestions?

Link to comment
Share on other sites

for small loads, and if you have some server knowledges, you can run your own nodejs instance on a VPS or dedicated server.

and with some tweeks you can support load.

I'm considering to write some tutorials on how to configure a self monitored nodejs server for HTML5 games, just don't have enought time for it right now :)

Link to comment
Share on other sites

I really would appreciate this :)

 

For now I'm considering to continue development for the clientside, as my server experience and knowledges are zero.

As Node.js is also based on JS, i hope it wouldn't be that big of a deal to change it to serverside later on, when I got all this server stuff into my head.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...