Frogboy Frogboy

Brad's unofficial, private builds of FE

Brad's unofficial, private builds of FE

Before I check in my code, I try to do a lot of testing.  Sometimes my changes get thrown out  because they may cause incompatibility.  

But if anyone is interested in playing with my personal builds which try things like new AI techniques, performance improvements but also probably some bugs, post here.

DISCLAIMER:

This is an unofficial build. This is built on my personal machine at home. Do not report "bugs" anywhere but in this thread. 

---

Build:

v1.0Frog

What's in it:

+ Crash fixes

+ AI more careful about going on difficult quests 

+ AI more likely to use strategic offensive spells (untested)

+ Significant performance boosts late game (but untested, may blow up your video card and harm pets)

+ Improved base frame rate on test system from 22fps to 45fps in a late game scenario.

Here's the link:

UPDATE 5: 11/2/12 - 1.004 beta build

*** 11.2.12 - BETA update available for forum users https://forums.elementalgame.com/435790 ***

If you are using the "unofficial" builds, please see the note in the post about the beta on reverting the main EXE to 1.00 before patching. You do not need to reinstall completely.

 

 


 

18,936 views 122 replies
Reply #26 Top

I can confirm that there is performance increase here. Still get the horizontal tearing when reacing max fps.

Maybe add an option in the game for v-sync as adjusting it in the nVidia config fixed this tearing.

Reply #27 Top


[BUG] I thought I would watch the AI to see what they will do and basically from turn 25 - 43 I noticed that Procipinee's sovereign army hasn't moved for any of those turns. It looks like it cleared all the good-huts it felt it could and hasn't moved from this spot.

Edit: After turn 43 she finally moved again.

Reply #28 Top

Testing on a 16x12 map ~turn 70.

Performance boost noted. (~5fps)
But: freezing during the "turns", 20 minuts loading and crashing during loading of saves.

 

Reply #29 Top

Noticed a performance boost myself.

Reply #30 Top

I got a little performance boost on the strategy map, but it runs slower on tactical. I cant understand why it is running so bad on that little map with 6 units, and why it is going so much better on the big map with hundreds of units and buildings. Also i got 8-9 crashes. :\  I play this from february, and i got 5-6 crashes all the Beta builds till this day. 

Reply #31 Top

I dunno, I haven't looked at the tactical map perf yet.

Reply #32 Top

Chiming in with my experience:

Like some others, the game starts out buttery smooth at 60FPS and then drops to 20 or less as the game goes on (especially when I have more than one city in view, but even when I have nothing but scenery in view it still tends to hover around 30).

I have tried out the unofficial Turtle build and saw no real difference in performance, unfortunately. Compared the same save file between official build and this one, and my city-full area hovers around 20 in both. I am running an nVidia GeForce GTX 560M.

Reply #33 Top

I got a hang-up crash with this build, shortly after the Medium-strength she-wolf quest.

 

 

 

https://dl.dropbox.com/u/6609288/debug.err

Reply #34 Top

Since I don't have my old beta saves anymore, I can't give you a useful answer, because I have nothing to compare these results to. But I started a new game and so far, in the early stages, FPS seems pretty stable with pedestrians enabled. I will report more as I play more, when I have the time. I get around 30-45 FPS on my 9600GT.

Thank you Brad for tackling this issue!

EDIT: Indeed the loading screens are bugged in this build. Only the background appears, no text, no image and no loading bar.

Reply #35 Top

Quoting Lord, reply 33
Chiming in with my experience:

Like some others, the game starts out buttery smooth at 60FPS and then drops to 20 or less as the game goes on (especially when I have more than one city in view, but even when I have nothing but scenery in view it still tends to hover around 30).

I have tried out the unofficial Turtle build and saw no real difference in performance, unfortunately. Compared the same save file between official build and this one, and my city-full area hovers around 20 in both. I am running an nVidia GeForce GTX 560M.

its turning out the gpu isn't the bottleneck. It's CPU.

Reply #36 Top

Quoting Frogboy, reply 23
Quoting LNQ, reply 21 quoting post + AI more careful about going on difficult quests
I hope this is not going to be the only fix to the issue of AIs being able to perform hard quests too early. They need to be able to do the quests at realistic power levels.
To me it would be better if the AI didn't make a roll at all with the quests; rather, the AI would automatically succeed in a quest when it has a strong enough army and attempts to compelte it.
The casualties the AI takes when doing the quests could be made with a roll, but the success would be guaranteed.
There is no need of randomness in this sense; it won't affect the player too much whether the AI makes a roll or not. What is important is that the AI completes the quests at same power levels as a human.

The problem before was that it was a dice roll. The problem there is that there isn't a "% chance" that an early game sovereign is going to beat a dragon. The odds are ZERO. The update addresses that so it's not a dice roll but one of thresholds.

 

Awww... but Resoln took down Delin somewhere before season 35, plopped down a nice ripe city next to the FirePyre and let me walk in and take it.  How else I'm I gonna get that kind of awesome if you don't let the AI do all the work and spend all their resources for me?

 

Looking forward to the improvements

Reply #37 Top

So I did a bit more tweaks last night, turns out I hadn't actually been disabling Pedestrians (disabled it at one point but forgot to restart the game). If I turn Pedestrians and Outlines off I actually get acceptable framerate most places (it dips down to 29 or so if I have a couple cities in view, but I can deal with that).

Still a lot worse than at the start of the game though. Pedestrians makes by far the biggest difference on my machine (which has a pretty weak CPU, for some reason Asus gaming laptops have good video cards and low-clocked processors...).

