Grid based top-down movement

Get help using Construct 2

Post » Fri Apr 12, 2013 8:46 am

Is it possible to make grid based movement? An example of what I mean is Tibia.com

How would someone make this kind of movement in construct?
The video link shows what I mean:
http://www.youtube.com/watch?v=p7a1t-uvEPgAkamari2013-04-12 08:48:04
B
10
S
1
G
1
Posts: 11
Reputation: 961

Post » Fri Apr 12, 2013 9:06 am

@Akamari - This tutorial should help a lot (it did for me).

Cloning the Classics: Pacman -
https://www.scirra.com/tutorials/308/cloning-the-classics-pacman
B
9
S
3
G
4
Posts: 63
Reputation: 3,083

Post » Fri Apr 12, 2013 9:18 am

Cool I'll have a look, thanks for the link!
B
10
S
1
G
1
Posts: 11
Reputation: 961

Post » Fri Apr 12, 2013 12:19 pm

hello @Akamari...

i am a Tibia old school player :p

with the keyboard it works, but i don't know how to do with the mouse...
Like this great example @SirG: http://petislands.ru/test/2/index.html



My capx can help: https://www.dropbox.com/s/nkhma41jrvftbz4/PathGrid.capx
B
8
S
2
G
4
Posts: 17
Reputation: 3,372

Post » Sun Apr 21, 2013 12:17 pm

Thanks guys, before I looked at your replies I managed to make really simple grid based movement, here's a screenshot of the events I've done for anyone else who is interested:
https://dl.dropboxusercontent.com/u/14062469/GridbasedMovementEvents.png

@Relugy aah I see what you mean, I haven't managed to do that either..Akamari2013-04-21 12:19:20
B
10
S
1
G
1
Posts: 11
Reputation: 961

Post » Sun Apr 21, 2013 8:52 pm

with the mouse maybe you can compare the mouse x,y coordinates aginst the players and move the sprite a grid point in the direction of the mouse.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Mon Apr 22, 2013 5:14 pm

Hmm.. yeah I can sort of understand how it can work now, I might give it a go!

And also BluePhaze I read your 'Platform Enhancement - Wall Jumping' tutorial for another project I'm doing and was very helpful, thanks :)
B
10
S
1
G
1
Posts: 11
Reputation: 961

Post » Tue Apr 23, 2013 1:30 am

@Relugy in your example you have the character moving in a grid style, but in your capx you have him just moving node to node and not in a grid style. Can you give details on how you got your character to move grid by grid using path finding? thanks.
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Tue Apr 23, 2013 2:04 am

@Akamari Awesome glad it was of use to you! You may also want to take a look at lerp and set angle towards in order to find how to move in the direction of the mouse. These will allow you to figure out where the mouse is in relation to the grid and calculate the direction you need to move.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Tue Apr 23, 2013 3:03 am

ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Next

Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt and 33 guests