Sign in to follow this  

Easy solution for authoritative server

This topic is 394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

 

I have been searching the forum, but haven't found fully satisfactory answer to my problem...

As you guessed I would like to dive into multiplayer mobile game development!

I am experienced in C++, Java, but I had not done any server programing.

I would like to start out with something small, but I would like to choose the right tool for a bigger project :)

Lets say, I would like to make a tetris game that 2 player can play against each other - after matchmaking - (both of them gets the same pieces, the first to bust looses).

My biggest problem is the server and the player data that i would like to store in a database.

My requirement with the server would be the following:

  • authoritative (the clients would only send in the moves (left, right,...), busted, etc.)
  • persistent data (user account, rank points, match history, etc.)
  • All the other goodies: Chat interface, app store integration, etc.

My question would be if there are any solution that combines all of these?

(I looked at Unity and PUN but none of them has the full story.

Starting from scratch in C++ seems like a never ending story with countless places to err. Am i right?)

 

Thanks for all the help!

Davcy.

Share this post


Link to post
Share on other sites

Starting from scratch in C++ seems like a never ending story with countless places to err. Am i right?

 
Yes, that's why games written in C++ traditionally have taken large teams several years to complete.
 
To my understanding, there's no magical tool that does what you want. There are companies that provide different levels of "game backend-as-a-service" facilities, like GameSparks, or Photon.

Share this post


Link to post
Share on other sites

Hi DavyC I'm currently building something like this myself and yeah doing it in C++ or Java seems like a nightmare.

 

But inspired by these videos from devs at UndeadLabs and Demonware

(Undeadlabs Moonrise server)

https://www.youtube.com/watch?v=_i6n-eWiVn4

 

(Demonware, Call of Duty, Guitar Hero, etc servers)

https://vimeo.com/26307654

I've decided to do so using Elixir (a ruby like language) on the BEAM VM (as used by Erlang). Which is proving to be much(much, much!) easier (after the initial learning curve around picking up a new language and learning the OTP).

 

Though unlike what's described Jamie's video above I'm not rolling my own user login, auth and chat server... I'm just writing my own reliable-UDP game server for "in game" gameplay networking which will IPC to an authoriative instance of the game (a headless Unity3d game instance for now) on the same box...

 

Then login, chat, admin management, etc will all be done with a bog-standard webserver famework like http://www.phoenixframework.org/. The game client can chat to the webserver via a simple JSON API over HTTP for these non-realtime-simulation needs, and admins can just log into webforms served up by the webserver ... And both the webserver and game server can connect to the same Postgres instance via Ecto ...

 

Or at least this is my plan :) I've only been working on it for about a week in my spare time now and already have my server accepting frames from the client, ordering them, ack-ing back to the clients... I think my biggest issue will be rolling my own networked physics in Unity (yeah I know Unity comes with it's own network stuff, but this is more a learning exercise).

 

Not sure if any of that was useful, but you really should check out Elixir, it's a great language and the OTP rocks at networking...I think i'd still be wresting with the basics in Java or C++ after a week of on and off tinkering :)

Edited by Guns Akimbo

Share this post


Link to post
Share on other sites

This topic is 394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this