Jump to content
  • Advertisement
  • 06/19/01 11:25 PM
    Sign in to follow this  

    Model Database

    General and Gameplay Programming

    Myopic Rhino
    (C) 2000 - Zachary Booth Simpson. Copied with permission from http://www.mine-control.com/zack. If you find any of this work useful, please sign Zack's guest book: http://www.mine-cont...i/gbook-zbs.cgi.

    [bquote]Aggregate the Model objects into one database.[/bquote]

    [size="5"]Also called
    [bquote]World Database, World, Level, Fast Area[/bquote]

    [bquote]Most games need to track the state of many models simultaneously. Collecting the models into one list simplifies several important systems.
    • The creation and maintenance of indices which speed searching. (See Spatial Index.)
    • The inter-object references and the "death problem". (See Controller.)
    • Serialization, i.e. load and save.
    Some games may have more than one kind of Model Database simultaneously because of fundamental differences in data or index type. For example, a game might have a TerrainModelDatabase which is independent of the MobileModelDatabase. These are both Model Databases, but have radically different optimization needs.[/bquote]

    [bquote]Some games may implement the Model Database as a simple array of Model instance pointers. This is probably the simplest solution and often very practical.

    Other games may choose to implement sophisticated memory management or caching solutions to optimize or solve any of the following problems:
    • World is too large to fit in memory.
    • World fits in memory but too many objects slows down AI, physics, rendering, etc.
    • Synchronization of client and server.
    • Improve speed of load / save by "linearizing" world state.
    The world database is almost always indexed to increase search speeds. (See Spatial Index.) The synchronization of these indices is usually part of the Model Database''s responsibility in methods like: removeFromWorld() and insertIntoWorld(). (See Gateway.)

    Most games use hierarchical Model Databases over relational ones. In general, hierarchical databases are faster, but more cumbersome to change schema. Relational are slower but robust to schema changes. Since games almost always prefer speed to maintainability, they are thus typically hierarchical.[/bquote]

    [bquote]Not available at this time.[/bquote]

    [bquote]None at this time.[/bquote]

    [size="5"]Issues and Risks
    [bquote]None at this time.[/bquote]

    [size="5"]Related Patterns
    [bquote]A Model Database points to instances of Model.

    Spatial Index is used to search a Model Database.[/bquote]

      Report Article
    Sign in to follow this  

    User Feedback

    There are no comments to display.

    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

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