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

Offline ReiseReise

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Low framerate (20 fps)
« on: August 16, 2010, 11:30:15 AM »
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 Park, Arcen Games Founder and Lead Dev
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 21,108
    • View Profile
    • Email
Re: Low framerate (20 fps)
« Reply #1 on: August 16, 2010, 11:33:15 AM »
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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 9,942
    • View Profile
Re: Low framerate (20 fps)
« Reply #2 on: August 16, 2010, 11:34:54 AM »
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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline ReiseReise

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Low framerate (20 fps)
« Reply #3 on: August 16, 2010, 11:43:10 AM »
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
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 9,942
    • View Profile
Re: Low framerate (20 fps)
« Reply #4 on: August 16, 2010, 11:45:50 AM »
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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Dev
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 21,108
    • View Profile
    • Email
Re: Low framerate (20 fps)
« Reply #5 on: August 16, 2010, 11:46:05 AM »
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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 9,942
    • View Profile
Re: Low framerate (20 fps)
« Reply #6 on: August 16, 2010, 11:47:53 AM »
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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Dev
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 21,108
    • View Profile
    • Email
Re: Low framerate (20 fps)
« Reply #7 on: August 16, 2010, 11:48:38 AM »
Exactly.
Have ideas or bug reports for one of our games?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline Moonshine Fox

  • Hero Member Mark III
  • *****
  • Posts: 1,245
  • if (inRange()) { killHuman(); }
    • View Profile
Re: Low framerate (20 fps)
« Reply #8 on: August 17, 2010, 03:45:47 AM »
So four hyper-threading cores is overkill for AI:War? Damnit :(

*hugs his i7 comfortingly*

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 9,942
    • View Profile
Re: Low framerate (20 fps)
« Reply #9 on: August 17, 2010, 06: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?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!