Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Is performance getting worse on newer systems?

Author
Message
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 2nd Sep 2016 03:16 Edited at: 2nd Sep 2016 03:22
Preamble:
I've been using Dark Basic Pro since about 2002. I have a few half made games that I like to tinker with off and on. Also probably a few more editor programs and the like to support those.


I find programming fairly easy. But it seems that programming to get a high frame rate requires being efficient. It seems being efficient requires building complex and ingenious systems to make the program do the absolute minimum amount of work behind the scenes without it affecting the player at all. That isn't easy.

To that end over the years I've figured out a lot of things like using a system to keep track of loaded textures and objects so I can link to them or clone them instead of loading them off of the hard drive again and wastefully duplicating memory. Whole sections of levels disappear when the player cannot see them. Characters don't animate or collide with stuff when culled. Etc.

The thing is I've cut down drastically on memory and load times over the years but it feels like every time I make a gain with performance, I'm only able to keep pace with things.
Is my frame rate any better than it was 10 years ago when I was using horrible optimization? Not really.

Often I see things at a 40-50 fps zone. My computer is a beast compared to what it was then.
We're talking a 2ghz AMD w/ Geforce 8800 vs. 3.2ghz AMD w/Geforce 760
In some cases I'll say oh in this old level I remember getting 40fps back in 2008... 16fps now.

I can activate a debug overlay with live timing of all the games functions. I can account for maybe 2-3ms for Enhanced Animations plugin that got added that's it.

I recently started looking at Draw Calls for the first time in detail. Added a new optimization layer. I dropped the Draw Calls down from about 800 to 200. No additional CPU overhead added (tracked the timing). We're talking a massive massive overhead improvement. FPS doubles to about 30fps.

I'm like damn. How could I get a higher fps on older hardware and no optimizations?

I'm starting to suspect that newer computers don't do some stuff as good as older computers did. Like Video Drivers/Hardware or DirectX or Windows10 not being optimized for DBP or Directx9. Not to mention there are web articles that estimate DX9 bottlenecks at 2000-3000 draw calls not 200-300.

It's strange and I'd figure I'd mention it.
Maybe I've missed something.

Also I was looking at Rudolfo's DX11 Plugin. But that would be a massive undertaking to switch to, and I'm not sure yet if things I need are compatible. I'd estimate I could squeeze another 10-20 fps after doing all that work, since I'm not confident I use enough identical objects.
https://forum.thegamecreators.com/thread/210180
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 2nd Sep 2016 04:12 Edited at: 2nd Sep 2016 04:14
I'll add this too...

I found an old screenshot of an old level which happens to have a frame rate counter.
So I remade the scene:






So in 2012 I was getting 28 fps. In 2016 using the same level and optimizations less than half that 13 fps. I've changed a few things around since then but nothing is showing up in the timing that would explain a 50% performance drop. I can see the extra 40ms inside the SYNC render.
Brand new optimizations just annihilate the Draw Calls from 1241 to 92. The frame rate skyrockets.

It's great I can find in some scenarios a big big boost by being smarter. But it feels I'm in a race with the underlying system getting slower.
I don't see why that should be the case.


I'm hoping someone can mention something that might be helpful here.
Thanks.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 2nd Sep 2016 10:40
Based on my experience, I cannot agree about the performance drop over the years.

Of course, programming is not just writing a code that does something, but writing a code that computes something.
Things can be easy to code but not easy to compute, that is, having always in mind that computers like to process things in a certain way, that sometimes is not so obvious.
So, all those optimizations that you talk about of course make sense.

I propose to make a test run, with one of your programs if you want, or with a test program, and compare the results.

On my side, I can provide several testing platforms with the old Windows XP, and also with Win7 and Win10.

To comment that, my software runs better on newer machines, while it was sluggish at older ones, with less screen resolution.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 2nd Sep 2016 11:29
I ve change about 4 CPU's : core 2 duo -> core i5 -> core i7
every time i get fps boost.also when i upgrade my GPU
If you have strange FPS drop - check your code ( especialy your main loop )
maybe you add any new plugin? ( never have fps drop with them but everything maybe )
in DBPro draw call count dropped fps dramatically.use instances instead and don't forget about frustum culling


Kafoolwho
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location: The Deep
Posted: 2nd Sep 2016 15:20
Interesting thing that I've found with my programs written in DBPro: I have a system with two operating systems set up. I can boot either into Windows XP or Windows 7. I do most of my programming in XP, and it's also my most cluttered operating system, with tons of autostart programs loading in at startup.

Yet on some of my test runs on the XP OS, my most resource intensive programs average at about 40FPS. Testing it out on Windows 7(a clean install with no extras), though, that same program's framerate drops to an average of around 24FPS. Since both operating systems share the same video driver versions, and the same version of DirectX 9.0c, I find this very peculiar...
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Sep 2016 16:45
Thing is, DBPro uses a single processor - and if you have say, 2 processors running at 3ghz 8 years ago, then DBPro is using a 3ghz processor - nowadays if you have 8 processors running at 2.4ghz, then DBPro is using a 2.4ghz processor.

It's more likely to be game logic that's slowing things down, maybe theres some space for optimisation - not sure there's much else you can do.
The code is dark and full of errors
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 2nd Sep 2016 16:51
Did you rebuild them or use your old executables to test?
It may be that a more recent DBPro update has reduced the efficiency of something. Or like Kuper suggests, mayhap some added dll is at fault, though if that was the case it wouldn't be the "same" code anymore so I'll assume that isn't the case.

Failing that I suppose it could be a bottlenecking issue where your new GPU has to stall and wait for your CPU a lot, which may not have been the case with your old setup. Are the games in question CPU-heavy?
Still, as both GPU and CPU should be "better" than the old ones it would stand to reason that while the output may not scale as expected, it should still not get worse so this is probably unlikely to be the only cause.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 2nd Sep 2016 21:30 Edited at: 2nd Sep 2016 21:30
Thanks for replying.

Quote: "Morcilla: Based on my experience, I cannot agree about the performance drop over the years."

I've seen this sort of thing before. https://forum.thegamecreators.com/thread/116610

Quote: "Morcilla: I propose to make a test run, with one of your programs if you want, or with a test program, and compare the results."

I will look into that but it could be difficult to setup as the issue could be something specific, and the assets, programming, etc. I'd need some time to sort that out.

Quote: "Kuper: If you have strange FPS drop - check your code ( especialy your main loop )"

I time everything and can see the live results in an overlay.

Quote: "Kafoolwho: Yet on some of my test runs on the XP OS, my most resource intensive programs average at about 40FPS. Testing it out on Windows 7(a clean install with no extras), though, that same program's framerate drops to an average of around 24FPS."

I have I believe seen this sort of thing before moving from XP to Vista.

Quote: "Van B: It's more likely to be game logic that's slowing things down, maybe theres some space for optimisation - not sure there's much else you can do."

Timing shows this to be clearly to be the SYNC command taking the lion share of the time. The other metrics do not appear to be abnormally high. In some cases It's like 100ms for SYNC and then 5ms for everything else.
I had suspected that Enhanced Animations was slipping a huge delay into SYNC where it is unseen. But when I deleted everything that was animating it only provided a marginal benefit.

Quote: "Rudolpho: Did you rebuild them or use your old executables to test?
It may be that a more recent DBPro update has reduced the efficiency of something. Or like Kuper suggests, mayhap some added dll is at fault, though if that was the case it wouldn't be the "same" code anymore so I'll assume that isn't the case."

This could be the case but the latest version of DBP is several years old. Even in the screenshot I provided, the same "latest" version is being used.

Quote: "Rudolpho: Failing that I suppose it could be a bottlenecking issue where your new GPU has to stall and wait for your CPU a lot, which may not have been the case with your old setup. Are the games in question CPU-heavy?
Still, as both GPU and CPU should be "better" than the old ones it would stand to reason that while the output may not scale as expected, it should still not get worse so this is probably unlikely to be the only cause."

The game is very CPU heavy. I have a 760 card and if I got a 1080 I would expect no meaningful performance improvement, a slight bump. I'll sit there seeing the game logic timed at like 5-7ms which is typical (which i'd like lower) but more importantly SYNC timed at 80-120ms making it very clear that this problem is happening somewhere in the bowels of DBP or the Directx.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 3rd Sep 2016 09:03 Edited at: 3rd Sep 2016 09:14
I dug up a compiled version from 2013.
This is very similar to the 2012 version that captured the original image.
This is the final version before I overhauled the game to use Enhanced Animations Plugin.





This version is also hitting 13 fps in the same level section on 2016 hardware.
Timings are at about 5ms for the game's logic, and about 80ms to draw the screen.

