# How do I create a similar game to "Flow Free" ?

Get help using Construct 2

### » Wed Sep 10, 2014 8:29 pm

Well, explaining better, I'm not trying to create an equal playing, but use the same mechanics of the game. Where the player touches the point and extending the line going through the given square.

So, how do I do this? :

* Move the horizontal and vertical lines in a controlled and defined manner.
* Create this line, as the player moves on the field.
* Recognize what is going right and left.

For those who do not know, the game is this:

If someone can give me a light on this situation, I would be very grateful.
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

### » Wed Sep 10, 2014 9:57 pm

* Move the horizontal and vertical lines in a controlled and defined manner.

Well you have a start point (where you started touching) and a end point (where you're currently touching). You could calculate the angle from start to end and use some choose a direction if the angle is close to 0, 90,180 or 270. There are conditions that help with this.

* Create this line, as the player moves on the field.

Every time you move create a circle at the player. For the line between the dots you can make a rectangle sprite with it's hotspot left-center. It's height should be the diameter of the circle and it's width should be the distance between one move to another. So you create this sprite at the player and set it's angle toward the previous circle. You have the direction moved so you can add 180 to that to get the angle.

* Recognize what is going right and left.

Beyond visualization, which the previous question had a solution for, you can store the inAngle and outAngle in instance variables of the circles. Just set them in the moving stage.

And my experiment of the day trying out some different ideas.
https://www.dropbox.com/s/yi7fthhebl9nt ... .capx?dl=1
/examples24/flowfree.capx
Not really helpful, but it has an amusing flaw.
Last edited by R0J0hound on Tue Aug 15, 2017 6:36 pm, edited 1 time in total.
B
98
S
36
G
131
Posts: 5,521
Reputation: 83,505

### » Thu Sep 11, 2014 4:10 pm

@R0J0hound

I do not know how to thank you, I was hoping someone simply comment on something related and indicate a direction to follow. But you went further than that, thanks for the help. XD
I've had something done, but with his help I can review certain aspects of my test.

Maybe I'll contact you again, to take any more questions, I hope it's not a problem XD
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

### » Mon Aug 14, 2017 7:18 pm

The link is broken could you upload it again? Thank you so much
B
3
Posts: 1
Reputation: 177

### » Tue Aug 15, 2017 6:37 pm

B
98
S
36
G
131
Posts: 5,521
Reputation: 83,505