Pixel Perfect Movement?

For questions about using Classic.

Post » Thu Aug 16, 2012 3:52 am

how to do this?

for example, i find that if i set it to move 1px at a time, it is still randomly moving like 3px instead.

please help.
B
6
S
1
G
1
Posts: 52
Reputation: 858

Post » Thu Aug 16, 2012 4:55 am

If you post a CAP file, I can check it out and see what's going on.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Thu Aug 16, 2012 10:03 am

oh yeah, sorry. i shoulda in the first place

example cap

nothing facy at all.
i get the feeling i solved this once, but cant remember.

what i'm aiming for is being able to tap the move button and just move 1px, you know being able to control movement down at those low values.

sorta like in super mario bros, how you'd tap the left or right to adjust yourself so that you're just right on the platform.

hope that makes sense
B
6
S
1
G
1
Posts: 52
Reputation: 858

Post » Thu Aug 16, 2012 2:46 pm

This all comes down to an issue of reflexes - it's difficult to hold down a key for a single frame, thus the key may remain held for an additional one or two frames unintentionally causing unwanted movement.

My solution

I introduced a three frame timer into the equation to solve the problem. By moving once upon a key first being pressed, then utilizing a timer to delay movement a few frames before resuming movement, you can now move one pixel at a time and yet still move with a largely imperceptible input delay.

I hope this helps. :)
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon Aug 20, 2012 9:24 am

thanks linkman!
seemed to work just fine,
i'll keep trying with that method now.

thx
B
6
S
1
G
1
Posts: 52
Reputation: 858

Post » Mon Aug 20, 2012 4:03 pm

No problem, man - let me know if you run into anymore problems.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests