
Onthology was a project to take an existing graphics engine and add gameplay features suitable for a role-playing game. The KA3D engine technology was designed by Jani Kajala, and had a pre-existing rendering framework, LUA scripting language integration, and 3ds-Max exporter / custom importer for rendering scenes. 3ds-Max was the primary tool for level design and animation.
Given a pre-existing level and character with limited animations and no art or level design support, we were charged with the task of adding RPG style gameplay elements to the engine. This specifically included adding support for a dialogue system, a spell system, character statistics, combat, items and inventory. I decided to write a custom windowing subsystem with LUA hooks so that other programmers could implement similar subsystems independently and use LUA as the 'glue' between subsystems.
The subsystem was, in the end, extremely inheritance based, using a virtual Window base class: not the most flexible design, but it worked. All widget and window calculations were done in object space, where the cursor would be transformed into the space of whatever topmost window it was over. If a click event was recieved and the mouse was not over the topmost window, the system would attempt to drill down and find the window, if any, that the cursor was attempting to click on, and switch that window to the topmost window on the window stack. There were a number of events windows and widgets could register to recieve, such as OnEnter, OnExit, OnClick, OnDoubleClick. Given that this was the first time I ever attempted to design a full windowing subsystem, I feel that I did relatively well. The system served its purpose, aided in adding functionality to the inventory, dialogue, and character stats subsystems.
- Engine
- KA3D
- Duration
- 2 months
- Team
- 4 Programmers
- Language(s)
- C++
- LUA
- Role
- Engine Programmer
- Implemented lua scriptable windowing subsystem
- LUA scriptable window support with variable transparency
- Implemented hardware accelerated buttons and widgets, window borders, and mouse
- Implemented window stacking, window focus, and click-n-drag windows
- Worked with other programmers integrating window subsystem with inventory and dialogue subsystems