Skip to main content

4 frames

After testing the infantry extensively I've come to the conclusion that it's possible to depict an infantry man with just 4 directions of movement and 4 frames of animation.

Previously I was using 8 directions and 8 frames of animation. That's;

4x4=16 vs 8x8=64

Obviously 8 frames looks much better, but not so much that it's worth 4 times as much resources. An 8x8, 64x64 pixel animation takes up 512x512 pixels. That means for a 1024x1024 sprite sheet I could fit in 4 animations. 

Each infantry type has 16 animations at the moment:

  1. default: Just standing around waiting.
  2. walk: walking, running, marching, it's all pretty much the same.
  3. fidget: A general all purpose action, for laying mines, serving an anti-tank gun, etc...
  4. ride vehicle: Crouching atop a tank or assault gun for quick transport.*
  5. shoot 1: a variation on shooting their weapon. Maybe standing.
  6. shoot 2: so it doesn't look boring, an additional shooting action, crouching for aim?   
  7. go prone: going in a prone position. Harder to damage when prone but moves slower.
  8. prone default: or maybe a fidget? could use the last frame of go prone.
  9. prone shoot: need a different animation for shooting while prone.
  10. prone crawl: for moving while prone.
  11. prone die: when the character is killed while prone.
  12. in trench default: only shown from the waist up, taking cover in trench or fox hole.
  13. in trench shoot: again, only shown from the waist, could also be used for being in water.
  14. in trench die: dead in a trench, or in a swamp or river etc...
  15. die 1: first variation
  16. die 2: second variation to avoid a whole squad doing synchronized death dance. 

If I use 8x8 animations, I'd need 4 sheets per infantry variation (machine gunner, officer, rifleman etc...) but if I cut it down to 4x4 animations I can fit them all on one sheet, and I can lay them out as above, one line for each animation. This makes organization much easier.

Other options would be to reduce the size of the sprites (32x32 pixels looks terrible), to reduce the number of animations, or to reduce the number of infantry types.

* ride vehicle would be a special case, 4 directions wouldn't look that great so it would be better to have 8 directions but only 2 frames of animation, or even only 1 frame and 16 directions of animations, this would make them look better while the vehicle is turning, as they wouldn't switch direction too suddenly.

In other news I've been working on the combat controller, which will choose nearest targets, rotate turrets and keep track of damage and ammo as well as firing weapons.
So far I've got it picking targets and rotating the turret. I need to go back to the vehicle builder and add some more stats (turret rotation speed, rate of fire etc...) before moving on with that.


  1. Another idea I had today was to have north and south directions plus south east and north east. Mirroring these two directions would give south west and north west for a total of 6 directions..
    The down side is that the characters would switch their weapon hand. Also the north and south mirrors would be wasted as mirroring them wouldn't produce a new direction.
    Perhaps only have S, Se, E and Ne. That would give 7 directions with mirror images.


Post a Comment

Popular posts from this blog

Make your game models POP with fake rim lighting.

I was watching one of my son's cartoons today and I noticed they models were using serious amounts of simulated rim lighting. Even though it wasn't a dark scene where you'd usually see such an effect, the result was actually quite effective.

The white edge highlighting and ambient occluded creases give a kind of high contrast that is similar to, but different from traditional comic book ink work.

I'll be honest, I don't know if there's a specific term for this effect in 3d design, since my major at university was in traditional art. I learned it as part of photography.

You can find plenty of tutorials on "what is rim lighting" for photography. It basically means putting your main sources of light behind your subject so that they are lit around the edges. It can produce very arresting photographs, either with an obvious effect when used on a dark subject...

..,or as part of a fully lit scene to add some subtle highlights. See how alive the subject look…

How to... build a strong art concept.

So you want to make some art assets for your game. The first on the list is a Steampunk Revolver for your main character to shoot up Cthulhu with. Quickly opening your internet browser you start with a Google image search. Ah, there is is!

It might be a good idea to find a few influences so you don't accidentally end up copying a famous design.

Just mash them up and you're ready to go! Off to your favorite modeling program.
But wait! isn't there more to building a strong design concept than that?

Of course there is.
One of the diseases of modern design is that of recursion. Everything is a copy of a copy of a copy. This is especially a problem with "historical" concepts. Over the course of that recursive process the concept becomes infected with modern design elements, and ends up looking very similar to everything else that anyone else has ever made.
If you want to come up with a really fresh idea, you have to get beyond secondary references and go look at real …


Ok, so it's not exactly skynet, but I have got my first AI state working, kind of.

The first state is "HOLD" in which case the agent stays in place where they are and shoots at any unit that comes in range. When I started writing this module, I found that the existing method of triggering actions wasn't good enough to allow the AI to choose the best weapon or target. It worked by simply sending a command to the unit to trigger the currently selected action.

If the action is valid, it triggered, if not it didn't.
That's fine for play controlled units, as that's all they need to do. But AI needs to know in advance if the action is valid. The player can get that info from UI feedback, but that wasn't available to the AI player.

There were three problems:

1. The UI feedback duplicated code in the action trigger function. These  two sets of code could get out of phase so that UI feedback was wrong.

2. The action trigger didn't give enough feedback for …