Rectangular character baseline? [solved]

Started by thiezar, Mon 06/12/2010 18:34:48

Previous topic - Next topic

thiezar

Hi quys.
I have a "large" character with a problem with walkable areas. I know characters have their base at the bottom middle of the sprite and walkable areas are related to it. My character have a large base and when it come near a wall  it seems he walk on it. I should draw walkable areas a little smaller then the real walkable area but it needs a lot of trials and checking and it's never perfect, i always have to find a compromise, so i guess: is there a way to make the baseline of the character rectangular instead of a single pixel? If so, how?

Khris

No, that's not possible.
Since you don't have to draw the walkable areas in AGS but can import them, there's another way though.

-Open the background in a graphics program that supports layers.
-Add a layer and draw the walkable area on that, leaving a bit of space at the upper and lower edges but none at the left and right sides.



-Now fill the rest of the layer with another color.
-Select that using the Magic wand, then paste it two times, first half the character's width to the left, then to the right, and a couple of times in between, if you want:


(I moved the two layers 100px each, i.e. the character's width is 200px. That's a bit extreme but okay for the sake of the example.)

-Final step is to merge the layers and fill up the little holes:



If you save that as 8bit PNG or BMP, you can import it in the room editor.

The same thing would also work with a character that's supposed to extend further to the front and back; in that case you have to cut away at the top and bottom using the same general method.

thiezar

This is a really good method. Never thought about it.
There is some work to do but, since a rectangular (or linear) baseline isn't possible, I guess this is the best way to keep a character in the right place. Thanks a lot Khris.

SMF spam blocked by CleanTalk