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

Considering multiple attack path mechanics…

Soo… one of the things about doing a reverse tower-defence mode in my game, is that suddenly you care more about the route your troops take. In tower defence, the fact that enemies may seem to mindlessly go off on a tangent doesn’t matter. If they act dumb then yay! if they act clever then yikes! but it’s never frustrating.

As attacker, things change. if a left turn goes to certain death, you expect your units to take the right turn. But is it that simple? Maybe left is lethal to infantry, but right lethal to tanks. Maybe you want to send the infantry to their deaths as a decoy etc. Consider the following map:

In terms of general design and gameplay, I love this. it makes for huge flexibility, unpredictability, and variety. As a player, I can find it frustrating when attacking because the troops may take a route I don’t want them to take. I’ve been mulling over various GUI ideas for issuing orders. None are perfect, and in any case, I’m keen to have GSB-style hands-off play for challenges, which means too many mid-battle controls are going to be a pain.

I can’t yet decide whether it really is frustrating as a player if the routes are chosen by each unit, or if that’s just me as designer panicking. The instinct is to add all sorts of options or UI controls, but I don’t want this game to be complex to play. Hmmmm…..

On a lighter note.

Programming RTS Unit selection outlines

Programming RTS Unit selection outlines is a pain. I had an amazing GUI mocked up by an artist, and most of it is now in Gratuitous Tank Battles, but today’s todo list included unit selection outlines. He had mocked up this:

And now I want to batter him with a baseball bat.

(I always tell artists to do the best stuff they can possibly imagine, and let me worry about how I’ll make it work. Reach for the stars etc…)

You might think it’s easy. Just draw the image bigger first, with a flat shaded effect (I use render states, but YMMV), and then draw the unit on top. WRONG!

Firstly, that means your UI doesn’t shine through smoke or other effects layered on top, which isn’t as cool. Secondly. it means the units shadows are cast onto its own selection UI (yuck) thirdly, it just plain doesn’t work.  It works with squares or circles or other basic shapes, but take a complex image, scale it up, then draw the smaller image inside it. See what I mean?

What I really need is some way of doing what photoshop calls the ‘stroke’ effect, where the outline of an image is expanded. Not expanded directly from the image center, but expanded in all directions.

One solution mentioned online is to draw the flat-shaded bit (enlarged selection) 4 times, moving it up down left and right by 1 pixel each time. That’s great if you want a 1 pixel outline, but 1 pixel sucks, and beyond that, you will get corner issues, plus… 4x rendering potentially every unit in your army every frame is not nice.

Another solution would be to have extra versions of each sprite, already-scaled up in photoshop, and render them for the enlarged versions instead. This has issues where the image already touches the sprite corners, and in any case, that means that the selection outline is a fixed percentage of the unit size, rather than a uniform 4 or 8 pixels, which would look tons sweeter.

So… how did I fix it?

I haven’t yet… It’s driving me bonkers :( I am considering an offscreen render target that blurs a matted sprite, but that wouldn’t be crisp, which I think would look better. I wonder how they did those outlines in age of empires 2?

Note, almost all discussions online about this refer to 3d meshes. I use 2d sprites with alpha channels. Totally different :(

 

edit: this is what I have so far, quite like it, may compromise on it…

Drama doesn’t always mean guns

I’ve just re-watched the film ‘glengarry glenross’. For the unitiated, it’s a ‘feel-bad’ movie that is primarily a lot of legendery actors playing distressed real-estate scam artists shouting abuse at each other. I thought it was good. Anyway…

It got me thinking about a recent discussion following the news about a new star trek shootemup style game, where people (rightfully imho) despaired that even with a star trek game, it’s another game where you shoot stuff.
Now shooting stuff is fun, and it makes for great games. I’m making a game about shooting and blowing stuff up right now (but I’m also involved in a non-shooty game too…), but there is definitely more to life.

People say that drama requires conflict, and that’s fine, but glengarry glenross reminds me that conflict doesn’t have to be rocket launcher vs tank. It can be al pacino vs kevin spacey in an office. I know it’s MUCH harder to code believable, interactable NPC personalities in a familiar situation like an office, than it is to code convincing guys shooting at you, but hey, it’s 2011 shouldn’t we be trying this?

There is a big market out there (I suggest…) for games that involve conflict and drama, that do not involve guns. I’m sure a lot of these ideas suck, but one might work… why can’t we have a game where you are:

A hostage negotiator
A marriage counsellor
A businessman that performs hostile takeovers
A trade union leader
A schoolteacher
The leader of a political pressure group
An investigative journalist
A paparazzi photographer

Forget the graphics, forget the physics and the tech. Make a game based around characters and situations that are dramatic but familiar. I’m sure millions tried farmville because they see farms as something familiar, unlike orcs, or lightsabers. If you could do it right, I think you could make a game out of any of those concepts. It’s tough as hell making a game on a topic that isn’t normally used in games, there is nobody to copy. Sometimes, that turns out to be a great idea.

Cross platform angst and my hatred of middleware.

I do not have cross platform capability. if you play my games on linux, it’s through WINE, and if you play them on Mac, they were ported by a third party company. In the long run, this is likely to be a business weakness of mine. The ipad is great, and I can see it’s a huge market. Inexplicably, people seem to want to play games on phones, and with Microsoft making it more and more difficult to let people just download an exe from the internet, and the dominance of portals online approaching 100%, a move towards html5 or php / flash games seems like a sensible move in the long term.

Of course, people say that the down-loadable PC market is huge and not to worry, but I’m thinking 10,15 years ahead. if I’m still in PC gaming in 15 years, I need to think on those sorts of timescales. (I’ve been reading lots of warren buffet, it’s affecting me :D)

I recently checked out unity, because a top-secret-side-project-i-wont-discuss-yet is being developed in unity, and I’ve never even seen it. I was immediately put off. I can see how for many developers, unity is AWESOME. It certainly provides a ton of tools, functionality and easy-to-use stuff. It seems a lot of the fiddly, hard work has been done for you.

The problem is, I just HATE middleware. I don’t like the way other people code (as a rule, ancient-james excepted), I hate it when documentation says “you can ignore this coding concern, we handle it under the scenes” and I fear black-box code which promises to be ‘optimised’ but doesn’t tell you how, or with what assumptions.

I hate the fear that a bug will crop up after I ship, and not only can I not find it, I can’t fix it even if I could. That sucks big time. It’s rare, but not unknown. Plus I fear that ALL middleware has been built with certain limitations, and certain assumptions. Make no mistake, Unity is designed for 3D real time games. It might be ok to make a 2D turn based game in it, but you will be fighting against the tide, not with it, and carrying a lot of 3D engine bloat with you.

I celebrate the existence of unity for making many devs lives easier, but so far (I may be converted), it really isn’t for me. I like to code from the ground up, with complete control of everything. I’m a guy who uses char* and fopen(). By 2025 I might have moved entirely to std::string and CreateFile, but don’t hold your breath. Also, there is an element of ‘if it ain’t broke…’. I’ve made quite a few games with my own engine, so maybe I should build upon that, not throw it away in favor of someone else’s code?

A decision for after GTB ships, methinks.

 

Design focus, supply drops

The last few days have seen nothing but multiple xperiments with reconfiguring the gameplay for Gratuitous Tank Battles until I hit the magic balance of excitement, fun and spectacle. This game design business is tricky stuff!

Tower defense is an accepted, well-known formula, but tower ‘attack’ is not, and at the very least, I want to ship a game that is fun to play as both attacker and defender in tower-defense style. So with that in mind, I played the game a lot and concluded that it had lots of design issues. The main one was traffic jams. I was trying to design a simple ‘starter’ map that had a single weaving path between towers, and you would place your units and away they would march. The problem was, that when you spot a certain difficult tower ahead, it’s all very well placing a unit that you think counters it, but that unit is then stuck behind 15 other units before it gets there.

Initially I’d been scared of multiple paths for all maps, because of the complexity for the player, frantically scrolling around. Then I realised that if the paths were vaguely parallel, this problem went away. if I shrunk down the map a bit, I could fit the whole screen in with one look (when zoomed out), and could get more of a grip on it, even with multiple paths.

There have been a whole host of other changes as a result. Lots of balance changes, plus the introduction of ‘supply drops’ which automatically drop on the path in the quietest areas of the map, thus encouraging the attacker to spread his attack over multiple routes. That seems to work, as it’s a nice trade-off between ‘those supplies look tempting’ and ‘I ‘m kinda fully committed to attacking this route instead’. Parallel groups of paths also encourage complementary units, so repair wagons can trundle along beside assault mechs, etc, and a sluggish or damaged tank doesn’t bring the whole army to a halt (just half of it :D) I have full support for units stepping sideways around such blockages, I just need to try it and see how it goes.

I have some crappy placeholder art still in the game, and tons to do, but the last few days, where I’ve totally ignored graphics and only fiddled with mechanics and balance, seems to be paying off nicely. It feels more like a game now, and less like a tech demo. I also ditched fog of war, although it may well return in certain modes.