Monday, October 31, 2011

Simple CA Grid

I cleaned up my CA grid experiments for Unity and stuck a video of the resulting general tool kit on YouTube.  At this point, the code will need to be hand tailored for use in specific games for special functions.  Really, the video just sort of highlights a few things that can be done with a grid system. 

The nice part about the grid generator is that grids are automatically built in the editor and saved as prefabs.  This means all the long calculations are made ahead of time, and the scene itself loads and runs very quickly. 

In addition, I included a grid editor tool that lets the level designer save any changes to a grid that they have made manually into an xml file.  This is handy because a visual grid with designer defined walls, soil types, etc. can have it's values saved into one file and a second invisible grid with special CA, path finding or other mechanics can then load that xml in editor to set itself up to make use of the custom form.  Again, this all happen in editor ensuring the scene loads and runs super fast in game. 

I've packed up the optimized collection as a starter kit to use whenever a grid generator or CA system seems like a good approach in my future AI work.  I'm debating releasing it to other developers, but it may fall into that gray area of "If you understand it, you don't need it.  If you need it, you won't understand it enough to use it."  Perhaps once I develop a specific form I'll release that along with what will likely be a larger collection of interlocking components.  Still, if anyone would like this kit, let me know and I'll send you a copy.


In other news, it has been decided that the next game Paul, Kyle and I work on will be an action adventure game staring one of my more unusual characters.  While we were thinking of doing Cow Catchers earlier, this as yet unnamed title is more in line with what we have all been wanting to work on and its art style is more accessible to our low budget and lack of full time artists.  A lot of the art will also be driven with code and physics, which will also play well to what we like to do.

Currently, Paul is working on a single stick character controller (similar to those found in classic 3D Nintendo games such as Mario, Zelda and Pikmin).  Kyle is tackling a camera system to ensure the view does not kill the game.  I am prototyping various ways of handling the rather plastic form of the main character.

Specifically, I am looking into code driven mesh structure, mesh topology, advanced skeletal structures, code driven deformations/movement and character animation.  It sounds a bit complex, and it is, but I'm sure I'll be able to break it down into something workable.   This week I'll be at Youmacon in Detroit MI, so I won't have much time to dig into the code, but I'm sure I'll have some potential topologies drawn up by the time I get back.

1 comment: