Linked Lists
What would be a couple uses for linked lists in games? I have a couple ideas, but I want to know what most people use them for and why they use them over other alternatives. (this is how I spend my time at school usefully..lol)
When I need to maintain an ordered list, the data items are large relative to the size of a pointer and the list is either under 100 entries or only used sequentially. Variations of a linked list is a differant matter. One example would be a tree where those conditions are met only for the children or leaves of a node. A segmented array is another example where it is a linked list of arrays. The reason for the 100 limit is the overhead on random access or searchs. Since the benefit over an array of pointers with under 100 entries is small I''m highly unlikely to use a straight linked list at all. Technically some things may be a linked list but it is incidental to a more complex structure.
Keys to success: Ability, ambition and opportunity.
November 08, 2000 09:33 PM
for stacks, queues, or simple bags
whenever you need a list of stuff that varies in size a lot, and want a simple dynamic data structure
whenever you need a list of stuff that varies in size a lot, and want a simple dynamic data structure
I am writing a tile-based RPG. Each tile is described by a simple set ot data, one member of which is a pointer to the next tile in the animation for animated tiles. That''s one example of a linked list. My simple scripting engine stores all scripts currently running in a linked list -- that''s another. Graphical effects that are currently executing or enqueued are also described by structures that are joined in a linked list. There are any number of implementations for them... once you think of one, and understand why a linked list would be good for that situation, you''ll probably start thinking of a lot more. That goes for other data structures as well.
-Ironblayde
Aeon Software
The following sentence is true.
The preceding sentence is false.
-Ironblayde
Aeon Software
The following sentence is true.
The preceding sentence is false.
"Your superior intellect is no match for our puny weapons!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement