I have been waiting for this. Polygonal labs released a pretty sweet package of core game development AS3 data structures (and other rich application development) tools that are common on other languages but not so in ActionScript. The library is extremely well written and polygonal labs focuses on speed of the stuctures.
The methodology for these libraries is right along the lines I like. Focused on speed and performance but also readbility and speed over patterns if needed.
I have tried to provide just the bare algorithm, coupled with a minimum set of methods I think are most useful to work with. Simplicity and performance were the key guidelines for the whole package.
I am especially intruiged because I am building our core gaming libraries for blipgames and have been doing a bit of this myself but the depth of this kit is many hours ahead and very well written.
Some of the classes include very common programming structures that are missing from flash/flex libraries. These will be pretty standard to most Java/C#/C etc developers but adding this to flash is just excellent. Here’s a list of the goodies in the kit.
The library contains a two-dimensional and three-dimensional array. They are both implemented by a single linear array rather than nested arrays…
This is also called a FIFO structure (First In – First Out).
Also commonly know as a FILO structure (First In – Last Out)…
A node-based structure. Every tree starts from a single node, called the root node…
This is just a specialized kind of tree where each node is only allowed to have up to two children, called the left and right node…
Binary Search Tree (BST) and Hash Table
Both structures store data that can be retrieved quickly by using a key….
A linked list is similar to an array. The main difference is that in an array, each cell contains just the data and is accessed by an index. A linked list consists of several node objects, which in addition to storing the data, manage a reference to the next node (singly linked) or to the next and previous node (doubly linked) in the list. Think of it as a more natural approach to work with sequential data…
Heap and Priority Queue
A Heap is a special kind of binary tree in which every node is bigger than its child nodes…
A graph is a loose node-based structure…
A bit vector is some kind of array in which you can store boolean values (true/false – 1/0) as close as possible without wasting memory.
Polygonal Labs has a tree sample up that has many possible usages from visualization of game states to building node based editors to anything really in game development. I could easily see a mix of this and scene creation in papervision via a flash application/IDE.
I have to say I am excited to base my libraries on these kits and work to improve them as I can. Get on over there right now and check it out. Also, its under the MIT license so this instantly makes polygonal labs famous. Thanks Michael!