Since this build does not have Enhanced Animations I can definitely rule that out. I am extremely certain this build performed identically as in 2012.
The plugins used are D3D Text, Sparky's Collision.

I removed the HUD and all 2D code thinking that might be it. Nope.

I also got a nasty surprise when I tried to test the game on a separate Windows 10 laptop.
There was no Keybord or Mouse input.
When the laptop was running Windows 7 I was using it to develop the game. This should be Impossible.
So I loaded up old compiled programs still on the hard drive.
All DBP programs every kind every one now have zero Mouse and Keyboard compatibility on this laptop.
Scancode() returns nothing. Mouse Click () returns nothing. Gamepad works. The Escape Key works.
All I did was install Windows 10.

Starting to think this Windows 10 thing sucks.
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 3rd Sep 2016 11:25 Edited at: 3rd Sep 2016 11:27
That's not Dbpro's fault! Usually older games runs slower on new harware.Like Return to castle Wolfenstein (which is one of my favorite game) runs really low fps on new hardware.That's because DBpro (and older games) are not optimized for new hardware features.Just because you have new nexgen hardware it doesn't mean your programs can use these features.

1. Hardware skinning.DBpro doesn't have HW skinning , no matter your GPU support this feature
2. Harware instancing.DBpro doesn't have built in HW skinning , so it doesn't matter your GPU can draw thousands of objects in one draw call , DBPro can't use this feature
3. Multicore support.DBpro exe's run on a single core CPUs no matter how many cores you have.Usually modern games (and engines) are multithreaded. (eg. raycasting ot AI runs in a different thread using the adventages of multi cores)

So in short. If you have an 40 year old car and you build in a new speedometer that goes up to 300 km/h it doesn't mean the car will go any faster.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 3rd Sep 2016 21:36 Edited at: 3rd Sep 2016 21:37
Quote: "So in short. If you have an 40 year old car and you build in a new speedometer that goes up to 300 km/h it doesn't mean the car will go any faster."

Except in this case the car is now going 50% slower.

I get that Directx 9 isn't going to have some fancy DX10+ features. However it seems like newer versions of windows (8/10) are slower running directx 9, or DBP programs specifically.
Not to mention that after upgrading from Windows 7 to 10, DBP programs cannot read input off of Mouse and Keyboard on one computer. (Except the escape button)
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 4th Sep 2016 00:47
To pack more cores in designers have to reduce the complexity of those cores. So some micro code level opt’s that were prevalent a decade ago aren’t so much now. There’s all kinds of annoying differences right across the spectrum now. You can’t really afford to write cpu optimal code, and expect it to be future proof.. it won’t be.


PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 4th Sep 2016 19:41
I've run a variety of dbpro applications both mine and others on half a dozen different windows 10 installations, both upgrades and clean installs. The few issues that I have come across have been cleared up after installing the 2010 directx 9.0c

I have not seen any performance drops,mostly it is equal or slightly better on the newer hardware.

The laptop input issue seems more like a problem with directInput than dbpro. I would try to reinstall directx 9.0c on that machine and see if theverything issue persists.


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 5th Sep 2016 19:36 Edited at: 5th Sep 2016 19:37
Quote: "Ortu: The laptop input issue seems more like a problem with directInput than dbpro. I would try to reinstall directx 9.0c on that machine and see if theverything issue persists."

I installed Directx 9c and there was no change.
I find it funny that I see my weak laptop now runs with the same frame rate as my battlestation desktop pc. The Laptop is an intel i5 and the desktop is an AMD9590.

I mentioned that after upgrading to WIndows 10 from windows 7 my laptop will not register any mouse or keyboard input in any DBP app. Installing Directx9 has no effect. I did discover that this only happens when I have a USB controller plugged in. My controller is an Xboxone controller. If the controller is not plugged in then I have Keyboard and Mouse control. This applies to all DBP apps even ones that do not make use of gamepads. The moment the controller is unplugged the KB and Mouse are restored and the moment the gamepad is plugged in KB and mouse control is gone.

No other apps or programs are affected. Windows is not affected. Popular Directx 9 games are not affected. The Escape Key still operates to close the app also.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 5th Sep 2016 20:27
Interesting, I dont have a controller to test with at the moment, but I will definitely put this in my list for compatibility testing.


A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-04-16 16:01:52
Your offset time is: 2024-04-16 16:01:52