Tag Info

Hot answers tagged

3

You may want to consider looking to spacial partitioning, such as a Quadtree. In a nutshell, you would be dividing your world into sub-sections, and only check collisions between objects that are inside of the same sub-sections, greatly improving the complexity.


2

Box2D has a Java library. It might be a bit more than you need but it's pretty robust and used in all sorts of projects. Maybe someone else can recommend a better library solely for collision detection. If you want to roll your own solution, which would probably be better if you want to keep it simple, you'll need to look into Oriented Bounding Box (OBB) ...


1

If you eventually end up going with the pre-rendered shadow approach, or any other texture based solution... To save some memory, and maybe also to be able to soften up the edges of the shadow (maybe even contact hardening shadows), have you considered using distance field textures? They are useful for monochromatic textures (decals, fonts and shadows!), ...


1

You can use the even-odd algorithm. In summary it does the following. Loop thru each scan line Intersect the scan line with each polygon edge Sort the intersection points by x value Fill interior pixels between intersection points using the even-odd rule to determine interior points Note, you have to guard against degenerate cases like intersecting with ...


1

It's all about tradeoffs. But first, occlusion culling is to hide what is being hidden by other objects, not what falls outside the viewing frustum. What you described is called frustrum culling. Sure, you can do that and only request to draw polygons that you will see, but those calculations, along with the time required to update the index buffer may ...



Only top voted, non community-wiki answers of a minimum length are eligible