Archive

Posts Tagged ‘Data Structures’

ActionScript 3 MultiMap Class

June 10th, 2007 9 comments

Recently I needed a HashMap for a project to map key/value pairs but in that particular case the Map required to map not just one but several values to a key. I could have used an array or object to store the values in and map that one but in practice it turned out that accessing the map looked rather messy. It would be much more elegant to have a map to that multiple values can be mapped directly. After some investigation (strangely even Java seems not to have a MultiMap included) I came up with writing my own MultiMap class, so here it is!

Read more…

AS 3.0 Data Structures For Game Developers

May 26th, 2007 No comments

In case you missed it Michael of Polygonal Labs has released a package of ActionScript 3.0 data structures that are especially dedicated for game development. He’s also writing examples on how some of the classes are used, for example Queue and Tree.
The hexagon framework will contain similar data structure classes but they will adhere more to interfaces and patterns. Nevertheless I will optimize them for speed as best as I can. In case you are wondering … no, the hexagon framework hasn’t been released yet but I can say now that it won’t take too long anymore until initial release.