Author Topic: Any negatives to FlxG.framerate = 20; ?  (Read 1590 times)

Minverva

  • Active Member
  • ***
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Any negatives to FlxG.framerate = 20; ?
« on: Mon, Sep 8, 2014 »
It seems to be a decent way of slowing game play without using timescale.

Arkeus

  • Contributor
  • ****
  • Posts: 321
  • Karma: +1/-0
    • View Profile
    • I, Arkeus
Re: Any negatives to FlxG.framerate = 20; ?
« Reply #1 on: Mon, Sep 8, 2014 »
The biggest downside is that you'll be running at 20 fps, so it won't be nearly as smooth. An object moving at 60 pixels per second at 60fps moves a smooth 1px a frame, whereas 60 pixels per second at 20 fps means 3 pixels a frame (and 3x as long between frame updates) which will appear choppier. There's a reason people complain when companies release games in 30fps instead of 60, the less smooth the rendering is, the more distracting it is from actual gameplay.

Also, I think the way flixel does the software mouse it means the mouse will often feel much laggier because users are used to their mouse moving synced with their monitor refresh rate.

Minverva

  • Active Member
  • ***
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Any negatives to FlxG.framerate = 20; ?
« Reply #2 on: Mon, Sep 8, 2014 »
There's a reason people complain when companies release games in 30fps instead of 60, the less smooth the rendering is, the more distracting it is from actual gameplay.

I think it can be a problem with higher end fps shooters. I'm not seeing any visual problems with it set at 20 fps, but my experience may not be applicable to others.

Are there different ways of slowing down gameplay without using timescale?

Quote
Also, I think the way flixel does the software mouse it means the mouse will often feel much laggier because users are used to their mouse moving synced with their monitor refresh rate.

I'll have to ask people about this when they test it. I should get younger eyes.

Wouldn't setting it at a lower fps reduce overall lag since the game won't have to perform calculations as quickly?

Arkeus

  • Contributor
  • ****
  • Posts: 321
  • Karma: +1/-0
    • View Profile
    • I, Arkeus
Re: Any negatives to FlxG.framerate = 20; ?
« Reply #3 on: Mon, Sep 8, 2014 »
Are there different ways of slowing down gameplay without using timescale?

You could always roll your own. Set your own velocities and multiplier it by some time value, and set the flx velocities to that.

Is there any reason you don't want to use timescale?

Wouldn't setting it at a lower fps reduce overall lag since the game won't have to perform calculations as quickly?

If your game can calculate it at 20fps, then setting it higher means it'll be at least 20, so it would be less laggy.

And obvious way to show how it affects gameplay would be to set the fps to something like 2, and see the difference. The difference between 60 and 20 won't be nearly that bad, but it's an example of the effect it has that makes it obvious.

Minverva

  • Active Member
  • ***
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Any negatives to FlxG.framerate = 20; ?
« Reply #4 on: Mon, Sep 8, 2014 »
Is there any reason you don't want to use timescale?

The main reason is that I've already used timescale for so many different checks across so many different classes that it would be really tedious trying to change it all using timescale and I'm afraid I'd introduce a lot of bugs.

Changing the fps rate seemed to fix a couple sound problems I had too.

So basically, it comes down to saving time for other things for me. I'll just have to figure out if it is worth it or not.

Thanks for your help.