-
Following camera
I'm trying to create a game in which there is going to be a bunch of object in one room, or stage. The objects are going have locations outside the room as well as inside. My player will be at the center of the room at all times. When he moves, he still has to be in the center. This means that previously out-of-sight objects will come into sight. I was thinking of changing every single object's coordinates. This can't possibly be practical, as I'm going to have tons of objects such as particles.
What would be the most efficient way to accomplish this?
-
A camera class that produces a view matrix that is used in the transformation pipeline.
-
Yep. Any app that has a 3d camera will use this method, so if you need example code it won't be hard to find.
-
-
in Allegro
I'm doing this in Allegro (not Allegro3D or OpenGL), which means that I have a fixed-size bitmap. Thusly, I'm forced to check each and every single object to see if (a) it should be drawn on screen and (b) if it should be, then to calculate its position. Any alternative?
-
Then it's not what I would technically call a 'camera.'