Thursday, 20 November 2014

Oh My Poor Head

I feel like a hollowed out water melon today, largely due to the mixing of Guinness and Newcastle Brown Ale. Turns out the pool match was cancelled so decided to play a different game called boozin'.  That's my social life done for another week, and now back to the code!


I continue tweaking and refining the lighting system, and now the fog works across all the various shaders and it's looking pretty neat.  Currently working on fixing up the Super Terrain Mode, which when working allows you to replace the terrain which is a performance and memory hog with a simple flat polygon, allowing things like city and interior scenes to be created.

Not sure how much time to dedicate to Super Flat, as I am now straying into lightmapping it and it was not on the original list, so hopefully I can get it squared away and move onto more interesting issues.  Bottom line is that V1.009 alpha build is looking very nice now, and I am hopeful the alpha testing team will agree with me :)

App Game Kit 2: Easy + Instant Mobile Development

In other BREAKING news, we are about to launch our first product on Steam! As some of you know AGK2 has been brewing in development phase for some time now, and we're very pleased to be able to officially launch it to the masses. 

You can find our Steam page here: 
http://store.steampowered.com/app/325180/

It is particularly relevant to this blog too as this launch allows us to make a dress rehearsal for the launch of Reloaded on Steam next year.  Any mistakes we make will be a lesson learned for when we go public with a V1, and hopefully maximize our impact there and make it a great release.  If you've already pledged to the AGK2 kickstarter you'll be getting your free Steam keys soon, and for everyone else who wants to start some mobile app development the easy way, we have an early bird discount available when we launch AGK2 tomorrow.  Exciting times!

Wednesday, 19 November 2014

A Day Of Light

Some good fixes today, including extending the dynamic lights to MEDIUM shader techniques and making them the default. The upshot is that users can drop in dynamic lights and see the results of them instantly which is exactly what you want for a new user.  The best news is that the addition of these light calculations only drained a few FPS from the already high 90's which in lee-man speak means it's as good as free :)


I have modified the GTTR (Get To The River) level to include a static and dynamic light, plus a new scripted entity so you can switch the dynamic light on and off. Really happy with the overall work done on lights, and aside from some gaps I am sure still exist, we are getting closer to a V1 for the lighting stuff.

I certainly need to include the grass in the dynamic lighting fun to blend it all together, but at over 90 fps with dynamic lights and pre-baked good definition shadows, and dynamic shadows for dynamic entities to the floor, I'd say V1.009 is certainly going to leave it's mark.

I know there are more effects I can do with the overhead lamp machine, such as lens flare, volumetric light rays, some subtle sound effects and maybe the occasional moth flying about the bulbs, but the mission has been and will remain the completion of the core elements of the product, which means drawing a line on this one for the time being and moving onto other urgent matters like memory management, overall system compatibility and the remaining missing features of the engine/editor.

Also, I added a new slider called Fog Intensity, which turns out to be pretty cool as it allows me to make atmospherics effects without washing out the distant mountains.  Notice how the characters (which are not presently using Fog Intensity) are washed out, but the rest of the scene is bathed in a soft fog.


I have another 20 minutes of coding, and then I am off to play a few racks of pool to unwind and study the miracle of Guinness up close.  Thursday will see the various shader tweaks applied and tested, plus a slew of additional critical fixes reported so far by the alpha testers.

Tuesday, 18 November 2014

New Dynamic Light Script Commands

Aside from some basic reflection tweaks this morning, the major addition was inspired by one of our premier alpha testers, who wanted once and for all, control of the dynamic lighting. To this end a new script command was added called LightSwitch.lua using two new commands HideLight(e) and ShowLight(e). Basically you can now add a dynamic light, associate it with this script and when you get near it you can toggle the light on and off by pressing the E key. Simple stuff, but long awaited and opens the door to the 'rest' of the dynamic lighting commands via script.

The biggest chunk of work however was last night when I finally fixed the annoying shadow flicker issue, and made some good improvements on the visual side such as dynamic and static lights working nicely together with the pre-bake scenes.  Also gained some extra performance points along the way for various reasons, and now my Escape level easily tops 60 fps at the start and the GTTR level tops 90 fps as well which has never happened before now.

I also found a way to speed up the Editor IDE for levels which have a lot of entities, creating a smoother scroll and entity selection experience.

Been a long day on the road this afternoon so not much energy left for much coding, but I have my email open, my code standing ready and a juicy bug that relates to 100 characters so might do one or two more before it gets super late. In other news, and exciting news at that, we've just received the release authorization for the forthcoming launch of our App Game Kit 2 product on Steam, penciled in for this Friday.  For those not in the know, AGK2 is our cross platform development language which allows you to write apps easily and deploy them instantly to all the popular devices. We have already had mucho success from apps we created with this tool, and now you can tap into the same power house of functionality for an amazing price. Watch this space for news of the Steam launch and a great early bird discount to get you coding mobile apps sooner and making your very own iOS, Android and Windows hits!

P.S. Sorry for the lack of screenshot today, it was pretty hard to take a shot of 'not flickering any more and a lot faster' :)

