Archive | January, 2014

KrakJam 2014

For me, end of January is intrinsically connected with Global Game Jam initiative. First I was organising KrakJam’s (local edition of ggj), but after 2 editions I had enough and Maciek Siwek, friend from Shader (student’s organisation of gamedev) took it over. Because of that I was able to start participating, and this year I also had to take part.

Overall that was my 5th KrakJam, and 3rd in which I jammed. The event took place at Krakowski Park Technologiczny, and broke record Read More…

Keyboard shortcuts info in debug builds – IMGUI style

I want to share a little discovery, a trick easing the creation and development of games. First a short motivational and historical introduction.

Case study

I don’t know if you have it too, but when I’m creating a game, I often add to it a lot of keyboard shortcuts – even a few dozens. Player avatar, enemies, map, camera, physics, rules etc. Shortcuts use normal letters, digits, F keys, special keys (tab, home, backspace), and their combinations with ctrl, shift, alt. Sometimes it’s hard to figure out what is available and what does what.

Especially I had problem with that in Ninja Cat, where shortcut availability depended on compilation mode (CONFIG:: variables, you can treat them like #defines) – debug+editor had all of them, debug without editor had a part of that, editor without debug had yet another part etc. It was very useful, because sometimes having too much shortcuts and special keys was bad – ie. during testing, when pressing some keys would change gameplay.

But I didn’t want to have it as binary – either all, or none. Sometimes the ability to intervene meant beaing able to catch a bug on the hot spot (perhaps Heisenbug?), and do something about it. So it was nice having it at such a granular level (debug/release, editor, deploy, profile). The disadvantage was that often I forgot what the actual shortctus were, what could I do at this moment. I was pressing shortcuts and they didn’t work, or I was forgeting about some magic functionality, hidden in not so visible code places.


Ok, now I’ll explain how to fix this situation. The easiest is to just display a list of all shortcuts, upon pressing some key like F1 or H(elp). But nobody would be able to create such list and maintain it over time. Also, having one huge list of shortcuts when you have only let’s say, a third of them, is not that really helpful. The solution? Do it in a automated way.
Read More…