Until I found these threads I hadn't even considered turning Pedestrians off since like others I saw in here, I assumed they didn't impact FPS when you were zoomed out enough that they disappeared. Clearly I was wrong though, they affect perf quite a bit even when you're zoomed out.

Reply #38 Top

I seems to me that Brad, in his build, set the zoom level at which pedestrians appear to very high, even on things like Wild Horses, where they would appear all the time. This means that turning pedestrians off shouldn't affect performance, since they are only shown if you zoom in really really close. On the other hand, maybe the engine fetches the models, textures and animations for pedestrians, even if they are only shown up close, so it could still improve performance turning them off.

Reply #39 Top

Quoting Frogboy, reply 36
its turning out the gpu isn't the bottleneck. It's CPU.

Any way to off-load threads from the CPU to the GPU? The worst case would be someone that has a bad CPU and GPU, but if you could use one to compensate for the other, that would be helpful.

Also, are more CPU cores going to help more than CPU speed? For instance, I have a Q660 (rather old now), but it has 4 cores. Would this help more than someone with 2 newer, faster cores or would performance be about the same (or worse)? Just wondering what type of bottleneck this is.

Reply #40 Top

Quoting Lord, reply 40

Quoting Frogboy, reply 36its turning out the gpu isn't the bottleneck. It's CPU.

Any way to off-load threads from the CPU to the GPU? The worst case would be someone that has a bad CPU and GPU, but if you could use one to compensate for the other, that would be helpful.

Also, are more CPU cores going to help more than CPU speed? For instance, I have a Q660 (rather old now), but it has 4 cores. Would this help more than someone with 2 newer, faster cores or would performance be about the same (or worse)? Just wondering what type of bottleneck this is.

 

Updated again.

No realistic way to offload to the GPU for us with DirectX 9. That's one of the features that DirectX 11 makes easy.

But I've made a lot of progress this weekend in reducing how much CPU it's using. Try the latest update to see what I mean. Should be a significant boost.

The big bottle neck is just the law of unintended consequences in coding. Just needs optimizing.

For example, in the update I put out, there is a bug I introduced where going through a tile with "stuff" on it will cause it to be semi transparent. I introduced it (temporarily) because the previous code to see if a unit was there was checking every object in every visible tile every frame. Very expensive.  But the function seemed very innoculous ::IsUnitInTile() And it works. It's just that it's not efficient.

This sort of optimization is where we can get a lot of improvement going forward.

Reply #41 Top

This is starting to remind me of the good old days when you guys did all that optimizing for GalCiv2. Better times were never had.

Reply #42 Top

The tools available these days are just amazing.

One of the things I corrected was the excessive use of case insenstive string compares. To make modding easier, we use a lot of strings. But they come with a performance hit (not a huge one normally). But a lot of the code in the libraries we use are case insensitive. By requiring the strings to be exact, it increases performance somewhat.  

Of course, that means that if your mod said 'unitstat_dodge" instead of "UnitStat_Dodge" it'll fail.

Reply #43 Top

Quoting Frogboy, reply 41
No realistic way to offload to the GPU for us with DirectX 9. That's one of the features that DirectX 11 makes easy.

I was surprised to find out DirectX 11 has been out since 2009 with the release of Windows 7:

http://en.wikipedia.org/wiki/Direct_x

Now, you need a video card that supports it, too, but I wonder what percentage of FE players are playing on Windows 7 vs other platforms, as well as the percent that run version 11 video cards. Sounds like something that won't hit FE, but maybe Gal Civ 3 or other SD games for the future.

I was surprised to see XCOM only requires DirectX 9. It must have the ability to run in either that 10, or 11 mode. Sounds pretty sophisticated.

Way to start getting the optimization gun out, Brad! Looking forward to seeing how Derek and the Devs (is that a band?) react to the improvements. If it makes it in there, Patch 1.01 should be a continued maturity to an already great game.

Reply #45 Top

Any chance I could convince you to take a look at AI grouping? The faction AI is just not putting the max units into an army. Ever. It makes difficulty a relative thing indeed.

Reply #46 Top

Indeed with Update 3 I feel a boost in general smoothness, not necessarily in FPS, but overall there are not lags anymore and the whole experience is more fluid. I seem to be getting a minimum of 28 FPS now, which is good enough for me, but more importantly, FPS seems to be consistent, and I'm not experiencing any FPS drops so far.

I'm actually glad to hear it's just a CPU optimization issue, since these are classic programming issues, and you guys (by which apparently I mean you and your family since these are your home builds :) ) should be able to gradually smooth them out. I got my CPU overclocked to the limit of its stability, so I've done everything I can on my part :D

Reply #47 Top

Crash on the new build, end-of-turn, nothing unusual on turn:

 

https://dl.dropbox.com/u/6609288/debug%201029.err

 

Also, one unusual note, on my first champ, the game wouldn't accept me recruiting the champion and kept asking me until I said no, no gameplay impact as I could recruit the champion, just a UI issue.

 

 

Edit: another crash

 

https://dl.dropbox.com/u/6609288/debug2.1029.err

 

This one I suspect is caused by clicking on a unit right when a turn ends, that seems to be the trigger.

 

 

Reply #48 Top

Quoting Frogboy, reply 36
its turning out the gpu isn't the bottleneck. It's CPU.

I was thinking about this a bit more. If it's CPU bound, during times of slow FPS, couldn't someone go into Task Manager and verify the CPU usage is at 100%? Or is it more complicated than that?

Reply #50 Top

Am I the only one who is having stability issues with this build?