Monday, 17 November 2014

Weekend Warrior Of Work

I did some coding at the weekend, and made a little break-through with the 'Get To The River' level which now runs at over 100 fps (hurray!) on LOWEST.  It was my goal and with some careful grass optimization was able to push it over the edge. I also made other performance improvements such as hiding the duplicate static entities when LM objects where in play, and lowered the pain on the reflection system today as well so it's now even faster. Ouch!


I posted this on the forum to show the difference across the ages, and also to try and pinpoint why the feedback I am getting from the alpha testers suggests that visuals have gooten worser.  After balancing the GTTR level with the new sliders and lighting equations, this is what I ended up with:


Don't worry about the 92 fps, it's well over 100 fps when you create a standalone version of this game. Notice how I've matched the colour balance with the early V1.0071 shot, and improved the detail on the HUD weapon since V1.009 shot, and the grass is actually better in this one that the first shot.  The HUD weapon is slightly different as I discovered the V1.0071 engine reversed the light direction of the weapons, so that was fixed up too.


I also experimented with the new static baked lights.  Ambient occlusion is still O.T.T but you can start to appreciate the power of a few static lights for interior scenes using the pre baker.  This scene has an off-white light on the ceiling and a small static green light over the barrel to give it a radioactive look.

Spent half the day transcribing bugs from the forum to the work sheet, and now have to go through and prioritize them before I can actually start some fixing. The good news is that the alpha testers are being very thorough which means a solid V1.009 for you when the time comes.  Going to give the doggy a walk now while it's still light and then return this evening for some actual fixing and to tick off a few more DONE items.

Friday, 14 November 2014

Great Bug Fixing Day

While waiting for a series of test compiles, I figured I would sort out todays blog a little earlier to give me some more free time for the evening.  Bug fixing has gone very well so far with no less than 14 bugs fixed and 2 marked down as not reproducible.

Work done to improve performance is holding and the test game and standalone executables are running faster than ever before (for me at least).  More work required on performance so it works for many different systems, but things are heading in the right direction.


As you can see in the shot above, borders for water bodies have been increased to allow characters to completely avoid the steep drop and falling into the water. Currently looking at a bug that causes some of the sky to disappear in standalone mode, which is actually a symptom of a new fog sky technique which works by fogging only the distant horizon but not the higher and closer sky.


As the fog distance controls the degree of this effect, it acts more like real atmospheric fog than a blanket dimming of the sky as a whole.  Anyhoo, plenty of bugs left and plenty time to fix them in, so I will carry on and for the time being have a great weekend and next week I will reveal more fixes and shots from the V1.009 candidate builds!

Thursday, 13 November 2014

Sitting A Top My Mountain Of Happy Bugs

Getting early reports of performance issues with modes I don't test as much such as HIGHEST and non light mapped levels, so spending some time running and analyzing those tests today. Also solving the shadow issue, which seems to be rendering shadows in the background even though they are not needed. All these themed things should mean I can increase the performance for the next build, and of course fix some key bugs along the way.  The thinking is that I should refrain from releasing any more builds for the testers until a large chunk of the existing list is done.  

Right now I am working on an issue which causes the physics system to jump from 15% to 30% of run-time performance when I blow up a barrel. I suspect the physics debris that get created from this explosion do not exactly settle and deactivate once the dust settles.  Right now my Escape level starts at 65 fps which means performance progress has been made, with some more to come!

Sorry for the lack of blog matter yesterday, had a 'personal day' to go play snooker and pool ALL DAY and ALL NIGHT.  Was great fun, and I performed well in the league game that evening, still some small errors in my overall game, but certainly picking up from where I left off a few years ago :)  Not much of a life, but they say a change is as good as a rest, and there is something very relaxing about mastering the art of potting balls.

Tuesday, 11 November 2014

12 More Bottles Less (On The Wall)

You can say goodbye to 12 more bottles from the wall, as the bug list for the V1.009 gets reduced by a few more lines.

Also gained some more performance by reverting the masked solider to the correct mesh (3 meshes instead of over 30) and also removed all vertex data write calls and replace with a nifty shader that can animate internally:

vertexOutput mainVS(appdata IN)   
{
    vertexOutput OUT;
    float4 worldSpacePos = mul(IN.Position, World);
    OUT.WPos =   worldSpacePos;   
    OUT.Position = mul(IN.Position, WorldViewProjection);
    OUT.atlasUV = IN.UV + UVScaling.xy;
    float4 cameraPos = mul( worldSpacePos, View );
    float fogstrength = cameraPos.z * FogColor.w;
    OUT.WaterFog = min(fogstrength,1.0);
    OUT.clip = dot(worldSpacePos, clipPlane);                         return OUT;

}

Almost all the triple AAA issues solved, those remaining require more info from the internal alpha testers.  My next attack will be on the double AA's which are key fixes but not as urgent as those pesky AAA ones.

It's quite a good feeling to finish the day with lots of DONE items on the list, and I hope to repeat it real soon. For now, I will jog off and prepare a new build for the internal alpha testers while listening to the best C64 tracks from Jeroen Tel, a SID legend :)