Welcome to Null City Software
Tasty, tasty software.
 
Null City Logo Home Kitae Breeze Products Login Forums Contact Us About Us
By RobHutchinson on 08th Aug 2010 @ 11:45PM
I've just added a feature to Kitae that a few people have been asking for: Actor Base Typing. Kitae produces objects automatically when you run your game, it's part of what it does in terms of editor > code. When your application is run, your modules are loaded and any definitions of actors, scenes, fonts, etc are turned from their binary saved format into game objects through a process of custom serialization. Kitae has had a feature for a while now, whereby you can specify the base type that it should create for Scenes. However this feature was never extended to actors (even though it was requested). Basically it allows you to have your in-editor actors hooked directly to a base class so you can gain internal control over it at runtime. I've added a new example to the Kitae example set which demonstrates this new feature. Here's a video of the feature in action:



The example has a FireFly SpriteActor which has the following class as its base type actor:

Code:
namespace Kitae.Example.ActorBaseTypes
{
    public class FireFly : SpriteActor
    {
        public FireFly() : base()
        {
        }

        public override void Update(KitaeGame game, GameTime gameTime, float distance)
        {
            base.Update(game, gameTime, distance);

            // [snipped] logic for this actor only here...
        }
    }
}

This allows you to keep your code right next to the actor it is meant for, no more wrapping of actors inside controlling classes. This feature comes with a slight performance penalty if you do use it, as it has to use Activator.CreateInstance when making copies. No access to expression trees on the 360 to speed this up :(.

For the testers, this feature will be in the next release. As soon as I've rebuilt the Tile Map editor the next release will go live.
Enter your own comment
Enter your name:

Enter your comment:

Null City Software
Null City is dedicated to developing top quality sofware products for Windows PC, XBox and Windows Phone. We specialise in games and .NET applications & components.