Multiplayers online game (MMO) | Architecture | Learning Path - unity3d

I want to learn game development.
I'm coming from Web, Desktop and Mobile Applications.
where is no really REAL-TIME programming.
And all architecture templates and life cycles is very different.
Now I have 1 idea for game. I don't know if this will very good game, but for first game my main goal is - Get experience
My game is online game with 2 players.
The players has cards (like in Clash Royal) and will player release the card - game need to do something.
Now question is in Architecture....
In applications that I made - all business logic was on SERVER SIDE..........
But If i understand right - here is Game on Players phone do all business logic..and server is just "message provider" ??
The second question is - If I have to use online service (like Photon) or build my TCP/UDP server.. (Its not so hard and for first game I think I can do it by myself)
UPDATED:
The main question what is resources I need to read for get more information about type of Architectures in Game Dev?
Thank you for your answers.

There is no RIGHT ANSWER for your question, as there are many ways to do an on-line game, and everyone have their pros and cons, like:
Host & Clients, where one of the players is acting like a server.
Authoritary Server, where all the logic is calculated on one side, and then update the others.
If you are working on Unity I recommend you to look the different network api's over there: Photon, Unet...
You can use the server services that Unet provides, or build your own system.
But one advise: don't mess with physics on on-line games, will be punishing.

Related

GPGS Unity Plugin - Network Latency Check & Synchronisation

I'm trying to develop a realtime multiplayer game in Unity using Google Play Games plugin. So far, it all has been pretty straightforward. I'm using a P2P architecture.
One of the issues I have is that the data I'm sending to players is time sensitive. I can use and send an unreliable message, but we know that no two players will have the same set of data or 'game state' at any given point. Is there any way I can synchronise my players? my understanding is that having even a client-server architecture will only help me synchronise players to a certain degree, but not completely. Is that correct?
My knowledge of networking, especially with Google Play, is very limited so if you can explain this to me like I'm five, that'd be great. ^_^

Unity5 - Make a server only for multiplayer game

I followed the Unity tutorial of an online multiplayer game (here), and the architecture is the following :
But I would like to have this architecture :
I would like to really separate the client part and the server part in an online game. I'm new with Unity and especially with online multiplayer game and I really don't know how to do that. I don't want the solution, but maybe idea of how to do that.
Thanks a lot for helping me.
I am surprised you didn't learn the Tut and post this question. obviously you can make separate server.
As unity UNet basic concept stated:
In the unity networking system, games have a Server and multiple
Clients. When there is no dedicated server, one of the clients plays
the role of the server - we call this client the “host”
Three Modes of UNet Multiplayer Game:
A Networking multiplayer game can run in three modes - as a client, as a dedicated server, or as a “Host” which is both a client and a server at the same time. Networking is designed to make the same game code and assets work in all of these cases. Developing for the single player version of the game and the multiplayer version of the game should be the same thing.
NetworkManager has funcions for entering each of these modes:
NetworkManager.StartClient()
NetworkManager.StartServer()
NetworkManager.StartHost()
Check UNetManager for more details
You can open a Unity instance as a dedicate server.
NetworkManager.StartServer();
However for current state of UNET you can only have 1 room per Unity instances.
Which mean if you want to open many game room at the same time it'll cost you a lot of hardware.
Run as headless mode (No GUI) will help you a bit but that's not enough (Currently I've done that on DO).
So my recommendation is don't use UNET if you want massive users on your game.

How can I implement multiplayer in my iphone game?

I want to create a playstation home style multiplayer game for iphone. How can I implement multiplayer in my project? Also, how can I give players a chance to chat? How can I let them create their own avatars to interact? I am a one man developer, with no access to servers. Maybe I can use iPhone game centre???
If you're looking for some kind of platform to build on, there is a product called SmartFoxServer:
http://www.smartfoxserver.com/
I have not used it, but it claims to provide a client API for native Obj-C or Unity3D. It allows for chat features.
If you want to roll your own, I recommend getting started with NodeJS:
http://nodejs.org/
GameCenter does not provide any kind of backend for multiplayer networking, at least not in the way you are implying. If you intend to build a networked multiplayer game over the internet, you most likely need some kind of backend.
Slicehost is a good way of getting a server like NodeJS running quickly and cheaply:
http://www.slicehost.com/
Don't forget that GameKit in iOS allows multiple devices to find each other locally (via Bluetooth or local Wifi) and create sessions. This might be a good starting point for your game. Here's some info on GameKit:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html
I think this would usually be done with webservice interaction against a server. You may be able to develop a webservice and pay a small fee to have it hosted by a web provider, or to use your own machine as (an unreliable) server while proving the concept.
Or you could just use Nextpeer - http://www.nextpeer.com
It makes adding online tournaments to your game real simple.
You can look at Gamooga (http://www.gamooga.com/).
Its a realtime communication platform for multiplayer games so you dont need to worry about building and deploying your own multiplayer servers. You can upload your own server side scripts onto Gamooga's cluster which receive and process your clients' messages. You can use Gamooga's iOS API with in your app to send messages from the client side to your server side scripts. You can download the SDK and look at the demos to start off.
There is a free plan of Gamooga platform too that you can make use of to start with.
Disclosure: I am founder of Gamooga, replying only since its relevant to the question.

Where do I start to implement a massively-multiplayer game on the Iphone?

I have a card game on the iphone and I really would like to take it to the next step by allowing players to interact with each other in real-time environment.
My questions:
Do I need a web server ?
Is there a third party specifically for iphone multiplayer games that I can use to host the game?
I would probably need a database - what is the best solution?
Should Apple push notifications be considered ?
First off, I have never done one myself, but I imagine that any massively multi-player game would entail some sort of central server to hold statistics (wins/losses), rankings, game table information, etc.
I imagine some sort of remote service providing server is required. A web server would certainly fit the bill and would most likely be the most logical solution, but certainly not your only choice.
Hosting of this service depends on the service you choose. If you're going the java route there are several places to look. Google's app engine, a straight up java web provider, amazon's cloud, etc. So many choices.
There are several open-source databases that would fit nicely with java. Postgres would come recommended by me. There are certainly others and other commercial options.
The server you use is bound to how fast the interactions with players need to be. The problem with HTTP would be that it's hard to have push notifications and it's also probably too heavy, depending on the type of game.
If it's in real time, but doesn't have a lot of interaction I'd probably use XMPP for the actual gameplay. If it's something where latency is more important, like a FPS or plataformer (actually any action game really) you'll probably need to roll your own protocol (and server obviously).
For the matchmaking a web server is enough.
Yes, you need a server for a traditional MMO, since an MMO is defined as a game where arbitrarily many people connect to each other. If you require people to be in the same vicinity, you can have an "ordinary" multiplayer game over the phones' wifi.
Doubtful. MMO servers require a lot of custom code. There are servers for high scores and such for more traditional games, however.
For your central database, this is entirely a question of preference. It sounds like cost is important to you, though, so I would go with MySQL since it's a free solution (and I think it's very nice to work with).
That depends on what gameplay will entail. If you're talking about a real-time game (like EverQuest or something), push notifications will probably not be helpful. If you're talking about something like Mafia Wars (is that the proper name of the Facebook one?), maybe.
I'd recommend looking at Parallel Kingdom, which is an existing MMO for the iPhone, iPod Touc and Android.

