I'm looking through my code and in a state where I'm testing and optimizing where possible. At the moment the only signifigant time hog in my loop is RenderWorld(). With about 730 entitys (almost all simple cubes) it takes 40-45 millisecs per renderworld(). Granted I've got a lot of entitys, but they're all very simple, is there any kind of optimization I could be looking to do with camera settings, or any other tricks etc?
They all are within my camera view range so sadly I can't tweak that. They're also all inside my fog range.
I tried using EntityInView to determine something was visible and use HideEntity if it wasn't visible, but I assume render world already basiclly does this internally because it improved the renderworld() time down to 34-38millisecs, but the frame rate was exactly the same, so the time was just taken up with my code, rather than the renderworld code. (maybe there's a way to optimize EntityInView? or something I can do to do fewer checks, rather than every object)
Any thoughts?
They all are within my camera view range so sadly I can't tweak that. They're also all inside my fog range.
I tried using EntityInView to determine something was visible and use HideEntity if it wasn't visible, but I assume render world already basiclly does this internally because it improved the renderworld() time down to 34-38millisecs, but the frame rate was exactly the same, so the time was just taken up with my code, rather than the renderworld code. (maybe there's a way to optimize EntityInView? or something I can do to do fewer checks, rather than every object)
Any thoughts?