Walkable net - good/bad idea?

Started by StillInThe90s, Wed 07/03/2012 20:06:50

Previous topic - Next topic

StillInThe90s

Hey people.
I have been wrestling with my walkcycle for quite some time but never really managed to get it right. Straight angle movement works fine, but diagonal walking looks crap.
So I set up a net of walking paths to get rid of the diagonals all together and it actually worked, at least in my opinion. The result kind of resembles Beneath a Steel Sky (where a character finds and walks to x, then y, instead of going straight for x,y) only a bit twitchier.
My pathway net consists of 2-4 pixel wide walkables with 10-25 pixel gaps in between. Game is 320x200.
Now, what would you people say about using this kind of system? Has anyone else tried it?

selmiak

doesn't AGS already do this for you if you don't provide the diagonal view walkcycles?!

StillInThe90s

Well, I have DiagonalLoops turned to false and I'm using a view with 4 loops. This has (it seems to me) no effect on how characters move, it only changes the choice of loops. What am I missing?

Khris

Nothing, characters still walk diagonal even without diagonal loops. Not sure where selmiak got that idea :)

WHAM

#4
Your method of doing this is probably the simplest to do, however it is also the most work-intensive if you have many rooms to implement this in.
Another way would be to do the following (pseudocode):

Code: ags

Player_Clicks_Ground(int Xc, int Yc) {
  Store Yc and Xc into a global variables;
  player.walk(Xc, player.y, eNoBlock);
}


Repeatedly_Execute() {
  if (player.x == Xc && Xc != -100) {
    player.walk(player.x, Yc, eNoBlock);
    Xc = -100; //We use -100 as default value for Xc, could be anything you don't use in your game
  }
}



I hope that makes any sense.
I used a similiar thing in an earlier project to keep track of player movement when making non-blocking room changes.

EDIT: Just realized that this only works in simple rooms, where the walkable areas are not of too complex shapes. For example, a narrow area of walkable area (say, a bridge) would still cause the AGS pathfinding to kick in and cause diagonal movement. Oh well, it seemed like a good idea until I started thinking about it.
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

StillInThe90s

I did actually think of using something like this but came to the same conclusion as you did. It would have to be a lot more complex with constant checks and stuff. So I basically gave up and went low tech instead.
My current project is using a coordinate storing system like yours, for things like changing walk speed while moving.
Thnx for making an effort btw.

It seems kind of strange to me, that you never or rarely see this issue brought up. This is, in my opinion, one of the most problematic things with this engine.
Are people making their own walk mods or is everyone fine with a kicking rag doll sliding across the screen? (because that is what I get)
Sorry if I'm being vainglorious. English is not my native language.

WHAM

I think most people (like myself) just ignore the slight sliding as:
A: most room backgrounds have low perspective and thus fairly little vertical movement
B: simple enough graphics that issues like this don't really stand out

Not sure if people working on more high-end AGS games really think about this, though.
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

StillInThe90s

That's the secret, isn't it. Low perspective with minimum verticals.
I will have to remember that if I ever finish this project and get to start a new one.

Eric

Quote from: StillInThe90s on Fri 09/03/2012 22:16:50
That's the secret, isn't it. Low perspective with minimum verticals.
I will have to remember that if I ever finish this project and get to start a new one.

If nothing else, I've learned this just in time to start on my own project, and so thank you for my knowledge gained.

StillInThe90s

There you go. My first useful contribution to this community in ten years.

Bernie

What really helps visually is making the y speed at least a half or a third of the x speed. It seems to work well enough for 4-direction sprites. Most adventure game rooms have the vanishing point somewhere in the vertical middle, so slowing down the y-speed makes the movement look more logical.

SMF spam blocked by CleanTalk