Getting started with Server applications

I have an iPhone game (Combination), and in the next version I would like to set up a server, where users (via the app) can submit which levels they have completed, and see how other users are doing. At this point I don't intend that users will need usernames and passwords, just a simple submit data, get back data.
I know very little about server-based language and databases, but I've heard lots of horrible things that can happen if you get it wrong. What would be the best system to design a simple, lightweight, secure database in?
How about having a look at Onyx Online or OpenFeint?
Onxy Online is from the makers of Trism, and they say, "the XBox Live Arcade ecosystem brought to the iPhone". I wrote this kind of system into Trism as a case study, and it's been a complete success. Since Trism launched in July, we've been hard at work adapting this online code for use in any iPhone game, and the results are stunning. What we're going to do is allow any developer to insert the Onyx code into their game, which will instantly enable online scoring, achievements, leaderboards, and customized forums."
OpenFeint is from the developers of Aurora Feint. From the press release:
"OpenFeint allows any iPhone game to add player profiles, buddy lists, walls, newsfeeds and real-time chat rooms allowing the game to build a real community around itself with ZERO operations overhead and minimal development time. OpenFeint consists of a server and a client. The OpenFeint Server is fully compatible with Google’s OpenSocial REST API and will be accessible through the OpenFeint client code library and sample UI code from Aurora Feint Inc. Indie developers do not have to operate the servers, which will be hosted Aurora Feint’s data center.
In a first for iPhone games, iPhone game developers will have the ability to reduce over 2 months of development work to 1 day, and completely eliminate back-end server operations, while offering their players an extensive set of customizable social and community building features:
Profiles: Players can upload an avatar photo or take one with their iPhone camera.
Walls: Each player gets a wall where other players can leave comments and view wall-to-wall conversations
Asynchronous Real Time Chat Rooms for meeting other players, sharing tips, strategies and experiences within each game community
Buddy List: Players can friend other players within their community or across the iPhone gaming community
Newsfeeds: Players can keep in touch with all of their friends’ activities (wall comments, actions in games, befriending people)
Global Community Chat Rooms for players to discuss recommendations, tips, and reviews of other games on the iPhone"
Have you used Java/C#/Perl/Python any other "server side language?" Are you going to be hosting the server-side yourself, or are you looking at hosting companies? Your decision might come down to how you intend to host your server-side stuff, and what capabilites your hosting company offers or what you are comfortable with.
Java or C# are really powerful server-side languages, but hosting these can take a little more work (and money?).
Java might be a good starting point, because you can setup Tomcat yourself and try hosting some web-services. MySQL is a good database to start with, but there are even more lightweight database alternatives. There might be a bit of a learning curve with any of these.
Have you heard of ICE touch? ICE is a middleware for network communication and has a basic persistence support. It supports every major platform:
iPhone as a client
Android as a client
Objective-C Mac OS X as client/server
C++ Linux as client/server
Java [any OS] as client/server
C#/C++, Windows .NET (with Silverlight) and native as client/server
I evaluated it some time ago and was surprised about its maturity, good documentation and example code. They name Skype as one of their customers.
As a start I would recommend to have a look at their example chat application. You can run a Java server, connect with your iPhone, your G1 and your Silverlight client and have a chat. Pretty impressive interoperabilty!
Here comes the drawback: GPL (you cannot link against it without being GPL yourself) or commercial (individual pricing).
I would also recommend you to use an online database service such as Viravis , DabbleDB or Zoho Creator. Almost all of these kinds of services have required integration capability to work with such a client as Web, Desktop, Windows Mobile or IPhone.
Java/Javascript is the defacto combo for most developers because of the Java support for every platform. Java Script has more than a few "issues"
The rest of the herd uses .NET (with its attendant 100MB run time bloatware that changes every 9 months)
php,pearl,ruby etc are good for server side, but if you want to use code, the best solution is probably C/C++ (or similar) and CGI/FastCGI.
This allows you to write communication algos once and use them on both ends. Any encryption/compresssion sim same.