måndag 7 september 2009


This pretty much shows the current status of the engine.
You have the ability to import meshes and create physical objects via scripts. These are organized as GameObjects and Components. You can also do this in the script console. There is a basic camera management system in place, (for this scene I created a scripted component CCamera to handle the movement). The arena you see is a basic untextured sketch of what the final one might look like.

The blue pyramids inside the transparent body is bone visualizations that will help the development of the IK Animation system that is under construction.

söndag 6 september 2009

Busted for real

I found the real reason for the script bug yesterday. Lua was destroying objects randomly after calling functions from C++ and passing this-pointers to the objects as arguments. I guess I will have to create some adopt-policy or something but for now I store the pointers in a vector in lua so they don't get destroyed. An ugly solution yes, but a working temporary one.

Also, I started working on a Camera component and exported a new mesh for using in IK Animation tests.

måndag 31 augusti 2009

Bug Busters

Up until now our project has been spared from any major bugs. At least that I know of. So when I encountered a bug in the script system the night before yesterday I was a bit surprised. Somehow, after a random period of time, a Listener object was corrupted which caused the app to crash. I battled that f*kn bug for almost two days when I stumbled over the solution to the problem. Not the explanation though. I'm still a bit crossed but I'll live. However, I am going to have to find out what caused the crash and if it was an error from my part in the script or in the C++ code. The script bugs are a lot harder to track down but often more obvious. I'll have to create some script bug tracking system. Anyway, that's all for now. The action/event system still works great by the way. Haven't changed it yet.

As for the gaming experience, the opponent is now chasing the ball. In a primitive way, sure, but chasing it still, and returning it. It's quite fun to play actually=)

fredag 28 augusti 2009

I can't believe I am writing about Actions again

...but here goes.
I have spend some time rebuilding the action system for the gazilionth time but now I have ended up with something I can live with for a couple of months. I think. Anyway, it basically works like any UI system you have come across - you have a bunch of actions and you bind keys to it. What I added this time is the ability to bind hotkeys, like CTRL+S. For now I store the modifiers (CTRL, ALT, etc) and their states in an 8-bit int along with the keycode (total of 16 bits). This limits the number of modifiers to 8 and is really meant to be used only with the standard keyboard modifiers. I know I may have to change it in the future to allow other input devices like game pads to have modifiers. For now the modifiers are all hardcoded keyboard ones and that's pretty much unacceptable. For example I know many of you (and I) use Mouse Click + Scroll in some applications. So why build this in the first place? Well, I needed the basic functionality and it's still very easy to expand and/or change.

The major change for this update is really that I have added to types of events, DigitalInputEvent and AnalogInputEvent to remove any bias towards keyboards or mice. Basically to add a new device type (say a wii-mote) you inherit the InputDevice class and specify what goes into the events. The digital ones are meant for buttons and keys. The analog is basically anything else, mostly related to movement I guess.
All for now.

fredag 19 juni 2009

Actions and Events

More on events. I've integrated parts of the event system to work with states so that state changes are passed around as events. Works well. Also I have changed in the action handling a bit. (The part that binds keys to actions). And...as a final bonus I've added a small Lua console to ease testing.

As you can see I have typed "createObject("ball")" and sure enough, a blue ball (top right) comes zooming towards the corshair.

tisdag 16 juni 2009

Extended Script Support

Script support has been extended to enable creation of new component types using lua scripts. This opens for creating new types during run-time. The ScriptComponents are created using LuaBind's lua classes.

söndag 7 juni 2009

Events and Collision

I guess I've been keeping it quiet for a while now but I have been programming quite a bit. Mainly stuff concerning collision handling and the events sent to objects and components. I think I have a good ground to stand on now and I created a quick example the other day where a box follows where I'm shooting and returns the ball over the net. Very fun but har to beat.