Replicate 8-direction behavior

Get help using Construct 2

Post » Thu Dec 08, 2011 8:57 am

Since it seems that the Chrome 8-directional bug when clicking is not going to be solved anytime soon (not blaming Scirra, it looks like Chrome's fault), I am in need of a way to replicate the 8-directional behavior with events.
Things of issue that I would have troubles with doing it myself:
-acceleration and deceleration
-diagonal movement (not moving faster than vert/hor, etc.)
-collision
-not getting stuck in walls when rotating

Thankfully my walls are all one object so I don't have to wait for families.

Any support would be very helpful.

thanks, sqiddster
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Dec 08, 2011 9:48 am

fake8Direction.capx

Or maybe just simulate control
8DirSimulate.capx
Last edited by Yann on Sun Sep 14, 2014 10:54 pm, edited 2 times in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Dec 08, 2011 8:48 pm

Thanks Yann, that's a good start. However it seems to miss a few very important things. The custom movement version does not do the smooth directional change evident in the 8-directional behavior. It also seems to stop instantly. Also it has huge problems with my neccesity, a constantly rotating object as the player.
The bullet version also does not turn smoothly and collision with walls does not really work ;)

Thanks a lot though... hmm... sqiddster2011-12-08 20:50:38
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Dec 08, 2011 9:42 pm

and what about the second capx? with simulated control?
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Dec 08, 2011 9:50 pm

Well that works of course but it is what I use in the actual game and it still bugs up.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Dec 09, 2011 8:09 am

that's weird. I posted it 'cause I tested it with chrome and there wasn't any bug.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Dec 09, 2011 8:17 am

It only occurs when you use the mouse as well.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Dec 09, 2011 10:27 am

Oh I see... Indeed really weird. It almost look like a focus issue.
Like when you click the focus of the webpage is recalculated and in this time the arrow input are ignored... maybe...
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Dec 09, 2011 10:45 am

Hmm, could certainly be. I am still lost for a solution?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Dec 09, 2011 11:24 am

I'm working (well... I should be working) on my paid job.

But as I'll use 8 direction and mouse in my c2 contest game I will probably have to find a solution.Yann2011-12-09 11:25:02
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Next

Return to How do I....?

Who is online

Users browsing this forum: Lof and 4 guests