• Create Account

### #ActualRavyne

Posted 01 May 2012 - 01:29 PM

Firstly, the structure of the world and collision data are not inseparable -- they are related, but the data that defines them need not be one and the same. For example, you can have "primitive-based" collision (lines, curves(splines), and shapes) in a tile-based world, or you can have tile-based collision in a hand-drawn world.

All you need for collision is a method for determining whether something is "inside" of a shape, or "outside" of a shape. For lines and splines (planes and parametric surfaces in 3D), because there is no inside or outside, you simply choose one side to mean outside.

In rough order of complexity to calculate inside/outside:
Axis-aligned boxes and cubes
Circles and spheres
Lines and planes
Triangles (the trivial case of convex n-gons in 2D, because triangles are guaranteed to be convex)
Non-aligned boxes (again, boxes are known to be convex)
Convex n-gons in 2D
Axis-aligned ellipses and ellipsoids
Tetrahedrons (the trivial case of convex n-gons in 3D, because tetrahedrons are guaranteed to be convex)
Non-aligned cubes (again, cubes are known to be convex)
Convex n-gons in 3D
Non-aligned ellipses and ellipsoids
Curves and Surfaces (splines)
Concave n-gons in 2D and 3D

### #2Ravyne

Posted 01 May 2012 - 01:28 PM

Firstly, the structure of the world and collision data are not inseparable -- they are related, but the data that defines them need not be one and the same. For example, you can have "primitive-based" collision (lines, curves(splines), and shapes) in a tile-based world, or you can have tile-based collision in a hand-drawn world.

All you need for collision is a method for determining whether something is "inside" of a shape, or "outside" of a shape. For lines and splines (planes and parametric surfaces in 3D), because there is no inside or outside, you simply choose one side to mean outside.

In rough order of complexity to calculate inside/outside:
Axis-aligned boxes and cubes
Circles and spheres
Lines and planes
Triangles (the trivial case of convex n-gons in 2D, because triangles are guaranteed to be convex)
Non-aligned boxes (again, boxes are known to be convex)
Convex n-gons in 2D
Axis-aligned ellipses and ellipsoids
Tetrahedrons (the trivial case of convex n-gons in 3D, because tetrahedrons are guaranteed to be convex)
Non-aligned cubes (again, cubes are known to be convex)
Convex n-gons in 3D
Non-aligned ellipses and ellipsoids
Curves and Surfaces (splines)
Concave n-gons in 2D and 3D

### #1Ravyne

Posted 01 May 2012 - 01:24 PM

Firstly, the structure of the world and collision data are not inseparable -- they are related, but the data that defines them need not be one and the same. For example, you can have "primitive-based" collision (lines, curves(splines), and shapes) in a tile-based world, or you can have tile-based collision in a hand-drawn world.

All you need for collision is a method for determining whether something is "inside" of a shape, or "outside" of a shape. For lines and splines (planes and parametric surfaces in 3D), because there is no inside or outside, you simply choose one side to mean outside.

In rough order of complexity to calculate inside/outside:
Axis-aligned boxes and cubes
Circles and spheres
Lines and planes
Triangles (the trivial case of convex n-gons in 2D, because triangles are guaranteed to be convex)
Non-aligned boxes (again, boxes are known to be convex)
Convex n-gons in 2D
Tetrahedrons (the trivial case of convex n-gons in 3D, because tetrahedrons are guaranteed to be convex)
Non-aligned cubes (again, cubes are known to be convex)
Convex n-gons in 3D
Axis-aligned ellipses and ellipsoids
Non-aligned ellipses and ellipsoids
Curves and Surfaces (splines)
Concave n-gons in 2D and 3D

PARTNERS