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

Making things explode (day two)

All I’ve worked on today is explosions, and not the sounds, just the graphics. The first part of the day was one of those moments that if 15 year old kids saw, they would think “Dang, I really need to do this for a living”. Basically I sat and drank tea whilst watching star wars : revenge of the sith space battles in slow motion. I’m sure a lot of people think all games development is like that.

In practice, it actually is real work, because I’m trying to achieve the impossible, which is to replicate ILM-rendered explosions that take hundreds of PC’s days, to run on a cheap laptop at 60fps. It’s clearly going to look crap by comparison, but I’m doing my best.

My initial thoughts with the game had been to use animated sprites. Basically, I had a particle engine that would throw together tons of particle effects, merge them, and save them out as a flipbook style group of images that get played back like a video clip. The plus side of this is that its really low CPU and GPU, because its just a few simple sprites. The downside is that it looks like crap. The problem is that a 64px by 64 px explosion (small!) that has 16 frames will be 256×256. to have 64 frames its 512×512. 64 frames is about 1 second, so that gives you a one second, always the same animation that is contained within 64 pixels.

If you need 4 varieties of that, thats a lot of texture for an indie downloadable game, and if you go to 128px explosions we reach 1024 square textures, and it all gets very inefficient.

The other solution is to optimise the crap out of your particle engine, and actually do the explosions in real time. That’s what I’m doing now, and it looks tons better, plus a bit of random fuzziness makes it different every time. And I can have bits of debris fly off over 128 pixels, which looks tons better. The problem is it involves drawing a lot of pixels, and a lot of verts, and doing tons of calculations for velocities, fading, shrinking etc. You need to avoid memory allocations, group together emmiters to minimize draw calls, blah blah. This is why it takes ages to get right. My current ‘big’ explosion has seperate emmiters layered to draw smoke, black smoke, big rubble, dust, flames, glowing bits, plumes of smoke and plume flares. They all combine in a single point to generate the final explosion.

Tomorow I’ll try and post a few screenshots, although it all looks much better when moving. I’m just waffling here so you appreciate it when you play the demo one day :D

Explosions

I’m trying to get better explosions today. So far I’ve achieved sod all. The topis the sample explosion from Star Wars:Revenge of the Sith. On the bottom is my current attempt.

It’ll get better…

Core Breach!

Still a work in progress…clearly. But getting better… Details of what the hell this game is will arrive eventually…

Patch day, plus sales analysis day

I just released another new patch for Democracy 2 (1.23) the changes are these:

Married Tax Allowance now makes parents happier
University grants make parents happier
Increased probability of prison riot event
Reduced positive effects of legal aid policy
Bailing out company dilemma now costs money
Creationism policy now affects technological backwater and technological advantage situations
Oil prices now affect the chances of the petrol protests situation
Reduced effectiveness of free buss passes for retired people
New Space Program policy.
New Pirates Attacking Oil tanker event.
Liberals are now angered slightly by citizenship tests
Stem cell research now boosts lifespan

I also have spent all morning doing sales analysis and working out how to keep selling more games. It’s possible that I’m going to always dedicate Monday morning (at least) to being the day where I work on support and marketing for the older games. It’s easy to just ‘forget’ about the old games and get obsessed with the new one, but I can’t afford to do that. My target for all my games is to sell 5,000 copies of each one direct, before I can relax and feel that at least they were not a flop. By this reckoning, Kudos:Rock Legend was a flop, but it did sell OK on Mac, and there are always the portal sales to consider too.

The big problem is web traffic. There are maybe a billion people on-line, and maybe 1% of them play games that’s a lot of potential buyers. The percentage of people who would maybe buy Kudos 2 or Democracy 2 who have actually visited my website must be pretty small. The problem is, it’s not easy to know how to reach them. I currently spend about 10% of my income on advertising. I know some people spend a much bigger chunk, but I use the rest to eat and pay bills. Plus it’s not easy knowing where to find ads that actually convert into real-world sales.

I’ll be back working on the space game tomorrow.

GUI Coding is slow and dull…

I still hand code my GUI stuff. TBH, although I know people talk about using GUI libraries, I can’t see how it can save them that much time. I have a library of stuff like button, and window classes. This isn’t the issue. The issue is coding all the stuff that says “this window has a button here, and when you click it, that scrolls through this list there”

GUI stuff takes ages. it’s also really boring to code, and there is a huge long list of features which are automatically assumed by gamers which you must have. All buttons need mouseover states and tooltips, and you need the idea of modal windows, draggable windows, windows that go to to the top when clicked, etc.

Add to all that, the nightmare of making a GUI that runs nicely in different resolutions. I know that stardock have some clever system for doing this, but they employ dozens of people and run their own GUI software business, so they can spend a lot more time on it than me.

This is why I’m not blogging about exciting enw stuff in ‘the game that has no name yet but will have a code-name soon’. I’m doing GUI stuff for one of the three big ‘management’ parts of the game, and it’s nothing exciting to talk about. Not compared to the lasers and explosions anyway.