Wintermute Engine Forum

Wintermute Engine => Feature requests, suggestions => Topic started by: vadbag on February 05, 2007, 03:37:23 PM

Title: Improved actor's movements
Post by: vadbag on February 05, 2007, 03:37:23 PM
When actor is made to go left or right and the position of the mouse click is slightly above or below actor's hot spot, he goes to the new point in a straight line. This looks unrealistic, since the actor's legs walk strickly right or left (as animated), but the actor also "floats" upwards/downwards.

My suggestion is to make the actor follow a so-called "L" shaped line in this case, so that if the position of Mouse click was slightly above/below the hotspot, actor firstly goes upwards/downwards (or in diagonal) until he's at the same horizontal level with the mouseclick point, and then goes right/left.

I've seen this approach in a game, made with "Point&Click Development Kit" Engine. This game, as an example, can be downloaded here:

http://www.how2make.ru/h2mgame.rar (8mb)

This approach, in my opinion, produces much more realistic results.  :)
Title: Re: Improved actor's movements
Post by: Mnemonic on February 05, 2007, 04:54:08 PM
The problem is (due to the way pathfinding works in WME) that while straight line guarantees the path is clear, the L-shaped path doesn't. So it could easily happen that the L-path goes through a blocked area.
On my ToDo list there's other task: to allow the developer to define exactly which animation to use for each walking angle. That should, to some extent, solve this problem too.
Title: Re: Improved actor's movements
Post by: vadbag on February 05, 2007, 06:42:00 PM
to allow the developer to define exactly which animation to use for each walking angle.
I don't quite understand what you meant...  :-\ Do you mean, there will be 360 directions instead of current 8? ??? If so, then there'll be huge number of sprites needed... Or is it something else?
Title: Re: Improved actor's movements
Post by: odnorf on February 05, 2007, 07:13:00 PM
He means that you will be able to define how many directions you want depending on the angle.  ;) But I bet no one would be crazy enough to choose more than 8-16 directions. We have real time 3D characters for that.

In other words you could instruct the engine to use sprite A for angles 0-10, sprite B for angles 11-16 etc.
Title: Re: Improved actor's movements
Post by: vadbag on February 05, 2007, 07:30:22 PM
To: Odnorf
Thanks! I see what you mean.

IMHO, this approach will make 2d artists' job more complicated, and the result won't be ideal...

To:Mnemonic

Can't the waypoints be used to make sure the actor avoids blocked areas (with L-path)?
Title: Re: Improved actor's movements
Post by: Mnemonic on February 08, 2007, 10:49:30 AM
Can't the waypoints be used to make sure the actor avoids blocked areas (with L-path)?
Well that's the problem. The waypoint system is designed to allow the actors to walk in *any* direction..
Title: Re: Improved actor's movements
Post by: vadbag on February 09, 2007, 06:54:21 PM
Sorry, but a last try...  :)

What if the L-path is created via two straight paths? In other words, when the player Left clicks, the game checks, whether Scene.MouseY equals to Actor's Y position. If it does, then actor.GoTo(Scene.MouseX, Scene.MouseY); if it doesn't than actor first goes to Scene.MouseY and from there goes to Scene.MouseX  ;D I think, this might be done within scene.script

What do you think?
Title: Re: Improved actor's movements
Post by: TheDerman on February 09, 2007, 07:42:49 PM
I think this problem will improve greatly if we could simply have more directions of movement like 12 or 16. Is that hard to implement in the engine?

Being able to chose the sprites we use for certain angles will help, but I also think that with 16 directions, that might not even be necessary.

The problem as I see is that there are only those 8 angles, and so the engine has to choose the best one to fit where the character is walking to, and sometimes it just looks out of place if the engine chooses the LL angle and yet still goes off on a diagonal. If there was a direction between LL and UL, it could pick that instead which would look more natural.
Title: Re: Improved actor's movements
Post by: Mnemonic on February 11, 2007, 12:46:11 PM
vadbag: It will work fine and should be easy to script, but only in case you'd use rectangular blocked areas only. I remember actually posting some simple script implementing the l-shaped movement, but I can't seem to find the thread right now...

TheDerman: Yup, it's on my todo list.