Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

La la la ...

Sign in to follow this  


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
class CFrame {
class CBBox {
int xpos, ypos, width, height;
int state, type, ID, damage;

CBBox* bboxes;
bool hflip;
int xoff, yoff;
unsigned int keyframe;
BITMAP* bitmap;

class CObjectAnime {
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]
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!