Lessons learned: Immediate-mode GUIs

This is another post in the Lessons Learned series. Today’s lesson: immediate-mode GUIs

I’ve you have ever worked with Win32, GTK, or pretty much any GUI toolkit I know of, you’re probably used to treating the GUI as a bunch of controls. If you need a button on the screen then you create an instance of the Button class and add a pointer to that button to the Window object. Then behind the scenes Windows or GTK or whatever handles the rendering and processing of the button. All you have to do is wait for the user to click it.

Continue reading

Lessons learned: Art

This is another post in the Lessons Learned series. Today’s lesson: art

Chickens n Kittens has to run on a lot of different platforms on a wide range of screen sizes. Everything from an iPhone 4 with 640 lines of resolution to a retina display iPad with 1536 lines of resolution, and even higher for some PC displays. That’s quite a wide range! So in order to make sure the game looks just as good on a 640 display as a 1536 display, it contains multiple copies of each art asset in multiple sizes.

Continue reading

The world really is flat!

This is what Chickens n Kittens looks like when you view the island at an angle.Screenshot of Chickens n KittensNearly everything is flat! The few things that aren’t are the particles (smoke and feathers) and the hovercraft. Those are “billboards,” which just mean those are images that are oriented to always face the camera, no matter where the camera is. That’s why the hovercraft looks like it’s about to crash into the ground nose-first.

Notice how the chickens in the background look rather pixelated? That’s because of the way the 3D hardware does texturing. There are ways to fix that, like anisotropic filtering, but I don’t need to, since the camera will never be sitting at this low angle in the actual game.

 

Making games is fun

One of the great things about indie game development is that there are no giant teams of specialists with each one dedicated to one small, specific area of development. One person can end up doing art, music, programming, all at the same time. Here is a sample of what a notebook sitting next to my PC looks like:

notepad

There are notes from at least three different things I was working on, all overlapping on the same page. BTW, see the drawings in the lower left corner? That’s a new toy yet to be revealed…

The Making of Chickens ‘n Kittens, Part 7

This is Part 7 in the Making Of Chickens n Kittens series. Part 6 is here.

If you read Part 4 then you know that CnK was originally written in C++, but was then rewritten in C# with XNA in order to run on the XBox. But with the redesign that was done (see Part 6) it was obvious that the best platform for CnK was not the XBox 360, rather mobile devices with touch screens, like phones and tablets. This created a problem. By using XNA that meant CnK could run on the Windows Phone 7, but nothing else. And who even has a Windows Phone 7, anyway?

The choice was to either re-rewrite CnK in C++ so that it could run on Android and iOS, or buy licenses for MonoTouch, which at the time would have been about $400 for an iOS license and another $400 for an Android license. We went with the former. In late 2011 work began on re-rewriting CnK in C++. But so much of CnK, everything from math to the graphics to sound, was dependent on XNA, but XNA was only usable using C#, not C++. So what happened? Nxna, an XNA clone with the same (or at least very similar) API that works in C++ and runs on iOS and Android devices.

Time will tell whether it was worth it to spend all that time re-rewriting…