Author Topic: Low framerate (20 fps)  (Read 5063 times)

Offline ReiseReise

  • Newbie
  • *
  • Posts: 2
Low framerate (20 fps)
« on: August 16, 2010, 12:30:15 pm »
My question is simple - how can I unlock framerate in AI War. I currently have 20 fps (fraps) and the game seems a bit shuttering.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Low framerate (20 fps)
« Reply #1 on: August 16, 2010, 12:33:15 pm »
AI War only runs at 20fps max, and unfortunately there is no way to unlock the framerate as the simulation and display loops are inextricably twined together at the moment.  However, in the upcoming AI War 4.0, when we switch to Unity 3D, the simulation loop will be still at 20 cycles per second, while the display FPS will be freed to run at however high (or low) the individual hardware can handle under the current load at any given time.  That won't make ships move any more smoothly or anything, but it will let the actual drawing framerate be potentially much higher.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Low framerate (20 fps)
« Reply #2 on: August 16, 2010, 12:34:54 pm »
The game only executes 20 simulation cycles per second, so drawing more often than that would mostly not change the actual appearance (iirc).  You can use the + key to increase game speed and it will try to run the sim faster and thus will draw faster, but it can be difficult to control the game at the higher speed.

Oh, Chris beat me to it.  Anyway, welcome to the forums :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ReiseReise

  • Newbie
  • *
  • Posts: 2
Re: Low framerate (20 fps)
« Reply #3 on: August 16, 2010, 12:43:10 pm »
Well, the game is shuttering slightly only when you quickly zoom in - zoom out.
And that's the only reason I thought about increasing frame rate.

I have one more question - is this game optimized to fully use 4-cores processors? In other words - will AI War run better on four cores in comparison to two cores?

PS. Thanks for very quick answer ; )

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Low framerate (20 fps)
« Reply #4 on: August 16, 2010, 12:45:50 pm »
The game will use 2 cores fairly well, but will not make significant use of any more than that.

You're welcome :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Low framerate (20 fps)
« Reply #5 on: August 16, 2010, 12:46:05 pm »
Our pleasure!

As for the stuttering when quickly zooming in and out, that actually might be due to it having to recalculate the icon groupings at the different zoom levels, not sure.

Regarding the 4 cores, that might help marginally (with things like sound/music playback, etc), but in terms of the main meat of the game that's only for 2 cores.  Basically, the main drawing and simulation cycles happen on a single core, and then all the hardcore AI thinking happens on a second core, and then any other minor threads (sound effects and music being big ones) are on hopefully the extra cores.

So there is some incremental benefit to having more cores than 2, but most of the benefit, by far, comes from jumping from 1 core to 2.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Low framerate (20 fps)
« Reply #6 on: August 16, 2010, 12:47:53 pm »
Of course, the 3rd and 4th core are great for making it possible for AI War's two cpu-heavy threads to run on their own cores without interruption, if you only had 2 cores then AI War would have to fight your OS and other stuff running-in-background and whatnot for cpu.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Low framerate (20 fps)
« Reply #7 on: August 16, 2010, 12:48:38 pm »
Exactly.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Mánagarmr

  • Core Member Mark V
  • *****
  • Posts: 4,272
  • if (isInRange(target)) { kill(target); }
Re: Low framerate (20 fps)
« Reply #8 on: August 17, 2010, 04:45:47 am »
So four hyper-threading cores is overkill for AI:War? Damnit :(

*hugs his i7 comfortingly*
Click here to get started with Mantis for Suggestions and Bug Reports.

Thank you for contributing to making the game better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Low framerate (20 fps)
« Reply #9 on: August 17, 2010, 07:29:24 am »
Yea, just have enough other cores so that AI War can have two of them 100% to itself, and then make those the fastest cores you can get your hands on, and that's the way to the fastest execution ;)

We do make incremental (sometimes rather large increments) improvements to performance as we go along, so it's not really a bad thing.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!