Previous Blog Next Blog
Prev/Next Blog
by date

Conway Life fun milestone

Conway Life fun milestone
Name:Frank Carney
Date Posted:Jan 29, 2007
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Frank Carney

Blog post
Here is a simple milestone image for my Conway Life playing, but there is a lot of code in here for just this simple widget:


I created my GuiGridCtrl widget and it needed better support for line and texture drawing. Namely I modified a few dgl routines to allow for mid pixel rendering using antialiasing. You can view these changes here if you own TGE:
tdn.garagegames.com/wiki/Torque_Game_Engine/code/dglExt

I created a new class called CLifeCell which creates an object that has a bunch of data for each Life cell. I wanted code support so I could access the widgets directly (through C) using the GuiGridCtrl. I can access these CLifeCells when I add them to a list I have attached to my GuiGridCtrl.

Some cool features is that the object will only draw objects of type CLifeCells even if other objects are in the list. The list is exposed to the console so you can use normal console commands to check the contents of the list. In fact the list can be deleted and new one set for the GuiGridCtrl. This allows the list to be gui independent. I can also edit by clicking on the gui to add the cells. If the cell exists it will delete it. The grid can be an arbitrary number of X and Y positions as well.

My next step is to create another class that runs the life algorithm that accesses the list and can be linked to the GUI control. The trick is to somehow keep the class knowledgeable of the list and the gui. I may have to redesign how the GUI gets the cell list information.

Anyway, this has been really fun. I hope to get my life game up and running soon.

Recent Blog Posts
List:12/25/07 - Milestone Reached: Mission Launched from Database
12/24/07 - Creating Objects Without Creating Them
12/24/07 - Another Sqlite Blog
09/03/07 - SQLite is Fun!
08/20/07 - Playing House
07/05/07 - Getting burned out and coming back, again...
04/07/07 - Inputs, Inputs everywhere...
04/01/07 - RPG, what does it mean?

Submit ResourceSubmit your own resources!

David Higgins   (Jan 29, 2007 at 06:06 GMT)
Very interesting -- however, is this intended to be a 3D game or a 2D game?

Frank Carney   (Jan 30, 2007 at 03:20 GMT)
Right now I working on the basic widgets to support building these constructs on a 2D map, but release them into the 3D sim. The constructs will primarily be 2D in nature when running.

Tom Bentz   (Jan 30, 2007 at 09:13 GMT)
Thats pretty neat

You must be a member and be logged in to either append comments or rate this resource.