Archive | Technology RSS feed for this section

Uuk – word managing tool for Ninja Cat PowerPack

Since sunday I’ve been working on a tool to help me in managing the files with list of words… because I’ve made another change for PowerPack, that is – introduced maturity levels. I called the tool Uuk, which is a name of organgutan librarian in Discworld. Yesterday Uuk reached level at which it can be shown outside, and so I made short video presenting it. Tadam!

It’s a AIR application, which uses minimalcomps for UI. I was timing the implementation, so I know it took me exactly 14h and 23 minutes to make it at this stage.

Why I needed such tool is briefly explained and demonstrated at beginning of above video. Btw, sorry for the bad quality… currently I’d rather work on PowerPack than spend even 3 hours making polished video.

What Uuk allows me to do:
+ easy filter/search for words, in all maturity levels (or a combination of them)
+ add, edit and remove words
+ quickly move words between maturity levels
+ is operated using mouse and keyboard shortcuts
+ autosave of changed words
+ log of changes during program run

What is left to code:
- “show exactly this word” (currently every word search is implicitely *wildcard*)
- case sensitive filtering
- search for duplicates
- full changelog appended to file
- tag support
- multiple languages support (target for future polish version of Ninja Cat)

Except the last two points, all should be quick and easy additions.

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.

Solution

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…

Config::Toggle plugin for FlashDevelop

I am using FlashDevelop to code in AS3. It’s stable, quite feature complete and very lightweight – using it to develop Ninja Cat was pleasure. During that time I learned that it’s possible to create conditional compilation constants, so you can selectively include some pieces of code. Sounds complicated, but it’s just a simplified version of #ifdef macrodefinitions from C language. It’s a simple way of creating traditional debug/release versions of game, but you can also extend it to editor/stats/ads/portal specific versions.

Problem

Unfortunately editing those constants in FlashDevelop is time and labour intensive. If you want to change the value of some of your project compiler constants, you have to:

  1. click mouse on Project->Properties, or better press ctrl+P
  2. click mouse on the last tab Compiler options
  3. click again on the small plus next to Compiler constants
  4. click on the chosen CONFIG, backspace a few times, write the new value
  5. because enter doesn’t close the dialog, grab the mouse again and click OK

Now if you forgot to change also some other constant, you have to do the same again. And it’s pretty much the same if you want to check what’s the value of one of those constants.

FlashDevelop compilation constants

Seems like a lot of time? It is, especially if you’ve based the configuration of your project on those CONFIGs, you’re using them all day long, testing different builds. And in my case (probably not only in mine) that’s what’s happening – because they’re incredibly useful, allow to quickly change the build of the app in a fundamental way, in an mutually independent way.

… (read about the solution)

Level editor design in Ninja Cat, part 1 – inner workings

I’d like to share some of the design concepts applied, and lessons that I learned, while creating and using in-game editor in Ninja Cat. I like reading about how other developers make games, their stories from the trenches – it inspires me, gives knowledge and allows learning on others errors :-P So here is my story for you – how the Ninja Cat editor works, what’s the reasoning behind some of its concepts, and what proved to be good, bad or ugly.

At start, I want to explain how levels look like, so that it will be easier to communicate. It will be rather complete list of all possibilities, because of what I’ve stated – I like reading gory, low level details and think it’s very informative.

How does it work?

When the game is built with editor support (which can be checked using CONFIG::editor directive in AS3), press TAB during game. Then the game gets paused and editor UI appears, as visible on screen.

The editor has 3 modes, changed by pressing 1-2-3 number keys (or clicking on the menu captions on left). I will refer to controls visible in top left corner as main menu.

… (read the rest of article)

Google Analytics for Flash – gentle introduction

Being able to check out how many players play your game, from what countries, for how long, on which levels they have problems, even do they ever visit your precious Credits screen – that sounds incredibly useful, doesn’t it? Fortunately, in web browser games, there’s a way to get such informations. In this post I’m going to describe the process for Flash (ActionScript 3).

And there are even many ways. First, some time ago you could use Playtomic.com – however they had notorious problems with reliability, and are now out of bussiness. Then, the second try could be Mochimedia – they have many services, and one of them is statistics. Unfortunately, it is very simple and unable to give you such detailed data as in the first paragraph. You could also google and find few other services… and among few smaller ones, Google Analytics for Flash project (later shortened to GAF).

That’s true – you can use the well known, very powerfull, complex, free, reliable and spied service from Google to process the statistics from your own Flash games. And it’s actually pretty easy to use. Sadly, the documentation is rather cryptic, sparse, ambigous and hard to follow. So, here goes a quick, practical tutorial for you + code samples :)
Read More…

Ninja Cat and Zombie Dinosaurs – postmortem

Here I want to share some details about my first indie commercial game (you can play it here).

Fun facts:

  • It took me 8 months (starting July 2012) to create it and another one to sell it.
  • I created half a meg of AS3 source code.
  • I made everything by myself, including code, design and graphics.
  • I used free sounds from the internet, and music from Kostya Dolgushyn
  • I made one week prototype in C++, with my old engine Sculpture Clay 2
  • I used Mercurial for version control
  • Game folder on hard drive takes 1.5 GB, even though the game compiles to 2.7MB
  • What you learn from this game is that triceraptops attacks its enemies by falling behind them from the sky.

What went right

1. Final game Quality

I really took time and effort to make as best game as possible. So it looks nice, is fun, original and polished (of course I’m not objective). What else one could want? Perhaps that other people would react to it positively and like playing :)

Indeed I did a lot of tests in real life, with people from different backgrounds: hardcore players, casual players, and no-players. Over 95% speak about the game positively. You can see the (almost) full list of testers and feedback givers in game credits.

Ninja Cat menu

I was doing those tests from the very beginning. As soon as I had a first working prototype in Flash, Read More…