Movement Behavior Flaw/Problem[solved]

For questions about using Classic.

Post » Mon Dec 01, 2008 11:15 pm

ty all
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Mon Dec 01, 2008 11:48 pm

The left/right thing was actually made that way on purpose in response to problems with the built in behaviors, specifically in platforming where holding down both left and right at the same time produced odd looking results.

Changing it back would be back-tracking. Though I guess, as you suggested, having the option to pick which way you want it to behave would be the best idea.

As for professional fighting games and such... those are usually played with arcade sticks or, at the very least, gamepads, so you can't ever press both left and right at the same time anyway. There is no "right way" to do keyboard controls really, as there's no standard for it, and everyone is going to play differently. Playing on the keyboard allows for really sloppy keypresses that you wouldn't ever have to bother worrying about on sticks or pads. And special circumstances usually call for special attention, which means it's not something that only a few people would actually use, therefore it doesn't need to be put in as a general feature, yadda yadda. But every time I make that argument one of the devs comes along and says "sounds good, we'll put it in!" so what do I know? :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Dec 02, 2008 12:54 am

When you hold the left and right arrow keys, the 8 direction movement ignores both, acting as if no keys were pressed at all (as Deadeye says, in response to bug reports about holding both left and right down at the same time). However, you can always circumvent this by using a set speed or something instead.

I think what you want is a set X and Y velocities manually in 8 direction? It seems the problem arises when you Set Angle in the sprite and the 8 direction's angle of motion doesn't update.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Dec 02, 2008 9:52 am

ty for speedy replies
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Tue Dec 02, 2008 12:53 pm

[quote="manontherun":1430iv5h]Ignoring input is bad IMO.[/quote:1430iv5h]
Actually, it kind of makes sense: pressing both left and right at the same time causes equal acceleration in opposite directions, resulting in a zero force overall.

[quote:1430iv5h]In a fighting game ignoring input might mean a move not coming out.[/quote:1430iv5h]
How come? Why is the 8 direction movement responsible for affecting your events involving a separate object (mouse & keyboard)? It doesn't make the key get globally ignored - the mouse & keyboard object still sees all keypresses - it's only the 8 direction movement that has a special case for left and right held down. If you code a key combination to produce a move with the mouse & keyboard object, the 8 direction movement will not affect this.

[quote:1430iv5h]Remember I have to make it remember when it's double pressed even when it's moving in the opposite direction. [/quote:1430iv5h]
Why does this require 200+ events? Surely you don't need to take in to account the current direction. You could just do:

+ On 2nd tap of double tap
-> Set angle to ... (assuming 8 direction updates direction of motion here as well)
-> Set speed to ...

Alternatively you could always ditch the behaviors and code your own custom movement, which I think one of your examples demonstrates. It's not a large amount of events to reproduce the 8 direction movement. I can't figure out why you think you'll need so many events!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Dec 02, 2008 1:09 pm

I have to agree that pressing 2 keys at once would cancel each other out; it's perhaps a remedy of translating a joystick into keys. If you were to yank the stick both ways it'd end up in the center.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests