Re: Applications that use thousands of data containers?



JohnQ wrote:
What are some applications and domains that use many containers (lists, maps, arrays, whatever) in one program? Within the science of programming, hashtables that are implemented using a list container for the buckets which could then have 1000's of lists (not that that would be a good design though). But what are some domains and application programs that use many (hundreds or thousands) of containers do get their job done? (Please note that I'm not referring to the number of elements in the containers, but rather containers themselves).

Some types of RPG. Roguelike games could plausibly have a container for every tile on every level of the dungeon, to hold the contents of the tile. A game of Nethack will have (say) 55 levels, each 80*22 tiles, making a total of 96800 containers, almost all of which are empty. I suspect Nethack actually uses a sparse representation of some type, but mostly because much of its design is 20 years old and was designed for much less powerful machines than modern PCs. Also, only one level at a time is in memory: the others are on-disk. A modern roguelike might actually use one container per tile, and keep all levels in memory. In addition, I know some have a list of "special properties" for each object or monster, which will add a further container per game object.

A MMORPG will have several containers for every player online, for things like inventory, timers, etc.

--
Simon Richard Clarkstone:
s.r.cl?rkst?n?@durham.ac.uk/s?m?n.cl?rkst?n?@hotmail.com
Scheme guy says: (> Scheme Haskell)
Haskell guy says: (> Scheme) Haskell
.



Relevant Pages

  • Re: Adapting software to multiple usage patterns
    ... The library is part of "the language". ... I have written a handful of list implementations, ... had perfectly adequate implementations of both lists ... that is missing is a common interface for containers. ...
    (comp.lang.c)
  • Re: How to create a square grid like chess board???
    ... The concept and positioning of stowing these containers are ... |> the same as placing a chessman on one of the chessboard's cell. ... All posts requesting advice for prolog representations should be ... i heard it can be done using lists. ...
    (comp.lang.prolog)
  • Re: avoiding recursion in repr?
    ... >>Is there any equivalent function for defining new container classes ... >>written in Python, or do potentially recursive containers have to be ... but __repr__ for standard containers. ... code for lists and dictionaries correctly, ...
    (comp.lang.python)
  • Re: Adapting software to multiple usage patterns
    ... you can use it with lists, arraylists (flexible arrays) and all ... *sequential* containers. ... Ive wanted to iterate over all the elements of a hash in a language which has hashes natively, whilst at other points using it as a hash. ...
    (comp.lang.c)
  • Re: Adapting software to multiple usage patterns
    ... you can use it with lists, arraylists (flexible arrays) and all ... *sequential* containers. ... Ive wanted to iterate over all the elements of a hash in a language which has hashes natively, whilst at other points using it as a hash. ...
    (comp.lang.c)