A nifty engine

Every video game these days is powered by a game engine. It provides the basic functionality needed to make the game work. And while there are some engines out there which we could have used, we decided to build our own: the TopHatEngine.

TopHatEngine

We build T.H.E for several reasons. We needed access to various levels of the engine from within the game to be able to achieve some of the effects you are going to see some time in the future. It also allows us to optimize some of the inner workings to our voxel-type artstyle, which is neither really 2D nor 3D in the traditional sense. Lastly, we want the game to run on PC, Android and OUYA. These different platforms bring various limitations and even though there are some commercially available engines out there which run on all of these platforms, we were not convinced that we could do everything we wanted in the game using one of these. So T.H.E is composed of various modules which can be combined in such a way to accommodate for the different peculiarities of the respective platforms. Like the game itself, T.H.E is still a work in progress, so expect some updates about it in the future…

A nifty diary #2: weapon system

It’s been a while… one of us, the developer who was working on the weapon system, had to step back from the project due to time management conflicts. This caused some changes in the overall schedule which caused the lack of posts lately.

But now, without further ado, we present our nifty little weapon system. There are four different weapon types (well, five actually if you count melee): shot, grenade, rocket and laser. The properties of all these weapons can be modified through various pickups and the like. Here’s a short overview:

OUHYAAAAH!

After many hours of debugging of our OUYA port I found the very sneaky bug that’s been bugging (ha!) me for the whole time. As it turns out the Tegra 3 (which is the core used by OUYA) can only handle textures of sizes that are a power of 2 (there are still GPUs that can’t handle¬†arbitrarily sized textures… go figure). Anyhow, Nifty is now running on the OUYA (the startscreen that is) although the scaling up to 1080p isn’t yet working as expected…

2013-07-04 02.06.01

Memory leaks BE GONE!

As you might or might not know, Java (and yes, Nifty is written in Java) uses a garbage collector to clean up allocated memory which is no longer in use. This is a very nice and comfortable feature for most programs but can become a problem in realtime applications (like… let’s say… for example… a game). The garbage collection triggers whenever it feels like there is enough garbage to clean up and can’t be controlled directly leading to huge amounts of unused memory being freed at once causing the game to lag or stutter at that moment. To resolve this issue, all datastructures which are only used temporarly get recycled and reused whenever possible to prevent too much new allocations and cleanups. In the graphic below you can see the current memory usage of Nifty. After a manual garbage collection after loading the level, the used memory settles around 40MB of data with an automatic garbage collection every one to two minutes (which is much less than the previous once a second).

tl;dr: RECYCLE ALL THE THINGS!

memory

A nifty diary

If an image is worth a thousand words, a video must be worth quite a lot of text. This is why we decided to start a developer diary on YouTube. In these videos, we will demonstrate new features we’re currently working on, game content, experiments and more. In the first video which is linked below, we show a preview of what the game will look like. We are not yet feature complete on the engine side of things so expect some visual changes in the future, the overall art-style of the game will (most certainly) stay the same.

A nifty development

After hours of refactoring and method-matching, the android port of Nifty has no more errors (meaning no compile-time errors; it’s far away from being playable)!

There’s still a lot to do:

  • Rewriting of all shader stuff
  • Rewriting of all shaders
  • Thinking of a good way to transport draw-specific arguments through the engine
  • much more!