• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Lag Issue: FPS lower than fps_real?

A

Ayziak

Guest
Hi All,

I recently purchased and added Nocturne's Aura 2.0 lighting engine. I chose it specifically because it's meant to be lightweight (I worked a lot with CBNA back in the day.) However, I am still getting a ton of lag, but unusually fps_real is still reading in the hundreds while regular fps tanks to 2~15. Because of this, delta_time does not register properly and I couldn't use it if I wanted to (though I'm very much trying to avoid delta_time).

Has anyone else worked with this engine and encountered similar problems?

Either wat, thanks for taking the time to read!
 

TsukaYuriko

☄️
Forum Staff
Moderator
Are you on Windows 10 2004? That's a common issue with this patch. Play around with the sleep margin in your game's settings, as this seems to alleviate the issue, then please file a bug report about it.
 

Neptune

Member
Now sure how @TsukaYuriko can deduce that out of the infinite possibilities.

Could be a bad line of code, a large surface constantly not being handled properly, could be a particle spawning 10,000 times on itself, could be a crap light engine, could be too many instances...

Maybe try to isolate your project from the engine and do some testing. Your FPS real usually displays as a higher number than your FPS.

if things are working properly, your "FPS" should hover at room speed.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Merely taking a shot in the dark based on the dozen of "my game is laggy but fps_real pretends nothing is wrong" topics we've been getting in the past few weeks that have all had the same cause and solution. :)
 

Neptune

Member
These cases don't seem sudden to me.
But anyways, makes me think a "fix your laggy project" thread would be useful 😁
 

Coded Games

Member
From my experience fps_real is always double or triple what actual FPS is (by setting room speed to 999 and seeing what you actually get with fps).
 
A

Ayziak

Guest
Now sure how @TsukaYuriko can deduce that out of the infinite possibilities.

Could be a bad line of code, a large surface constantly not being handled properly, could be a particle spawning 10,000 times on itself, could be a crap light engine, could be too many instances...

Maybe try to isolate your project from the engine and do some testing. Your FPS real usually displays as a higher number than your FPS.

if things are working properly, your "FPS" should hover at room speed.
@Neptune @TsukaYuriko @Coded Games Thank you all for your responses!

To answer your suggestion @Neptune, the project is brand new and as such almost empty. Running the engine on its own also offers good frame rates. As the whole engine is built by an experienced programmer specifically to be lightweight, this makes sense, however, I can't figure out why there's an issue upon combining the project. Even when I use only the engine's code (none of my own), it lags in my project. Perhaps there's a project setting I don't know about? I believe I have checked through all. I've had far worse code (no shade to CBNA but it was heavy lol) that still ran at 60+ on my system. I'm just confused at this.


EDIT: Upon further testing, even the engine-provided samples do indeed lag. Is there something more I can optimize within my project (perhaps new in 2.3?) or should I be contacting @Nocturne?
 
Last edited by a moderator:

TsukaYuriko

☄️
Forum Staff
Moderator
All signs point towards this being an issue with your device in general rather than any specific project, which in turn points towards everything I brought up earlier.

Did changing the sleep margin have any effect on this? Are you on the Windows patch I mentioned? If so, disabling the new "game mode" feature in your OS settings may also help.
 
A

Ayziak

Guest
All signs point towards this being an issue with your device in general rather than any specific project, which in turn points towards everything I brought up earlier.

Did changing the sleep margin have any effect on this? Are you on the Windows patch I mentioned? If so, disabling the new "game mode" feature in your OS settings may also help.
Thanks for your continued help- I am indeed on windows patch 2004. I have tried both these suggestions, (tried sleep margin at 0, 1, 10(default) and 100(just to test) ) all to no avail. Side note: interestingly, running some previous (exported) projects that were relatively intensive still do indeed run fine.

EDIT: just to include some additional info, when I set an almost empty room to 999 game fps, fps reads approx 175 while fps_real still reads 500-1000+. If it helps for system reference I'm running an i7-8650U, 16GB RAM, and a GTX 1050, so there shouldn't really be any true system limitations.
 
Last edited by a moderator:

Neptune

Member
Sooo, the project runs good WITHOUT the light engine. The project runs bad WITH the light engine. Old intensive projects run fine...

Seems very much pointing to the light engine lol
It might not be bad code, perhaps just a compatibility thing??
 
A

Ayziak

Guest
Sooo, the project runs good WITHOUT the light engine. The project runs bad WITH the light engine. Old intensive projects run fine...

Seems very much pointing to the light engine lol
It might not be bad code, perhaps just a compatibility thing??
That's what I'm thinking. My next step is contacting the engine's developer, @Nocturne. My last test attempt is setting up YYC, which I am currently in the process of.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
My next step is contacting the engine's developer, @Nocturne.
Hello! Just saw your email... I'm about to sign off for the night, but I will 100% be sure to reply to you (by email) tomorrow. Sorry you're having this issue, but I'm sure we can sort it out!
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Are you on Windows 10 2004? That's a common issue with this patch. Play around with the sleep margin in your game's settings, as this seems to alleviate the issue, then please file a bug report about it.
im running windows 10 2004 have not noticed any fps issues
 
A

Ayziak

Guest
Hello! Just saw your email... I'm about to sign off for the night, but I will 100% be sure to reply to you (by email) tomorrow. Sorry you're having this issue, but I'm sure we can sort it out!
Wonderful! Thank you so much!
 
Top