Posted by: EvilNando | October 2, 2008

Back from the dead


Hello guys , I’m taking some time to write about what is going on in my life at this moment and about the project status as well.

First of all I want to say that the RPG project is not dead , far from it, I just took a little break from developing because I went back to work and I still need some time to get used to the routine.

Until today I was spending my little free time thinking about how to implement that grass overlay feature (there is a post where I address that issue back here). All of my approaches led me in a place where heavy use of 2d animations was needed, but seeing how I’m implementing animations right this quickly turned a chore to do.

Lets have a quick look how I’m implementing the animations inside the engine:

   1:  // walk up
   2:  aux_animation = new FrameData[4];
   3:  aux_animation[0].FrameDuration  = anim_speed;
   4:  aux_animation[0].FrameRectangle = new Rectangle(0 * width, 3 * heigth, width, heigth);
   5:  aux_animation[1].FrameDuration  = anim_speed;
   6:  aux_animation[1].FrameRectangle = new Rectangle(1 * width, 3 * heigth, width, heigth);
   7:  aux_animation[2].FrameDuration  = anim_speed;
   8:  aux_animation[2].FrameRectangle = new Rectangle(2 * width, 3 * heigth, width, heigth);
   9:  aux_animation[3].FrameDuration  = anim_speed;
  10:  aux_animation[3].FrameRectangle = new Rectangle(3 * width, 3 * heigth, width, heigth);
  11:  // save it
  12:  aux_animation_list[0].AnimationId = (int)PlayerAnimations.WALK_UP;
  13:  aux_animation_list[0].AnimationFrames = aux_animation;
  14:  aux_animation_list[0].Type = AnimationType.OneWay;
  17:  // walk down
  18:  aux_animation = new FrameData[4];
  19:  aux_animation[0].FrameDuration  = anim_speed;
  20:  aux_animation[0].FrameRectangle = new Rectangle(0 * width, 0 * heigth, width, heigth);
  21:  aux_animation[1].FrameDuration  = anim_speed;
  22:  aux_animation[1].FrameRectangle = new Rectangle(1 * width, 0 * heigth, width, heigth);
  23:  aux_animation[2].FrameDuration  = anim_speed;
  24:  aux_animation[2].FrameRectangle = new Rectangle(2 * width, 0 * heigth, width, heigth);
  25:  aux_animation[3].FrameDuration  = anim_speed;
  26:  aux_animation[3].FrameRectangle = new Rectangle(3 * width, 0 * heigth, width, heigth);
  27:  // save it
  28:  aux_animation_list[1].AnimationId = (int)PlayerAnimations.WALK_DOWN;
  29:  aux_animation_list[1].AnimationFrames = aux_animation;
  30:  aux_animation_list[1].Type = AnimationType.OneWay;

Notice that this is just a basic animation that uses a single component that has all of its frames equally sized.

So what is an animation component?

Imagine that you want to have a reeaaally BIG character on your game, since we’re working in a 2D environment we reprent characters using 2d textures, so its easy to figure that for a big character we would end having a big texture where its animation is stored.

Now lets take a look at how pros handle this issue:

dc somulo

As you can see in this example the body (which is the biggest part of the character) is just one “component” but is the rest that has sprite animations, in this case in particular to achive body movement the only thing needed is to translate it forward, backwards, up or down

As you can see animation components saves a lot of texture space which is a GOOD thing

So given the circumstances I would like to announce that I’ll be developing an animation editor using Win forms and XNA.

this application will work directly with custom XML data , this way I can eliminate the need of having an editor resource and a game resource (which is what is going on with the map editor right now where you need to have the .xmap file and the xml export)

Right now I’m doing some research on how to start implementing the editor feature , but expect updates as soon as I get something worthy of showing.

Oh and by the way this application will be released to the public as well (binaries only)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: