Hello Guest

Author Topic: Camera Depth Performance Impact  (Read 6100 times)

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Camera Depth Performance Impact
« on: October 22, 2012, 02:15:48 pm »
Hello everybody,

I am now organizing the layers of my game, so each layer have enough room to add and remove elements.
So my background will naturally be far into the Z, and the HUD will be closer the camera, etc.

I was wondering if having a large camera depth - say 800 pixels - has any significant performance penalty I should worry about.

I mean, it is easy for me to say that Background layers all live in 600-700, the game itself happens at 200-600 and the HUD and overlays live at 0-200.

The primary reason I am looking to use these large numbers is that in the game I am sometimes using 3D particle effects, so they do take up more Z than needed, and I want them all to stay within their layer (for example, a sphere shaped explosion with a sphere of 100 pixels, will originate at 400 but will send particles to 350-450 - and I want them to not appear on top of the HUD).

Thanks in advance for any input.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Camera Depth Performance Impact
« Reply #1 on: October 22, 2012, 02:20:40 pm »
Nope. The range of camera depth will make no difference to performance.

DannyB

  • 2D Toolkit
  • Hero Member
  • *
  • Posts: 609
    • View Profile
    • Chicks Ahead
Re: Camera Depth Performance Impact
« Reply #2 on: October 22, 2012, 02:33:35 pm »
Excellent! Thanks for the quick reply.