Jump to content
  • Advertisement
Sign in to follow this  
whitee115

memory capacity for game objects

This topic is 4835 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

i have a question that i hope isnt too difficult consider multiplayer online rpgs like eq, ultima etc. There are a bunch of 'things' in the game, ie characters, houses, swords, potions, etc. Lets say each of these things is represented by subclasses of some 'GameObject' class. So for each instance of these gameobjects, you are storing information about the particular object's id, name, health, abilities, permissions, etc. You are not neccesarily storing graphics info etc. but rather just info about the object. Some of these objects may be 'active', and active object may refer to other objects when they update. The easiest way to manage these objects is to have one big list of the objects in memory. The list can be searched based on objectid, and updates can be performed by sequentially going through the list calling gameobject.update(). However, in such games there may be hundreds or thousands of game objects. Is it totally out of the question to keep every object in memory -- would that just take up too much RAM? My common sense tells me there has to be some mechanism to bring in object data from storage only when it is needed. Am I wrong about that? Do games like eq keep info about EVERY gameobject in the world in-memory at all times?

Share this post


Link to post
Share on other sites
Advertisement
Game objects don't really take up that much space when they're just objects and not media. Even if the objects are massive [1k a piece] they could still hold more than a million on heafty machines with gigs of memory.

That said, most EQ sized games seem to have more than even a few million objects, and probably have some mechanism to push/pull from a database. You might want to look for a few open sourced MUDs, similar numbers of objects there.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
Game objects don't really take up that much space when they're just objects and not media. Even if the objects are massive [1k a piece] they could still hold more than a million on heafty machines with gigs of memory.

That said, most EQ sized games seem to have more than even a few million objects, and probably have some mechanism to push/pull from a database. You might want to look for a few open sourced MUDs, similar numbers of objects there.



Thanks for the input tel- for the eq-sized games, are you under the impression that the objects are being serialized to the database, or is the info actually stored in more traditional tables with a defined schema/columns for each attribute?

I've grappled with the idea of putting the data in a DB, but im concerned that it doesnt give me the flexibility to create new object types and modify the classes if I need to define rigid table schemas in the db

Share this post


Link to post
Share on other sites
I imagine that it's more traditional.

I am not certain though, as I try to avoid databases as much as possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!