Tuesday, November 9, 2010

15 – Will you shut up with the plants already? Sure!

It’s been quite a while since I posted yet again, but I came down with a particularly nasty bug. Fallout: New Vegas!!! Good times! Great game, but extremely buggy. If I would remove half of my code base randomly ant the thing would still compile, there is a chance that I would have less weird bugs than in Fallout. For now, I have gotten my fix and maybe I can get some work done.
So I’m done with the plants. With the rules set in stone from last time and a few more tweaks, I have gotten plants to a respectable place that is not going to undergo major changes until somewhere after a release or two. I’ll still do small tweaks here and there, but nothing that would warrant more than a phrase in writing.
General cleanup is also done. I’ve done the reorganizing part and the code base is quite stable right now and I like the way things are set up. I’ve eliminated most of the dead code and parts left by the transition from 2D to isometric.
Another change is that this is the first version that properly compiles and links without CtrlCore and CtrlLib, two packages form U++ that provide the widgets and their framework. This is not important for you, but the executable has gotten smaller and linking is a little bit faster.
I also overhauled the rendering engine. I removed all computations from rendering loop giving between 7 and 10 FPS. Not much, but If you add all other improvements from previous versions, it seems that I should get DwarvesH going on a very old computer and see if it performs as well I think it should. I also optimized floor drawing. Now, if you can’t see it, it won’t be drawn. This causes a gain up to 50 FPS if you scroll the map to part completely covered by hills. Rendering hills is now even faster than rendering grass areas because you don’t have to render plants.
I also managed to do something about the very ugly font I had before, but I have encountered two problems. The font generator does not have an option to generate not antialized fonts, and everything turns out just a little it to blurry. And most important of all, saving the same font as a PNG instead of a BMP gives major performance penalties. I tried changing all textures to BMP to see, but I got a minor performance penalty. Congratulations Irrllich for being random!
Just a single screenshot. Is the font to wide?

Statistics S33:
DHCore: 1534 lines / 37.0 KiB / 6 files
DH: 2006 lines / 51.4 KiB / 12 files
DHEditor: 530 lines / 14.3 KiB / 11 files
Total: 4070 lines / 102.7 / 29 files

No comments:

Post a Comment