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

Advice needed on tilesets...

I need some advice on which is the best way to handle building the dungeon. Right now I'm using prefabs for my dungeon, they have a north south east and west section for each "room": The basic tileset. This has several advantages, and also several disadvantages. Firstly I can have curved rooms, I can have tunnels and other interesting shapes. The tilesets can look quite nice with a little work. On the other hand I can't easily get the navigation data before building the map and once the map has been built I can't make changes to the layout, like having active pit traps or believable secret doors. Although the rooms are interesting, they are quite repetitive, and it takes a lot of effort to make even a few different variations. Also rooms are constrained to one size. A newer version of the tileset with a lot of variant parts for making more interesting rooms. To create a tile set is a real headache too. Planning how to lay out the UVs, trying to cra

Upstairs / Downstairs.

I've decided to make my prefabs multilevel. Later this should allow me to add pit traps and other great stuff. It also makes it easier to line up stairs so that you can exit them on the same co-ordinates where you entered them. The prefab editor is pretty much finished, it just needs some code for loading up prefabs from a saved dictionary, so that they can be checked or edited. The entries will need to be forwards compatible, so I'll be loading each tile and then translating the indexes to a new array, that way if I add extra indexes or extra info (like traps or puzzles) I'll be able to update existing prefabs to work with the new standard. Click for a video.

Video Diary 8

Things are moving along well, there's been a lot of progress on the action manager side of things. Actions have finally moved to the UI, so you can initiate actions by clicking the appropriate button. I've set up some dummy actions to show what happens visually when actions are taken, but the actual dice rolls and such are yet to be integrated. The UI objects are also being added, though some are non functional or empty at the moment. Click on the image to see this week's development video. Every time I add something big I also add about a dozen small things. Like the selection box visualization. Previously this was using render.drawline, and old fashioned Blender function which can be impossible to see at certain resolutions, or at certain frequencies. I replaced it with a function that adds planes of the right size and scale in the right location. I also made all characters a little bigger. I still need to do some work with vectors and final target locations t