• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Spidyy

Network architecture discussion for a mobile game

7 posts in this topic

Hello everybody.

 

I'm working at this time on a personal multiplayer android game project, involving robot battle like the ones in animes. It is a work on at least 1 year for commercial purpose.

 

I'm writting most of the compoung of the game, inspiring from irrlicht for the 3D part, SFML for the system and network part and I'll use FMOD for sounds and Bullet for physics.

 

My concern here is for the network part. I didn't made any MP game on my own, but I got solid concept and ideas from my previous job in a game company.

 

The plan!

 

Here is what I've planned so far for networking :

 

I'll have 4 entities to manage in my architecture :

- Multiple game clients

- Multiple dedicated server instances

- One master server

- One database (with timed backups)

 

I planned to manage the game like World of tanks, meaning :

- Each client only display the game in its current state and send player inputs.

- Each dedicated server manage physics, game states and player input altogether.

- Each dedicated server send resulting game states to the client on regular basis and more immediate game events (death, shots, impact, end game)

 

World of tanks is a PC game and allow 30 player by match, I'll restrict my game to 8 player per match to reducec networking traffic and CPU usage of the devices.

 

The master server will manage the client to dedicated server connection and usage, game statistics and player accounts.

 

The database will store the player accounts, match result and player assets as robots frame and customisation.

 

Now what?

 

I have my plan, but how to put it to use?

 

My issue is, I have no solid server-side knowledges to construct all this. I can't even know if my idea is viable, so here I come :

 

I want to know : Do you have some good books, tutorials or examples about the kind of architecture I'm doing? I don't even know how I'll implement the dedicated server instanciation, connection and run from the master server. :/

 

I want to expect : What kind of issue I should face with this kind of architecture? Do you have some technical numbers to share, like an acceptable amount of data to transit from the mobile device to the server? Among this number, what can 3G support? What can Wi-fi support?

 

I want to do : To send all the data, I'll need a solid contract with some network provider for a good bandwidth, but what about the server itself? Would it be better to buy my own rack so I can act directly on it, or should it be better to rent a server in a profesionnal company with all the technical support? Also, what about the database? What would be a good RDBM, good to manage thousands of account, assets and stuff with good security without using too complicated SQL request?

 

I want to... Know more! : If you have had an experience like this, would you give me some more advices on aspects I didn't mentionned yet?

 

With regards,

Spidyy

Edited by Spidyy
0

Share this post


Link to post
Share on other sites
There is no comprehensive tell-all bible of networked game server development. If you want to reduce risk, you have to hire people who have done it before. There are lots of bits and pieces documented around the web, and the forum FAQ has pointers to many of them.
Beware, though, that there are different kinds of games where different solutions work variously well. What works for a real-time strategy might suck for a FPS. What's good for an FPS may be way too expensive for a RPG. What's suitable for an RPG is probably not what you want for a turn-based game. Etc.

Six players per server process sounds like you'll need a lot of server processes. Do you know what the hosting cost of a server process is? Do the economics of your game pencil out? Or will you use player-hosted servers?
0

Share this post


Link to post
Share on other sites

I understand I can't have an all cooked solution right now, that's why I ask so many question. tongue.png

 

The game is closer of an FPS game type, as you will have multiple actor shooting at each other and fighting for goals or objectives. Bullets will be manages as dynamic object, not as a simple raycast like most of the Call of Duty games.

 

I want the game logic to be computed on an owned server to reduce cheat tendencies more easily, so no player hosting, or only as a LAN using one of the players' devices. Max 8 player by game.

 

when I'm speaking about instances, if one process can be used for several games at once, I can tend to this solution.

 

Oh yeah, to be understanded well :

8 players will play a match,

each match will be hosted on a distant server owned by myself or rented.

the server will have to manage multiple match including collission and physics computation.

One match will be managed as a process on the server, that's what I named dedicated server upward.

 

So to be clear, by dedicated server, I was speaking about multiple program instances running on at least one physical server.

 

The master server is also one huge program having the role of an interface between the database, the clients and the match process.

 

I don't have any economic information right now. I just know I'll need at least two server (one master and at least one for match instances), but I might have some funds to invest in server hardware.

Edited by Spidyy
0

Share this post


Link to post
Share on other sites

...
The master server is also one huge program having the role of an interface between the database, the clients and the match process.
...

The entire architecture sounds reasonable, as far as it goes. It's the same kinds of large pieces that many other, successful games have used.
The devil is in the details, though :-)
0

Share this post


Link to post
Share on other sites

So let's go in the details.

 

First, quid of the OS. Right now, I'm setting up a netbook as a test server by installing linux ubuntu 12.10 desktop on it. I'll use a linux server, but what distribution should I use for the real thing? I readed that Debian based distribution are particularly good for game server, but it there a more specialized distribution for this?

 

Also, about the RDBM, I don't know wich one to chose. I'll need a secure and relatively fast for small table count and thousands of items (player accounts, usable items, statistics and achievements) I saw about PostgreSQL and SQLite, but I don't have a clue about wich one would be the most suitable. :/ Of course, I need it free for a start.

Edited by Spidyy
0

Share this post


Link to post
Share on other sites

what distribution should I use for the real thing

Any distribution you are familiar with. We use Ubuntu at work. I use Arch at home. Some people like Red Hat. Others like Gentoo.
A distribution that has a "server" install that doesn't install an X server and desktop environment might be a slight improvement mainly because it gives you more options for server hardware out of the box.

about the RDBM, I don't know wich one to chose

SQLite is a single-user database. It falls over in a multi-user or networked environment, even if you funnel all requests through a single access point.
PostgreSQL or MySQL are both fine at this point. PostgreSQL is a little more "correct" and MySQL is a little more "fast" but the difference isn't huge these days.
"thousands" of items is not a problem. Our biggest MySQL table at work has almost a billion rows (!)

Note that your security should be enforced at the application/game server layer. You should never let a client talk directly to a data store of any kind except for trivial cases where documents like binary assets can be fetched read-only by anybody. A SQL database is never a trivial case :-)
0

Share this post


Link to post
Share on other sites

You should never let a client talk directly to a data store of any kind except for trivial cases where documents like binary assets can be fetched read-only by anybody. A SQL database is never a trivial case :-)

 

Of course, I already planned to allow network communication only through small custom messages between client and server with encryption for critical data ( player's login/password for game connection...)

 

I'm glad I asked about SQLite, I was about to go for this one. :x If MySQL can manage billion rows easily, I'll go for the "correct" aspect of PostgreSQL. I could have used phpMySQL for database management, but I won't install an apache server or whatsoever and I want to minimize the access solutions to avoid leakage.

 

All that's left to search is how I'll program the server process instantiation to be able to manage the different dedicated server process from the main server application. :]

 

Thanks a lot for all those useful informations!

0

Share this post


Link to post
Share on other sites

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  
Followers 0