Databases In Games - Is this the future?
I have this idea - but I never hear anything about it...
When a game grows in size, and especially in users - like Massive Multiplayer games, using an array for 100.000 accounts or more, is not really effective.
Assuming memory is big enough (including virtual mem), the biggest problem is searching this array.
The most logical solution I think must be a professional database.
Are there already games out there using SQL or something like that? If so - why do you never hear anything about that?
Or am I just totally wrong?...
don''t people usually just use linked lists or trees for things like that?
Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
no
when working in the magnitude of hundreds of thousands of objects, you simply Must use advanced database''s for storage and retrieval.
SQL is a popular meathod used.
Just because the church was wrong doesn''t mean Galileo wasn''t a heritic.
It just means he was a heritic who was right.
when working in the magnitude of hundreds of thousands of objects, you simply Must use advanced database''s for storage and retrieval.
SQL is a popular meathod used.
Just because the church was wrong doesn''t mean Galileo wasn''t a heritic.
It just means he was a heritic who was right.
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
February 23, 2001 03:11 PM
Ugh NO! Far too much overhead, and the SQL search engine is gonna eat memory too! a simple binary tree would do the job and is reasonably efficient... best case a search of a binary tree with 100,000 enteries is about 17 "steps" (where a step is get entry, check key ,find next path).
Secondly anything MMO is going to be on a FAST machine, or several (very likely parallel processing) with a HUGH HDD & Tons of memory. So searching isnt exactly going to take a long time. (besides I suspect some of the data will be on the clients machine as opposed to the server....)
Secondly anything MMO is going to be on a FAST machine, or several (very likely parallel processing) with a HUGH HDD & Tons of memory. So searching isnt exactly going to take a long time. (besides I suspect some of the data will be on the clients machine as opposed to the server....)
Heya Bas
Yes, for MMOG you will need a database, You don''t have to use SQL, though it''s pretty easy....
The reason you need a database is that data integrety is VERY important, you have ALOT of players and info to keep track of, if your server crashes (null pointer maybe..) you won''t loose everything..
For speed you could also write a caching mechanism for the currently online players..
Yes, for MMOG you will need a database, You don''t have to use SQL, though it''s pretty easy....
The reason you need a database is that data integrety is VERY important, you have ALOT of players and info to keep track of, if your server crashes (null pointer maybe..) you won''t loose everything..
For speed you could also write a caching mechanism for the currently online players..
SQL is slow and inefficient. It is practical for keeping a database in an office where the speed of the application is based on how fast the user types in a query. However, in a game, a DB is TOO SLOW.
As was stated, a binary search tree (BST) is good because the length of the search is logarithmic and not linear. Another idea is to use a sorted array (assuming you are not deleting and inserting that much). On a sorted array, you can use a binary search. And since you are using an array, you don''t have the overhead of pointers as you do in a BST.
As was stated, a binary search tree (BST) is good because the length of the search is logarithmic and not linear. Another idea is to use a sorted array (assuming you are not deleting and inserting that much). On a sorted array, you can use a binary search. And since you are using an array, you don''t have the overhead of pointers as you do in a BST.
SQL is only 1 way to access data from a database
There are DB apis aswell!
If you build a good caching model, you would only have to retrieve / store data in the database a few times..
There are DB apis aswell!
If you build a good caching model, you would only have to retrieve / store data in the database a few times..
Oh.. ermmm dominion and utopia have over 40000 players...
Though theyt are different kinds of games
Though theyt are different kinds of games
But what if around 10.000 players are all online at the same moment...1 server would not be enough...data must be shared...locking...huge virtual memory, like harddisk size...
And of course backups or direct saving - to quote Jrz.
People are not happy when you lose their accounts.
Isn't using trees and even more complex datastructures and above what a database is good at. (not to say best at)
To be honest - I don't really like databases. But I'm getting the idea I should better start liking them...fast...
But if a dbase is the only solution - why do you never hear ANYTHING about them. Are there any articles on the inet? (in combination with games of course)
Is there ANY info somewhere how Everquest does it?
I get the idea this is a completely new area of game development.
Just hope it isn't the twilight-zone. (Reminds me: Braindead movie starts in half an hour )
Edited by - BasKuenen on February 23, 2001 5:34:14 PM
And of course backups or direct saving - to quote Jrz.
People are not happy when you lose their accounts.
Isn't using trees and even more complex datastructures and above what a database is good at. (not to say best at)
To be honest - I don't really like databases. But I'm getting the idea I should better start liking them...fast...
But if a dbase is the only solution - why do you never hear ANYTHING about them. Are there any articles on the inet? (in combination with games of course)
Is there ANY info somewhere how Everquest does it?
I get the idea this is a completely new area of game development.
Just hope it isn't the twilight-zone. (Reminds me: Braindead movie starts in half an hour )
Edited by - BasKuenen on February 23, 2001 5:34:14 PM
Just jumping in here...
There is a thread in the Multiplayer Programming forum ( Need Ideas for saving info on an MMORPG ) that may be of interest to everyone in this thread.
One thing that I feel needs to be addressed is memory management. List and trees in memory tend to become fragmented over time... these ADTs should be placed in their own heaps. Not only does this limit the fragmentation but it also protects memory corruption... effectively your heaps are safe from being overwritten by other ADTs.
Articles that I have located, on the web, that deal with memory allocations, etc...
Overload New to Reduce Memory Fragmentation
set_new_handler
Using Scalable Features and Conquering the Seven Deadly Performance Sins
and the previous installment
PageHeap1.exe Finds Heap Corruption and Memory Errors
David [Dak Lozar] Loeser
Edited by - Dak Lozar on February 24, 2001 3:24:14 AM
There is a thread in the Multiplayer Programming forum ( Need Ideas for saving info on an MMORPG ) that may be of interest to everyone in this thread.
One thing that I feel needs to be addressed is memory management. List and trees in memory tend to become fragmented over time... these ADTs should be placed in their own heaps. Not only does this limit the fragmentation but it also protects memory corruption... effectively your heaps are safe from being overwritten by other ADTs.
Articles that I have located, on the web, that deal with memory allocations, etc...
Overload New to Reduce Memory Fragmentation
set_new_handler
Using Scalable Features and Conquering the Seven Deadly Performance Sins
and the previous installment
PageHeap1.exe Finds Heap Corruption and Memory Errors
David [Dak Lozar] Loeser
Edited by - Dak Lozar on February 24, 2001 3:24:14 AM
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement