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

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.

Automating Level imports from Blender to Godot

  Recently I've been making some levels in Blender an importing them into Godot. There are only about 7 or 8 shaders for each level, not counting dynamic objects which will be added later. But to improve rendering performance, it can be a good idea to split the meshes up into sections. At that point you might be faced with a list like this: Or it might be even more chaotic, if you didn't use simple names for the objects in your level. So it can take a long time to sort out all the meshes, make them unique and add textures and so on. Blender imports with simple Blender textures, or with placeholder materials. This is sometimes OK, but if your Godot shaders are very different to those used by Blender, it means applying new materials to every mesh object in the level when you import the scene. I found that during the design process, I was importing and readying a level several times before I was happy with the final layout. So at first I was wasting a lot of time. In Blender, I us

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