Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I want an editor that accepts "points" of a minimum of three (a triangle) and I just add some points first, like this:

enter image description here

how can I mathematically connect these corners (points) into an object of multiple triangles? so amount of triangles looks like something like this, by connecting nearest point:

enter image description here

and then later render this and also being able to define what it is and check for collisions on this ground, so I can create more than Rectangle based "bricks" on a Platformer for example. Also being able to texturize the whole object without it looking ugly.

Any ideas? Or what is this called in game programming?

share|improve this question
up vote 4 down vote accepted

What you are describing looks to me like a triangle strip. Riemer has a tutorial for creating these in an efficient manner. So if user adds a point you just add one along the bottom of the shape and then create the triangles using the points in a clockwise manner, but the tutorial covers this quite well.

EDIT: For collision detection between points you can linearly interpolate between them and check the height value of your object and the interpolated points.

share|improve this answer
@Deukalion Did this solve the problem? If not, just leave a comment on what is needed for this to be a solution and I'll see if I can help... – Mikael Högström Aug 6 '12 at 9:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.