Sunday, June 3, 2018

Week 2 -- Animation

Week 2 -- Animation

I picked the animations above randomly but I just realized how they depict the development process so far.
Coffee fueled nights, excruciating pain bursting my skull (most of the time because of dumb mistakes I miss for hours), but you must press on! ;)

Overview

  • .anm file support 1
  • Mapping animations 1 2
  • Render support for animations

Details

All sprites are stored in .anm files, divided intro multiple sprite chunks that either form an animation or just an accumulation of sprites like inventory icons or characters.
There is no meta information that would help identify what frames form an animation in cases where several animations are stored in one sprite chunk (blood splatter effects for example). So i manually mapped them what can be quite error prone, especially as some animations are not used in the game and seem to differ from version to version.
The DOS/Genesis/NES version have a battle scene compared to other versions where the fighting happens on the map. Some of the sprites are still available but the animations seem to be incomplete.

struct AnmFile {
	struct AnimationHeader {
		u16 offsetToSpriteOffsets
		u16 numFrames
		u16 centerX
		u16 centerY
	} [numOfAnimationsInFile]
	
	u16 offsetToSprites[header.numFrames]	
	
	struct Sprite {
		byte x
		byte y
		byte width
		byte height
		byte remap
		byte widthPerLine[sprite.height]
		byte pixelPosOffset[sprite.height]
		byte pixelData[] // one nibble per pixel
	} []
}

Next Week

Until the end of this week, I will implement the game intro what will encompass extending the game logic and dialog implementation.

No comments:

Post a Comment