joerrey Posted September 7, 2014 Share Posted September 7, 2014 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. Quote Link to comment Share on other sites More sharing options...
d13 Posted September 7, 2014 Share Posted September 7, 2014 You could also consider these: https://www.firebase.com or https://parse.com Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 8, 2014 Share Posted September 8, 2014 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) Quote Link to comment Share on other sites More sharing options...
Gio Posted September 8, 2014 Share Posted September 8, 2014 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. Quote Link to comment Share on other sites More sharing options...
joerrey Posted September 10, 2014 Author Share Posted September 10, 2014 @Ezelia: wow, amazing! This is what i'm looking for. Thanks! @Gio: Thanks for the advice, i'll have a look at mongoJS. "Easier to setup" sounds good Quote Link to comment Share on other sites More sharing options...
Laurent Sigal Posted September 15, 2014 Share Posted September 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
joerrey Posted September 16, 2014 Author Share Posted September 16, 2014 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? Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 16, 2014 Share Posted September 16, 2014 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 Quote Link to comment Share on other sites More sharing options...
joerrey Posted September 16, 2014 Author Share Posted September 16, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.