Game Development Community

C++ Class that can handle huge amounts of objects?

by Timothy Volpe · in Torque Game Engine Advanced · 10/17/2010 (5:40 pm) · 3 replies

In my current project, I need to have a massive number of objects render on the srccen at once, up to about 80,000. MOST of the objects will be square, but, of course, special objects will be non-square, but will fit into the square grid, and have a square collision mesh. I want to write a class (C++) for an object that can have many objects randered. They are static, they will not have animations. They do need collision, but thats not hard, for squares I mean. I need to be able to specify a model. So, how can I create a class for such a task? To keep performance up, it needs to have almost all the features of a statis shape removed except for collision.

#1
10/20/2010 (10:24 pm)
...
#2
10/21/2010 (5:04 pm)
The problem lies that the shape instance can hold an information per instance (per single shape). Currently I've done tests to create several shapes in a single class,but strange problems appeared - the first shape was fine,the rest shapes lose a transformation.
Currently this sounds doable,but you'll have to do serious modifications on the mesh (tsMesh),shape (tsShape) and per instance information (tsShapeInstance).
#3
10/24/2010 (4:50 pm)
Im trying to get code to create a shape, but the 3FBox and 3FPoint and stuff confuses me...