• entries
66
157
• views
47992

# La la la ...

305 views

Just working on Bola still. I added a way to adjust an animation's keyframes easily, as well as the sprite's "offset". So now I just need to figure out how to handle bounding box editing and I can have my way with any animation.

To explain that; every sprite has one or more bounding boxes. They can be aggressive (they hit other bounding boxes), they can be passive (they get hit by aggressive bounding boxes), the can be "guards" (they stop aggressive bounding boxes from hitting passive bounding boxes from certian directions), etc. They can also have states, so if an enemy gets hit by a "PUNCH" box they recoil, if they get hit by a "TRIP" one they fall over, etc. In TMS you can already get knocked in the air, knocked over, burnt, frozen, etc. Being able to display, edit, add and delete these things will be interesting. No, it will be a pain in the royal arse. [razz]

And if anyone cares, here's how my animation system is set up:

class CAnimation{	public:	class CFrame {		public:		class CBBox {			public:			int   xpos, ypos, width, height;			int   state, type, ID, damage;		}		CBBox*        bboxes;		bool          hflip;		int           xoff, yoff;		unsigned int  keyframe;		BITMAP*       bitmap;	};	class CObjectAnime {		public:		CFrame* frames;		bool    looping;	};	std::map sequences;	BITMAP* images;};

That's about it. Plus I have a CAnimeTracker class, so there's one CAnimation object for, say, goblins, and each goblin has a CAnimeTracker that references it, which manages animation speed and what sequence is being displayed and what frame we're on, etc.

I dunno; I'm just trying to fill space here. I've been working, but what I've done makes for dry copy. [ignore] Now that I think about it, I could make the animation name part of CObjectAnime (instead of using it as the key in a std::map) and just make sequences a std::set ... whatever. [razz]

There are no comments to display.

## Create an account

Register a new account