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.

Comments

  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.

    ReplyDelete

Post a Comment

Popular posts from this blog

Back to Vinland.

I'm going back to my real time tactics project, Vinland 1936.
While working on the other project I overcame the problems which were stopping me from saving/loading the game and also cleaned up the base code a lot.

After a few weeks I'm getting near the the state I was in before.


Infantry are back to their previous state, and vehicles are running OK.
This time I'm going to push ahead with mocking up the combat system though before I work any more on the vehicle builder or graphical aspects of the game.

Map screen designs

I've been working some more on the map window. Right now you can only see the base, it doesn't show items, enemies or even doors on the map yet. These would be decals.


In the top window you can see the modified result of last night's tile based map. It looks good but there are some visual artifacts related to the problems I encountered yesterday, and as well it takes much more code and time to calculate.

The second window uses a cheap trick to fake an beveled look from a smoothed version of the 32x32 map. It uses black to mask unexplored areas.

Finally the third version is meant to look like a had drawn map. I'm using a cross hatching texture to distort it and unexplored areas are shown as blank map paper.

There's going to be a mechanic in game where you need to use some paper every level in order to activate the map for that level. From there it will fill it in automatically. Paper will be pretty rare so it might be worth keeping it safe for the more complex level…

Infantry combat and entering buildings.

I've been working a lot on the game recently and I've nearly rebuilt it to the level it was before. Past that maybe, since now I have the beginning of a working combat system and the ability to save and load the game.


Infantry can now occupy a building. It's quite an abstract representation, since they stay at the door and turn invisible. But they can then fire from one of the windows and take damage from shots at the windows too. I think I've set it up well so that when building damage and destruction is working then the system should continue to work.

For combat I tried some new ideas, but they didn't work out that well. It seems that it's important that viewing range should be further than shooting range. Now shooting range is pegged at 18 units of distance, while viewing range can extend out past that.

In the above image one unit has an officer, so has further viewing range. The other can only see as far as they can shoot, a dangerous situation since the en…