architecture tagged posts

Internal World Editor And Architecture Improvements

Architecture Improvements

After my last blog post I have been finishing up automatically generated Level Of Detail (LOD) for the terrain system that has a configurable level count and scales based on other terrain settings. At this point I had completed all the tasks related to performance and optimization of all currently added features. The entire game engine was built in a way that made it very easy to test and debug core components, but as the engine is now in a more mature state I thought it was the right time to improve the architecture of the engine to allow for more dynamic development and automation. The goal was to make the engine a seperate library that is automatically included and set up using a project template. All components in the engine can be customized by inheriting classes and injecting project specific types on initialization. By doing this the development process feels like native programming using a graphics API, and all of these features are accessible through the game project when desired, but instead you are skipping the hassle of building every core and render feature by yourself. It’s a balanced combination of simplified component based development and lower layer programming.

Internal World Editor

Now with the new architecture all set I was able to build new systems on top of the engine. With game prototyping on the agenda I had to start building a good world editor to make maps/levels with. I considered multiple implementation options including making a seperate project that spit out map files. But this created a lot of programming overhead having a seperate tool and code base along side the engine itself, and it would make my plans concerning customizability and extensibility of the engine and game projects very hard to combine with the editor. Therefor I decided that implementing the editor inside the engine would be the best option. I didn’t have to start a new project, there was no need to update it along side the engine in the future and it automatically works together with the engine and game specific types. Only developers will need this world editor to create their game and it doesn’t have to be included in the final game release. To cut the editor out of the game automatically I assigned it to the debug build of the game exe by default, but it’s still configurable to enable it in the release build as well. The world editor currently supports moving, rotating, scaling, adding and deleting of objects and morphing of terrain shapes. There is also an undo and redo feature available that makes designing a little bit easier. More features will be added to the world editor while engine development continues.

So to sum things up, it’s now possible to create a new game project with just a few clicks. And by writing a few lines of code you can build custom objects, scripts or work with the underlying graphics API. You can inject game specific types into the engine and world editor, and design your worlds while you are playing the game. A final deployment of your game is done using a single build mode switch and automated asset file packing into a game folder.

Read More