Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: markbilly on Sat 26/12/2009 15:39:30

Title: What is wrong with this walkable area?
Post by: markbilly on Sat 26/12/2009 15:39:30
When the player gets to the far left side of this area, he cannot walk back again, it's as if the rest gets deleted...  :-\

(http://www.freewebs.com/markbilly/walkarea.png)

Help!

is it something to do with the shape? I have others in the game that are more extreme, though?
Title: Re: What is wrong with this walkable area?
Post by: monkey0506 on Sat 26/12/2009 16:10:43
How thick is that on the far left side there? I haven't actually opened it up in any editing program, but it looks as though it might be only 2 pixels thick...?

Due to technical reasons with the way the path finder works you should try to make sure your walkable areas are at least 3 pixels thick.
Title: Re: What is wrong with this walkable area?
Post by: markbilly on Sat 26/12/2009 18:15:16
I tried it with 3 and 4 pixels think. Still has the same problem. Also, I would have thought he would get stuck on the whole of the long bit, but the character gets confined to a small area at the very end...  :-\

It's really stumped me. There are objects in the room, that's why it's a strange shape walk area. Can't see any way they would obstruct things, though...
Title: Re: What is wrong with this walkable area?
Post by: Matti on Sat 26/12/2009 19:12:03
I remember having troubles with those sharp corners too. Have you tried smoothening the area a bit? Like this:

(http://www.2dadventure.com/ags/walkarea2.png)
Title: Re: What is wrong with this walkable area?
Post by: markbilly on Sat 26/12/2009 23:17:53
Nah, tried that and it's still not working. It's weird, whatever I do, he gets stuck about half way along the thin bit. And only on the way back over to the right...
Title: Re: What is wrong with this walkable area?
Post by: MrCheminee on Sat 26/12/2009 23:22:15
Is there maybe some object with a blocking function in the way?
Title: Re: What is wrong with this walkable area?
Post by: markbilly on Sat 26/12/2009 23:41:51
There is an object but I'm not sure it's in the way. How would I check?
Title: Re: What is wrong with this walkable area?
Post by: MrCheminee on Sun 27/12/2009 00:02:25
By temporarely giving the object an other place, or making it Visible=false and then run the game again to check. ;)
Title: Re: What is wrong with this walkable area?
Post by: markbilly on Sun 27/12/2009 00:12:33
No, it isn't that...

This is very strange, I've manage to do an area where it sort of works, but the area the character will walk on doesn't seem to relate to what I've drawn in the editor at all...  :-\

EDIT:

(http://www.freewebs.com/markbilly/walkarea2.png)

The red shows the approximate area the character moves in in-game.
Title: Re: What is wrong with this walkable area?
Post by: Rulaman on Tue 29/12/2009 12:15:24
Try to start your game in debug mode and press Alt+A.

It shows then only your walkable areas. Pess Alt+A again and you get back top the game.
Try to Switch between the two modes and move your player in small steps along the room.

(http://img190.imageshack.us/img190/7395/walkableareas.th.png) (http://img190.imageshack.us/i/walkableareas.png/)
PS: The red part is in the game black due to the characters position.

Greetings
Rulaman
Title: Re: What is wrong with this walkable area?
Post by: Khris on Tue 29/12/2009 18:06:22
Quote from: markbilly on Sun 27/12/2009 00:12:33
EDIT:

(http://www.freewebs.com/markbilly/walkarea2.png)

The red shows the approximate area the character moves in in-game.
Well, a character's bottom center is used to position them, so if in most of the frames, the character's actual pixels are a little further up, you need to either draw the walkable areas a bit further down or - way better - set the character's .z property to something like -3.
Title: Re: What is wrong with this walkable area?
Post by: markbilly on Tue 29/12/2009 20:19:21
I seem to have found a way of getting this to work now. I think the main problem was to do with the fact that the characters feet are 3 or 4 pixels above the bottom of all the frames. Thanks for all the help guys, it's made walkable areas a lot easier for the future! :)