Friday, March 20, 2009

Per Pixel Collision Detection Extension Added

There is now a collision map class in the new arc-perpixel.
Usage link.
Implementation link.

This class allows for per pixel collision detection. It can also build its own collision map circle, box, or create a collision map based on the intersection of two boxes. It can test for collision between two PerPixel classes, or it can test collision against a single X,Y point.

Wednesday, March 18, 2009

Software Releases...

I'm going to start using release numbers again. The release number will cover all changes to arclib-core and its extensions, and after every release I will create a new branch of ArcLib. I'm going to update the track ticket system for the current release and future release. I'll let track be my change log.

Arc (0.3) will have massive changes compared to Arc 0.2. Completely new physics system (done), scenegraph simplification (done), new GUI system (working progress), completely re-factored arclib code layout (done), as more as seen in the above log.

Wednesday, March 11, 2009

Texture Pixel Data...

I've changed the functionality of the Texture struct in ArcLib. Now it will save the SDL_Surface* pixel data by default, and if one doesn't need to manipulate this data, you need to call


If one want's to access this data

SDL_Surface* img = texture.getSDLSurface();

And if one want's to re-set the SDL_Surface data of an image


The behavior of setSDLSurface re-uses the image's OpenGL ID number, so all images bound by that ID number will change.

Edit: Changed the default behavior to not save the SDL surface. If you want to keep the SDL surface, use
Texture t = Texture("tname.png", true); // true sets the bool keepSDLSurface, which defaults to false

Monday, March 9, 2009

*-ary tree structure

I'm in the process of creating a *-ary or N-ary tree structure, where N can be any number. It's a tree with any number of children allowed, simply because I do not like to program limitations into my code.

I'm going to use this tree structure to represent a Top Down File menu. I'm not 100% sure, but I believe this tree may prove useful for a scene graph structure as well.

This tree structure is going to be the heart of my Top Down File menu widget for my GUI. I stuck the development version directly in the trunk.

Is anyone aware of a 'standard' N-ary tree? I've found out about the K-ary tree where K is a konstant, but haven't had any luck in finding a standard way of making a *-ary tree. Also, there is no Tango equivalent that I am aware of.