Assembly Descriptions

This document discusses the responsibilities and features of the various Xen assemblies.

XenAspects.dll

XenAspects.dll is a foundation library for "aspects" that span our other assemblies. XenAspects is roughly divided into the following categories:

Object Pools
PooledObject serves as the base class for any pooling implementation in Xen. All pooled objects are allocated in advance and the instances are "Acquire"d and "Release"d instead of New and Delete. For more information, see Object Pooling in Xen.

Memory-free events alternative
Standard .net events generate garbage in a variety of situations including but not limited to: attaching and detaching event handlers and invoking events via lambdas that reference other variables in the local scope. The XenAspects.Event class that is able provide garbage-free attaching and detaching of event handlers.

Specialized Collections
XenAspects.NList is a collection that can be modified during enumeration. ReleasableObjectCollection is a collection for pooled objects that automatically removes instances that have been released. SortedReleaseableObjectCollection is the same as before, but keeps the elements in a specified sorted order.

Heap Utilities
HeapTracker and HeapUtility provide useful methods for obtaining the amount of memory allocated on the managed heap at any time.

Object mutual-binding
A pattern for describing relationships between objects such as parent-child.

Use XenAspects when you need fine-grained control memory usage to avoid invoking the garbage collector (it can even be used for non-game apps!)

Xen2D.dll

Xen2D.dll is a set of extensions to XNA that give it the ability to perform common 2D tasks. Examples include:
  • Rendering garbage-free strings
  • Drawing lines and polygons with SpriteBatch
  • Caching content from the content manager
  • Complex Polygons
  • Collision detection
  • Animated Sprites (via sprite sheets)
  • Composite extents and transforms (for containing groups of visual elements)
  • Base classes for IRenderables.

Last edited Feb 10, 2011 at 8:13 AM by robzhu, version 15

Comments

No comments yet.