• 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
Lesan

Central server multiplayer: Will this architecture work?

4 posts in this topic

I am creating a mutiplayer turn-based tactical game played over the internet. The players will play duels against each other on a 2D small map with a small number of units, a game should take less than 30 minutes to complete.

In order to assure synchronization and to prevent cheating, the server will do all the calculations and will accept action request and send back results in terms of game board status.

I plan to have the server run continuously, with all the games currently in progress being stored in RAM. This will enable a much faster response rate as the server won't have to load the game board data etc. from the database. The server will only save the game report to the hard drive once the game is completed.

This means, of course, that in the event of server shutdown, all data on current games will be lost. That is no problem.

Still, I want to ask whether what I just described is a good or feasible model, or whether it cannot work. If it can't work, what can I do?
0

Share this post


Link to post
Share on other sites
It's the way I created three MORPGs. I actually had no idea that some people actually considered storing everything in the database rather than in RAM until sometime after releasing the third game.
1

Share this post


Link to post
Share on other sites
It depends on your projected load and how much hardware you can throw at this, really. How much data will an average game hold? How many concurrent games will you expect on average? What about peak values of these? You'll need to give a lot more detail before we could even begin to answer this question.

In the mean time, here are some generic thoughts:

With a large enough page file this could easily work, as active games will be in RAM and abandoned or slow games will be moved to make room for them. Whether the amount of paging will bring the server to its knees is another matter. If the game is CPU intensive then this obviously could cause issues. Having a per-game allocator that keeps all memory for a particular game in the same cluster of RAM pages could help in such a scenario, but may not be necessary.

The only way to know is to try it out; write a sample application and stress test it. See what is feasible, decide if that is what you can live with - and afford. The main thing is to have a scaling plan. What happens when you max out one machine? Can you application handle being spread over more than one?

You'll need to do cost/benefit analysis to determine whether it makes sense to implement scalability stuff now or not. For example, instead of directly saving the game report to the hard drive, if that is stored in a database then it should be easy to move this data off the primary game server. Indeed, multiple game servers could talk to a single database. While individual games would be tied to a particular server, the players win/loss record (and whatever else) remain consistent no matter which server they find themselves playing on. If your game never gets popular enough to require a second machine all development time put into scaling* is effectively wasted.

* I don't necessarily include "using a database" in "developement time put into scaling", because databasen have lots of non-scalability related advantages in terms of running arbitrary queries and ACID guarantees.
1

Share this post


Link to post
Share on other sites
[quote name='VBStrider' timestamp='1303394490' post='4801229']
It's the way I created three MORPGs. I actually had no idea that some people actually considered storing everything in the database rather than in RAM until sometime after releasing the third game.
[/quote]

For FPS and RTS games where there is only the one game and its over it doesn't really matter (though keeping a record of games is a good idea). But for games with progressive stat tracking you want the stats to persist after the next server restart. Databases are much better setup to handle this kind of thing then continuously trying to read and write from the hard drive of the computer running the server. There is no way a MMO of WoW scale could get by without using a database.
0

Share this post


Link to post
Share on other sites
[quote name='stupid_programmer' timestamp='1303497332' post='4801694']
[quote name='VBStrider' timestamp='1303394490' post='4801229']
It's the way I created three MORPGs. I actually had no idea that some people actually considered storing everything in the database rather than in RAM until sometime after releasing the third game.
[/quote]

For FPS and RTS games where there is only the one game and its over it doesn't really matter (though keeping a record of games is a good idea). But for games with progressive stat tracking you want the stats to persist after the next server restart. Databases are much better setup to handle this kind of thing then continuously trying to read and write from the hard drive of the computer running the server. There is no way a MMO of WoW scale could get by without using a database.
[/quote]

Well yeah, a database is used, but I don't write to it rather than to RAM every time something changes (same goes for reading). I store everything which is needed in RAM and sync to the database whenever the character leaves the game or something important happens, such as a level up.

On a related note, a database is just that: A database. I'm not sure how it would be excluded from existing on a hard drive (that is in fact where it exists in most cases in my experience).
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