Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: Rule of Thumb  (Read 4527 times)

mustang60348

  • Member
  • **
  • Posts: 92
  • newbie
Rule of Thumb
« on: November 28, 2012, 10:16:06 am »

For the DEVS: What would a 'good' time be to spend inside the game loop or HOW LONG IS TOO LONG

I put in some code in my OV10 to monitor the time spent in the loop and it is still very short (which is good) I wonder though , at what point does it become 'bad'
« Last Edit: November 28, 2012, 10:18:30 am by mustang60348 »
Logged

Chaoz

  • Full Member
  • ***
  • Posts: 156
  • newbie
Re: Rule of Thumb
« Reply #1 on: November 28, 2012, 01:18:04 pm »

i'd say at maximum the time it takes to render a frame, but what do I know :D
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Rule of Thumb
« Reply #2 on: November 28, 2012, 03:00:10 pm »

It's kind of hard to say. The timing is determined by how fast the renderer can render the frame. There are two main threads - application thread and renderer. The application thread prepares the scene and then waits. Scripts run in this thread, so the key thing is to finish with them sooner than the next frame is going to be prepared.

Actually, we should be able to tell how much time is there, need to add some statistics for that.

Anyway, the script code is normally fast, it's optimized at runtime by JIT, which can make it only 2-4x slower than native code (which is quite good for short scripts like that).
Logged

mustang60348

  • Member
  • **
  • Posts: 92
  • newbie
Re: Rule of Thumb
« Reply #3 on: November 28, 2012, 03:31:12 pm »

Thanks
Logged