Set Polygons to Rounded Shapes?

Get help using Construct 2

Post » Tue Apr 01, 2014 12:29 am

Hi guys, i need to use Rounded Shapes for Collisions, what is the best way to set the Collisions Polygon to rounded shapes...i tried the normal way but it says i should not pass from 8 Polygon Points...

these are the shapes...
Image

thx
B
13
S
2
G
1
Posts: 28
Reputation: 960

Post » Tue Apr 01, 2014 2:31 am

There are no problem in going above 8 points, if you only have a few shapes and you don't add a lot of points. However depending on how accurate you want the collision to be, you can simplify the shapes like the one on the far right could be done with 5 points if you take the outer edges where they stick out, if you want more details, you can add the remaining 3 points where the shape goes the furthest inwards.

So it pretty much comes down to how precise you want it, making it extremely accurate is rarely useful as the player will most likely not notice it anyway, but if the game lags or run poorly they will notice very fast.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Apr 01, 2014 3:39 am

thx for reply...im planning to add like 100 shapes with their respective polygons points so lets say i use 10 points for each advanced shapes...

the method i display them are just moving from down the layout to the "Visible" layout, so they are created from the beggining, im just moving they like i said...this could drop some performance to the game? the graphics are simple as the one you see in the first message...

that will be the easy way to show every shape i need...but i think it will be better to Create the Objects when i really need it right? adding them as an Event/Action...

i think you know better options to add my objects to the game without losing performance...Note: All the objects has the same Behaviors/Effects...they only change their Shape and Position

any help would be great :D thx for reading
B
13
S
2
G
1
Posts: 28
Reputation: 960

Post » Tue Apr 01, 2014 6:33 am

Yeah its a good idea in general to only have the objects you need. So even if you have 100 objects like these, if only a few are on the screen at the same time it should be fine.

the method i display them are just moving from down the layout to the "Visible" layout, so they are created from the beggining, im just moving they like i said...this could drop some performance to the game?

that will be the easy way to show every shape i need...but i think it will be better to Create the Objects when i really need it right? adding them as an Event/Action...

i think you know better options to add my objects to the game without losing performance...Note: All the objects has the same Behaviors/Effects...they only change their Shape and Position

any help would be great :D thx for reading

I always prefer to destroy all objects at the beginning of the application, unless its a controller of some kind, where I know there are only 1 that I need or static objects that need to be there and I again know there wont be more during the game. Objects that you spawn during a game should be destroyed in the beginning, which are objects I like to refer to as rogue objects, because if you have them around, weird things and error might occur because you don't really know what these objects are doing. So you can just use the system.create object and create them when you need them. So I would strongly recommend doing that.

the graphics are simple as the one you see in the first message...

What the image looks like doesn't really matter, a sprite is a sprite for the computer, as it uses a RGB code (0-255. 0-255, 0-255) for each pixel to determine the color of that pixel, whether its black or white, red or green will hardly have any impact if any. its about the size of the sprite as it determine the amount of pixels.

But I wouldn't worry to much about performance, even if you had 100 objects with 10-15 collision points each at the same time, Im not sure performance would be suffering all that much, but you can test that when you have made them :D
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848


Return to How do I....?

Who is online

Users browsing this forum: ditocruz, uzumiapps and 26 guests