# Any better ways of polygonning a circle?

Get help using Construct 2

### » Sun May 18, 2014 8:24 pm

So I have circles that need to bounce off each other. The problem is, a 10 point polygon isn't very precise for a circle and they end up overlapping a little. I can make more polygon points but C2 threatens me that that if I do that my game may run slower etc.

So is there any better way of doing it?
B
16
S
7
G
1
Posts: 167
Reputation: 3,163

### » Sun May 18, 2014 9:52 pm

Im running into the same problem, but for me it says 8 points is the maximum. Im trying to get the player to run around a circular object, but with 8 points it doesnt look too great lol.
B
12
S
2
Posts: 57
Reputation: 799

### » Sun May 18, 2014 10:27 pm

@pirx
@p0tayters

If you don't have many objects that have more than 8 polygons, you won't have any problems exceeding the 8 point count. I have used more than 20 points with no problem at all. Alternatively, you can break down your complex shape (in your case not so complex, but never the less...) in to smaller ones with fewer polygons and combine them to emulate the high poly shape.

Have a look at this topic (https://www.scirra.com/forum/viewtopic.php?f=147&t=101552), I had made a capx that uses both methods to illustrate the procedure.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

### » Sun May 18, 2014 10:44 pm

@eli0s
in the past i tried to make a big rock, so the player can run above it, but after some time i Stopped because the C2 polygon system making the player change from the run and fall animations.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,165

### » Mon May 19, 2014 12:11 am

@A0Nasser thanks!

That was probably due to adjacent polygons having more than 180 degree angle between them, and the speed of the Player's movement/Rock's rotation making the Player losing contact with the Rock. A workaround that I can think of on top of my head would be to pin a detector object just below the Player in a way that it overlaps with the Rock while the Player walks upon it, and add a condition that states that the falling animation can be played while the detector object is not overlapping with the rock.

Here is an example pardon me the creative liberty
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

### » Mon May 19, 2014 11:34 am

Construct 2's collision algorithm will have a high performance overhead if you use lots of collision polygon points. You can use more and if performance is OK then that's fine, but it would probably be faster to make a segment object (like a slice of cake) and have several points down the edge of the curve, then place several instances of those objects at different angles to make a full circle.
Scirra Founder
B
413
S
244
G
92
Posts: 25,082
Reputation: 199,732

### » Mon May 19, 2014 2:31 pm

Thanks, this is exactly what I meant by 'a better way'. I'll go ahead and try it out!
B
16
S
7
G
1
Posts: 167
Reputation: 3,163

### » Mon May 19, 2014 10:36 pm

@eli0s
WoW this indeed a creative capx.
Anyone have a problem with the collision overlap need to see this solution.
Thank's
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,165

### » Mon May 19, 2014 11:21 pm

@A0Nasser I am glad that you like it and that I was able to help
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

### » Fri May 23, 2014 11:13 pm

@eli0s @ Ashley Thanks! That helps alot! Im working on a game where everything is literally circles so making them into cake slices will help!
B
12
S
2
Posts: 57
Reputation: 799

Next