Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Fritzi on Thu 08/01/2009 23:33:55

Title: Can you use characters from sprites of different sizes in the same game?
Post by: Fritzi on Thu 08/01/2009 23:33:55
I'm attempting my First Game, and because  my main virtues is that I'm very  lazy,
I'm borrowing the character "Roger" from the demo game. But I will need more characters.
To produce a nice walk animation for these characters. I'm using the Walk Cycle generator.
This is an excellent program, but out of the box it produces sprites which are
a lot larger than Roger.

Forgive me for beeing a total newbie, but I don't know the proper way to handle this

Is there an easy  way of making these characters similar in size? Should I modify the "WalkCycle Generator",
(sounds hard) or should I try to scale Roger? Or maybe just forget about him, and produce all
my characters with the generator?
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: on Thu 08/01/2009 23:38:04
Since you are already using the (truly good) Walkcycle Generator I'd say scrap Rodger; using him will not do you any good ;) You can't scale characters individually anyway, since scaling is done via the walkable areas. Well okay, you can have characters "ignore" the scaling, but the result will look arkward.

An option would be to use smaller parts as WalkcycleGgenerator sprites. Just export a Rodger frame, use it as a template to draw all the body parts (there are not so many), and you're home and dry. Getting used to the WCG takes some time but is basically just a matter of swapping bitmaps and some "anchor points".

But as I said, since you ARE already doing your own sprites, get rid of Rodger.
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: Fritzi on Thu 08/01/2009 23:43:26
Thanks Ghost, I suspected as much. I Will Comply.
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: on Thu 08/01/2009 23:46:44
Just to reassure you, I used the WCG for my own game and made Little Red Riding Hood walk in less than two hours (including retouching).
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: Khris on Fri 09/01/2009 01:22:24
Quote from: Ghost on Thu 08/01/2009 23:38:04You can't scale characters individually anyway, since scaling is done via the walkable areas. Well okay, you can have characters "ignore" the scaling, but the result will look arkward.

Just for reference, this can be done.

I'd use an extender function:
function Scale(this Character*, float factor) {
  if (this.Room != player.Room) return;
  if (!this.ManualScaling) this.ManualScaling = true;
  int s = FloatToInt(IntToFloat(GetScalingAt(this.x, this.y)) * factor);
  if (s<1) s = 1;
  if (s>200) s = 200;
  this.Scaling = s;
}


Then call it in rep_ex:
  cRoger.Scale(1.7);

Upscaled characters do look ugly though, and downscaling all other characters will look even worse.
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: Gilbert on Fri 09/01/2009 01:41:44
Actually someone wrote a crappy module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=30129.0) solely for this.

It's not tested whether it will work with AGS V3+ though.
Title: Re: Can you use characters from sprites of different sizes in the same game?
Post by: RickJ on Fri 09/01/2009 16:34:15
Fritzi, welcome to AGS.  With an attitude like this
Quote
... I Will Comply.

you are sure to go far  ;D