Tuesday, 9 December 2014

Lightmapping Leaves The Building

On the advice of a member of the internal team, I decided to move the lightmapper to a separate external application in order to allow larger levels to be lightmapped and avoid any system memory shortfall or fragmentation for long game making sessions.


The result is a much more stable experience all round, and I am just going through the motions of testing to make sure nothing has broken. Also plan to have a new internal build for the testers this evening so I can double check the new way of lightmapping a scene works for all.

Also started to get some art from the new textured civilian character which is looking pretty sharp, and I hope to get an export soon to test the animations (which are fused with the ability to use ALL the weapon styles).  I have also identified some other system memory pockets that might allow some more savings, and getting the ESCAPE level to use less than 800MB of system memory would be a great place to be.

Hopefully I can bring better screenshots on Wednesday as it should be more a day of testing large levels than the grunt of adding and refining code.  My emphasis will be on stability, not losing my performance gains, having pre-bake and real time shadows for all scenarios and ensuring static and dynamic lights work across the board also. I think these are the principal priorities for V1.009 (amongst the other few hundred features that have been added since V1.008) :)

Monday, 8 December 2014

Four Hundred And Eleven MegaBytes

This week is primarily focused on stability in anticipation of a V1.009 release, and I have returned to more system memory optimizations to ensure the engine does not crash due to insufficient wiggle room.  It took most of the day of painstaking investigation, but I managed to save over 411MB of system memory from squander, which is now available to the rest of the engine for more antics, including lightmapping and larger levels.


I was helped in my quest by a tool called VMMap which does a splendid job of illustrating where ALL the system memory is being spent.  Even things you have no control over are displayed, and from this information I was able to make some good savings.

Once such site of squander was the inclusion of an old DBP DLL called ConvMDL which was once used to load MDL files (from the old Quake days).  This innocuous DLL was eating 125MB of static memory until I excluded it from all further action in this project, along with support for 3DS, MD2 and MD3 :) Other savings (and performance boosts) were found in in the terrain visual and collision systems which together gobbled over 600MB (now more like 300MB). I dare say more savings can be found but right now it's about overall stability, and if the engine can now run on 32 bit machines without having to reset every five minutes then I will be a happy chappy.

I have noticed my 'super terrain texture' generator eating 80MB of system memory which in fact it's job is to produce a GPU video memory texture, so that's something to investigate tomorrow me thinks.  Hopefully as more system memory is rescued, the engine will gain more stability and longer term will allow MUCH larger levels to be created without worrying about the dreaded red screen of death.

It's not all plane sailing though, in making my massive cut backs, my pre-baked terrain shadows have gone walkabout so Tuesday will involve a hunt for these pesky shadows and to put them back!

Friday, 5 December 2014

Picture Blog Day

Been a great week and some very necessary fixes, including some performance gains and cleaner memory code.  I promised screenshots today so here they are:

 Above is the old V1.007 screenshot from the ESCAPE level

 Here is the new V1.009 screenshot tweaked with lower values to match above lighting

Don't worry about the FPS, I am using the HIGHEST terrain shader as the older one used normal maps for MEDIUM but the latest build does not.  As you can see, the HUD weapon is more defined, we now have shadows, the bloom is not as intense and it's a little more colorful.


Here you can see a level we are working on to test a larger world with more action, to ensure that our drive for performance never ends and we maintain a course which allows many types of FPS game to be created.  Still more polish in the game play and smaller items, but the level is definitely taking shape nicely!

Currently spent most of the day getting the F9 live terrain editing to work again, as consolidating the terrain physics geometry had the nasty side effect that I could not quickly swap in a new piece of terrain floor, I had to build the whole combination meshes again.  Currently battling with retaining my performance gain with ensuring F9 functionality remains in tact.  This evening I plan to make a build but I have a few issues to resolve before then including the restoration of shadows from trees and other transparent entities, and once the build is done I plan to spent my Friday night with some fun multi-core physics experiments. The single core system current takes about 11% of the overall game spend, which is not too bad I think, and there is always an overhead from adding n-core solutions, but really there is only one way to know for sure, and that's to break out the code and see what works best!

I am also pleased to report that the FPSC legend Mr Blosser has kindly conceded to help with some additional art work, and the first target for us will be the building.


As you can see, he has already started with some improved specular and normal maps, now looking at texture seams and other geometry based concerns.  It will also be the entity to help trial a new OCCLUSIONMESH system which should allow the occluder to process this entire building with just a few polygons for the whole shape.

Probably need to eat at some point today, but I have my second wind now so will crack on and see if I can put on task properly to bed so I can think clearly about the very important weekend build.  Have a great weekend and thanks again for your patience - I hope my blogs are making it at least bearable (and dare I say it, educational) :)

Thursday, 4 December 2014

Physics...Hmm

Got through half a day of bug fixes, then as I increased the terrain physics density to solve some related issues, I discovered the physics system taking a little longer to deal with the increased floor meshes that I suspected it should (basically 30% of the game time in a blank level with one dynamic crate).  It got me thinking that something was very wrong in there, and needed a look.

I am current at the stage of running profiles on it all, and also will be looking at activating the Bullet multi-threading stuff as well if it's easy to use, so I must apologize if my blog is a little short, I want to eat and then get right back into this physics question.  If I can find a major BOO-BOO in there, and reduce the workload to more like 2% which is all the physics system needs to do with one player capsule and one box, and THEN see about putting the whole lot on another core so when the physics work does pick-up there is no cost to the main thread and in theory increase overall FPS.

I will try to get some nice screen shots in Friday's blog so you can see what I am looking at, which is hopefully a large pile of fixed tasks and a more solid looking V1.009 for release before the Christmas break :)

Wednesday, 3 December 2014

Knowing No Bounds

After my five hours of failure with a $250 memory checker, I tried the $700 trial of the tool Bounds Checker became and within a few minutes had some leaks and memory mismatches highlighted in a friendly little report after running my game engine.  I guess my previous experience with the tool helped me know which buttons to press. I have since spent the day eliminating these errors that had been flagged and now the bullet physics module does not leak memory any more (apart from one thingie which I will fix after tonight's build).


I have saw a few new feedback emails coming in from my previous AM build which included amazing flying floating enemies. Something for me to look for on Thursday :)  I think I am very close now to deciding which remaining A tasks need to go into V1.009 and how much time should be spent doing my own testing for stability and reliability in the game of the stock and store media.  I am now happy with the performance and memory handling, and many of the little features we needed are now in to some degree.  I really want to spend the next two days testing and only dealing with those things that stop the train. The littler nags will have to be put on a second list for post-V1.009, this way everyone can enjoy a great experience and not get tripped up by a last minute bout of silliness in the engine.

Pool night tonight, but after some serious Guinness drinking five days ago I am still not in the mood for lots of booze, so hopefully I can return for a few hours of late night testing and tweaking.  I'll show up, beat my enemies with a stick, then leave after a friendly pint.  The best laid plans hey....?

Tuesday, 2 December 2014

AMD Cards Accepted

After spending a very 'long way around' day getting my dev kit set up on the new machine (which involved updating the Dark Basic Pro IDE to run on Windows 8.1 which in turn meant updating the BCG libraries to 2012), I finally was able to reproduce, find and fix the issue(s) causing problems for AMD users. 

One was a massive vertex buffer memory overrun which explains a few other issues we have been seeing, even for NVIDIA and INTEL users, plus some issues with texture locks during lightmapping and DarkAI using pointers that did not exist. I also have it in my head to spend the evening doing a full audit on the memory handling of the software. 

Back in the day I used to use something called NuMega Bounds Checker which was a little magic box that told you when memory block A stepped on memory block B's toes.  Very useful.  I priced it up earlier today and they want the princely sum of $700 - ouch!  I thus decided to hunt for something a little more in my price range and came up with one from SoftwareVerify called Memory Validator. I have downloaded the trial and will be spending a quiet evening with a glass of red wine, the trail demo of a much more reasonable $299 and the latest build to see if any more hidden memory leaks and overruns are creating havoc on systems I do not have direct access to. 

As the entire day was like this, you can imagine there are no screenshots of cool progress, but I can sneak you a shot of a new character we are developing which will allow you to have more generic people in your future levels:


We're going to drop the mohecan for now, but it might make a re-appearance when you are least expecting it. Don't worry about the shiny mat finish to the guy, he does not have a texture yet and we've decided to reduce his brain size as well ;)

Other cool screenshot that came in today, but I cannot show it, so you will just have to hold your breath for that one, but it IS good (Escape 2 anyone?).

Monday, 1 December 2014

One More Week

If some of you had been waiting for the V1.009 release to happen in November, you've probably figured out by now that it's not yet available. Due to the quantity and thoroughness of the alpha testers work we've decided to sit on it a while longer to make sure it's solid before we release.  There are still some issues with lightmapping, memory, disappearing objects, little glitches, e.t.c and it is only fair you get a good experience after the long wait. My hope is to get all of these issues resolved this week, and see where we are on Friday, and see if a version we have is worthy of a public build.


The good news is that each time I work on the lightmapper it gets better, which I think you will appreciate when you start using it.  I've also fixed a few more multi-material issues so now the engine can support them a little further (as it seems artists like them).

My plan this evening is to swap in an AMD card and hopefully reproduce an issue that has been reported that MAY relate to card type, but at first glance I don't see how a card swap could affect in-game object visibility. I will know by midnight :)

At the risk of venturing off the Reloaded Reservation (again), I wanted to advertise the newsletter that came out today:

http://www.thegamecreators.com/pages/newsletters/newsletter_issue_142.html

And also a quick reminder that the 33% discount on App Game Kit 2 (AGK2) ends on Tuesday, so if it's part of your wish list you might want to make the purchase now and get started on the path of the code warrior.  For those seeking a higher power, stay tuned for more Reloaded posts about bugs squashed and features improved during the week.   My calender is pretty free of meetings and events so it's code sailing from here on in, and we'll get V1.009 out to you as soon as the alpha testers give us the gentle nod.