Game Design, Programming and running a one-man games business…

Changing some shield stuff

I did a fair bit of speedup code today, added a new ship, then put some effort into the shield effects. The old graphcis were 512px square, which is pretty big with mipmaps. A basic test showed 1024 px images looked noticeably better, but they get pretty big filesize wise.

So I did what lots of games did, and cut the images down to quarters, and in code I mirror/flip them to draw all four quarters of them. It’s an old trick to save filesize. There’s an image below showing it in game, and file itself.

I also added support for different shield graphics for different races, so you have aliens with their funny foreign-colored shields :D

Optimising day

I’m taking an afternoon to optimise all the code that I added recently. A lot of stuff that makes the game looks cool was being done in a really inefficient way. In some cases, it was a matter of remembering to check somethings onscreen before going to any effort to draw it. In other cases, it’s a matter of caching data.

Caching means ‘keeping a copy of’ effectively. If I ask you the date, and you tell me, I could then ask you the date in 5 minutes time, or I could make a note of the information you gave me earlier, and not bother you. A lot of optimising comes down to caching data. In this case, I was calling the cos() (cosine) function several times in short succession, and getting the same answer. sin() and cos() are pretty slow, if you call them several thousand times a frame, so it really makes sense to cache them.

Things seem much faster now, even with tons going on :D

The Juggling Game

I often forget birthdays, things I’ve arranged to do socially, where I’m going for lunch, or what I agreed to do for someone. Why? My brain is just full. Here is some of the work related stuff I’m juggling right now

  • A port of Kudos 2 to a new platform by a partner
  • A translation of Democracy 2
  • Artwork for GSB
  • Arranging a musician for GSB
  • Chasing money from a Russian Publisher
  • Getting a portal to use my wire transfer details to pay me
  • VAT (sales tax) return for the last quarter
  • Possible use of Democracy for a magazine article
  • Checking payment from a US publisher for something under NDA
  • Advertising budgets
  • Checking my forums to reply to tech support or similar discussions
  • This blog
  • Analyzing web traffic to see if some recent changes were positive or negative
  • Keeping an eye on the casual games portals payment schedule so they don’t fall even further behind
  • Selecting sounds for GSB
  • Programming GSB

That last one is obviously the biggest, and GSB is effectively four games in one, so it’s a bit of a nightmare all on it’s own. The truly depressing thing is there is very little out of this list I could easily hand over to someone new, even if a) I could afford someone, and b) I found someone suitable.

I guess at least it’s indoor work with no heavy lifting :D

Turrets in and working

Here’s a screen shot of two of the ‘federation’ ships with their turrets attached. I have decided to ignore 3d renders for the ship turrets on the design screen and just re-use the gfx from the actual in-game. I think that’s more consistent and it was only adding a needless 3D look to a defiantly 2D game anyway.

One day I might be able to have designable ships where you can move cosmetic bits about, but because the sprites are actually 3D renders and use self-shadowing, that might be a bit problematic. Even placing turrets is pretty cool though.

Aiming at laptops

One of the big problems with Kudos and Democracy (my two best selling games so far) is that they are basically fixed resolution games. Democracy 1 supported two resolutions, and you can always hack them by fiddling with config files, but basically those games assumed a certain size screen and didn’t scale up or down.

With Gratuitous Space Battles, I’m aiming to support both people with huge monitors, and hopefully people with small laptops, running 600 pixel high screens.

That will mean some major fiddling with the ship and fleet design screens, and the pre-battle deployment screen too. The big probloem will be those 600 pixels. Of course, I could do some super-dynamic scaling thing, but it’s not nice reading text designed for 1900×1200 on a 600 pixel height laptop.

What I probably need is a number of different windowed layouts for different size monitors. The battle screen will be easy, because it already happily scales without any issues.

So if the fixed resolutions of Democracy 2 and Kudos 2 bugged you, don’t worry, I’m fixing it this time :D

BTW, I released a free add-on mini-patch to Democracy which adds a new dilemma for banking bonuses: