Polygons with max 8 vertices

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Polygons with max 8 vertices

Post by Bannana97 »

If I am to make an efficient game, I must have shapes with large amounts of vertices.
What can I do to make a polygon with an unlimited number of vertices? I need the ability for terrain. :awesome:
User avatar
kexisse
Citizen
Posts: 56
Joined: Wed Jun 13, 2012 2:52 pm

Re: Polygons with max 8 vertices

Post by kexisse »

Somebody already asked this question recently:
viewtopic.php?f=4&t=9838&hilit=vertices

There are other posts that you can find with the search function:
search.php?keywords=vertices
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Re: Polygons with max 8 vertices

Post by Bannana97 »

Okay, thanks.

I found this link at that URL: http://vrld.github.com/HardonCollider/r ... plitConvex

The way my game works is going to be hard for me to make more than 1 polygon...
So does that splitConvex method allow me to make a polygon with more than 8 vertices, then use that method on it to split it up or what?
I am somewhat confused!! :death:
User avatar
kexisse
Citizen
Posts: 56
Joined: Wed Jun 13, 2012 2:52 pm

Re: Polygons with max 8 vertices

Post by kexisse »

Bannana97 wrote:The way my game works is going to be hard for me to make more than 1 polygon...
Why?
Bannana97 wrote:So does that splitConvex method allow me to make a polygon with more than 8 vertices, then use that method on it to split it up or what?
I think originally it's for splitting up concave polygons into convex triangles, but try it, it probably works for splitting up any polygon into smaller triangles.
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Re: Polygons with max 8 vertices

Post by Bannana97 »

Why?
I am trying to make terrain in which you can dig.
When you dig, it will create 3 new points in the polygon to make an up-side-down triangle shape in the ground, so that the physics engine can walk down into it, and back up, like a real hole.

^^
User avatar
kexisse
Citizen
Posts: 56
Joined: Wed Jun 13, 2012 2:52 pm

Re: Polygons with max 8 vertices

Post by kexisse »

If your polygons will have notches cut out of them, they will be concave, so you will have to split them into convex polygons anyway.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests