Moving Problem and changing animation before moving 4 ways

Non-platform specific questions.

Moving Problem and changing animation before moving 4 ways

Postby ericdg » Wed Sep 13, 2006 12:33 am

Question 1

I am making a pocket pc game. I thought I would not have all the slide - moonwalk problems that you would with a keyboard since I am using a directional pad.

I don't have the slide problem if I were only wanting to go left or right like in a platform game, but I want to do a top down game with a vehicle that moves up, down, left, right.

The problem lies with the 8 way directional pad of atleast my pocket pc and I'm sure other pocket pc's have an 8 way pad too.

When my pad hits an angle, like up and right it moves in that direction and I can set up an animation for that direction. When I move the pad from up right to right, it still shows the angle animation. Or when I move from up right to up I have the same problem.


I would actually be fine with only 4 directions. So I tried to make up right combo cancel out the x and y movements. This does stop the vehicle from moving at the angle, but it changes the animation to right, and it stays at right if I move the pad back in the up position causing the vehicle to move upwards with a right animation.

I tried makslane's avoiding platform slide code and it works for 4 directions, but when I hit the angles it still messes up the animation.

I am going to try Novice's code and I think that will work fine, I am just concerned it will be a performance hit on the pocket pc platform.

I can't believe this is such a big problem, and that there is not an easier way to do it.


Which brings me to question 2.

If Novice's code does work and is not a big hit on performance, or I find another way of doing it, does anyone know how I could achieve this desired effect.

If possible I would like the vehicle to show an animation of the vehicle turning to the direction I press before it actually moves in that direction. I think this can be achieved using wait for animation, but I don't know exactly how.

What I mean is now, I press right and it shows the vehicle pointing right, when I press left it instantly changes the vehicle to the left position, not very realistic.

If I could have the vehicle show an animation of it turning to right from left and all the other directions it would look much better.

Any ideas? Thanks guys.
ericdg
 
Posts: 53
Joined: Tue Nov 29, 2005 1:18 pm
Score: 1 Give a positive score

Re: Moving Problem and changing animation before moving 4 wa

Postby makslane » Wed Sep 13, 2006 2:44 am

I think you have the combined moves for two pressed keys, not a real 8 direction pad.

So, if you have an animation for the up and right keys, try handle the 'Key Up' event for the up key to avoid the wrong animation.


ericdg wrote:If Novice's code does work and is not a big hit on performance, or I find another way of doing it, does anyone know how I could achieve this desired effect.


Where's the post?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ericdg » Wed Sep 13, 2006 8:14 pm

http://game-editor.com/forum/viewtopic. ... ing+engine


My question is about getting the vehicle to turn before it goes in that direction, I think I can get novices code to work for the sliding problem.
ericdg
 
Posts: 53
Joined: Tue Nov 29, 2005 1:18 pm
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron