Sol: a generic XNA/DirectX engine

 

After deciding that C# was a far better language than python (because it is type-safe, C-like, faster, and xbox360 compatible), I ported a large amount of the sol(py) engine to the XNA Framework. Where this engine really took off, though, was in the new modules: Shader, Collision, and Scene.

 

Shader provided a simplified interface towards pixel-based image manipulations, and many basic shading techniques, including Desature, Add, Multiply, Subtract, and even a cloudlike fade using perlin noise. I also wrote a few more powerful shaders, including a distortion shader with pixel-based distortion sampling on a dynamic buffer. This module provided a simple interface towards advanced visual effects, that had previously been inaccessible due to python's slower speed.

 

Collision provides a full 2D collision framework, using the Separating Axis Theorem and some personal optimizations. It fully supports rotation, scaling, and translation of rigid bodies independently of each other (a feat in and of itself), and optimizes by including bounding spheres and edge collision estimation. I even added raycasting and circles to the original polygonal model, and grouping of collision bodies into larger ones that function as a single collidable object.

 

Scene provides a Scene graph, that determines visibility of world objects to the player. Using the camera object's bounding sphere, it goes down the hierarchy and eliminates the largest invisible parent chunks. Parents have additive bounding spheres, based on the combined spheres of all their children nodes. World-based raycasting was also incorporated, which would collide through the scene graph by bounding sphere and then geometry.

 

Modules:

Animation (animated values that change over time, optimized and expanded)

Collision (rigid body, full 2D collision on rotating, scaling, and translating geometry)

Draw (textured primitives: circles, ovals, rects, rounded rects, arcs, and miter lines)

Scene (scene graph, visibility, and layered presentation)

Shader (pixel and vertex based manipulations, handled on the GPU)

Window (common window and input handling - a hassle in XNA)

 

Sol-based Projects Online:

Sensation & Perception: Exp. 1

Sensation & Perception: Exp. 2

Sensation & Perception: Exp. 3

Piano Black / Piano White

Unseen