Circular Layout Boundary

Get help using Construct 2

Post » Fri Mar 21, 2014 3:10 am

I want to make the layout boundary a circle for a space type battle game. Thing is you need to be able to collide with the edges as if it were a solid type object. The layout is extremely big (6000x6000), so 4 large quarter circle images would not really be efficient would they?
B
19
S
5
G
2
Posts: 72
Reputation: 1,846

Post » Fri Mar 21, 2014 3:43 am

Well, each quarter circle would have to be 3000x3000. Which I think is bigger then the recommend size. Of course you can simply cut the images up into smaller parts. If it's not for mobile, I wouldn't worry about performance so much with just those images. You could also use a smaller image for tilling and make a circle of solid objects (invisible or not) around whatever it is your doing. Not sure what your asking beyond that though.
B
25
S
4
G
1
Posts: 47
Reputation: 1,723

Post » Fri Mar 21, 2014 8:15 pm

How could I make a circle of solid objects with tiling?
B
19
S
5
G
2
Posts: 72
Reputation: 1,846

Post » Fri Mar 21, 2014 8:31 pm

Just test the distance(x1,y1,x2,y2) from the center of the layout.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Fri Mar 21, 2014 8:47 pm

If you want a circular collision of diameter 6000 centered in your layout, you don't need any sprite with solid behaviour.
The only thing you need to do is to make sure that the distance between the ship and the center of the layout is less than 3000
Here's how you could do it:
circularAreaCollision.capx
B
67
S
22
G
14
Posts: 1,485
Reputation: 16,536


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 12 guests