Monday 30 September 2013

Monday Merges

Adjusting The Heavens

A strange sort of day, in perhaps two parts. A speedy first half where I added the ability to adjust bloom and light ray intensity settings via hot-keys and a rather slow second half where I battled with a dreaded 'corrupt heap' issue for countless hours. 


I then had a third part in my increasingly inaccurately termed 'day' when I introduced real-time shadows and shaders to the editor itself, not just the in-game part.  The result was pretty cool, as the shadow allowed a real sense of placement when planting entities down.

Entities do not self shadow at the moment, but that's just a case of adding some lines of code into the entity pixel shader. My fear is performance, but I managed to do a decent 'generalized shadow' for the grass and if the shader begins to slow, I can always revert to that technique.  As we now run the engine on 16 texture stages, slot availability is not the problem but I should be vigilant about asking TOO much of all my shaders.  I am pretty sure though that everyone reading this will insist entities self-shadow, and that the performance concerns get resolved forthwith and without delay ;)

Also the scene is sorted by texture, not by depth, so there is perhaps a huge performance gain to exploit when I switch scene rendering to the new sort mode. Apparently 'overdraw' is still the enemy of a fast graphics engine, and rendering a huge brick wall in front of the camera first is always recommended when you have intense pixel shaders in 'da house.

As you can see from the above snap, more content is pouring in (and more to follow) which should give us more scope for new screenshots and presenting in-game suggested situations.

Next Step

Now that the entity shaders and shadows are working on both sides of the divide (editor and game), my main task for Tuesday is to get saving and loading to work properly to finally be able to store terrain edits. Right now it only stores entity placements.  Rick is also pushing for a 'random tree and bush plotter' in the editor to allow rapid generation of small groves of trees, which is not a bad idea. The palm tree shot you saw before was the result of a similar random algorithm which varied position, rotation, scale and even incline.  I am sure I can rustle up some spray gun which can fire of entities at the terrain without bunching them up and allowing for this natural scatter effect. You may not believe it, but in the palm tree shot from a few days ago, all the trees where identical, and only differed by position, rotation and scale. This opens the door to instance objects which will give the engine a superb advantage in terms of memory consumption and rendering speed.

Signing Off

If there is more time Tuesday, and I think there will be, I will probably add the guns back in to the engine and see if I can get the flak coded up. It's a tall order, but one needs goals!  I also need to load the latest version only my fastest Ultrabook so I can demo the version at a meeting on Wednesday, so that will be a test for it's Windows 8 compatibility AND it's ability to run well on a mobile GPU. No pressure ;)

Friday 27 September 2013

Champagne Time!

Well You Gone And Did It!

Another little milestone on our rocky road to rapture. The daily views on my blog just topped 1000, the highest ever since I started at the beginning of 2013 and a worthy of a celebration drink.  I had planned to visit Wigan Friday afternoon and watch a good old game of rugby, but a huge email inbox, a pending blog and plenty of work ahead forced poor Lee back into his seat.


The project is starting to glow with the promise of what can be achieved, and it's an exciting time for me at the moment. I just can't put it down!!

Progress News

I was all set to continue my experiments into large scale dust bowls and sand storms, complete with sounds and subtle transitioning effects when Rick took one look at the early prototype from last night and suggested no further work be done on it. I personally saw great potential in the idea, but Rick wants his finished product a.s.a.p, so we move on.

I thus moved onto integrating the latest in-game engine stuff back into the main IDE editor, effectively allowing levels to be edited and then instantly previewed as though it was the final game.  To this end, I created a new and final prototype to hold the engine in-game pipeline to replace the current weapon prototype which was assuming this role, and also started the actual final map editor module which would replace the grid edit proto which I use to quickly compile and test editor features. These two steps easily consumed six hours of work, but the code is well ordered, neat and ready for expansion.

A Hiccup

Although I can now paint the terrain, jump into a gloriously shaded world and run around it, I cannot leave and come back to the same view. Returning to the editor from the game just shows a black screen and has something to do with my post process reversal code not working. Nor are the weapons added to this new system yet. It all works nice if I switch off post processing in test game, but this is just a stop gap.  The solution for a new day is to step through the rendering behavior when back in the editor mode and find out specifically which part of the post process system is irrecoverable. Once that is done, I can quickly add weapons and be back to where we should be.

Beyond that, finishing off terrain saving, allowing levels to be created and stored with everything we have so far, should be a good result for Sunday. With that, we can start making screen shots and videos as the new terrain content comes in.

Signing Off

It's been a series of very long days, and I am hopeful to get a few more hours in the garden to take a break from this monitor this weekend. I have a meeting on Wednesday to show the current visual progress of the product, and despite my prediction that the main game engine and IDE would not be integrated by then, it looks like it just might be.

A Note From My Ego


Here is a photo of me presenting a 7 minute ramble to the highly select fellows of the Intel Black Belt dinner in San Francisco, representing Wales by entirely failing to affect a Welsh accent.  Can you tell how many glasses of beer I drank in the 24 hours preceding this shot?

Thursday 26 September 2013

Thursday Triumphs

Good Coders Are Bouncy Coders

That's right, you can't keep us down for long!  Given the overwhelming support for increasing the texture stage count to 16, even from my good friend at a certain graphics card company, I solved the issue of terrain shadows and normals in a stroke.

Monster Shader

In fact, when I had completed the leviathan shader, it turned out that it's performance was very reasonable for the amazing number of things it was doing. Turns out the performance hog happened a little later when I switched EVERYTHING ELSE on and ran it as one combined program.

Performance Tuning A Must

I had hoped to get away with avoiding performance tuning until later in the project, ideally after the beta, but it seems I will need to face this one earlier than planned. To that end I have ordered a mid-range GTX 650 Ti graphics card to compliment the NVIDIA NSIGHT tool, which will give me unparalleled access into the innards of what my graphics engine is doing. Turns out my chunky old AMD card can't run the tool :)  That said, I am still running 45fps with everything switched on and unoptimised, which means it is certainly fast enough to continue developing, testing, adding different content and generally allowing a few screenshots and videos to be had.

Your New Shadows and Normals

As you have pushed for them, I though it thoughtful to give you a screenshot showing the new features. Here is the new ground shadow system which provides real time dynamic shadows for the terrain and the grass coverage:


And here is a blatant normal map poking through the muddy terrain by the waters edge. I have also toned down the water reflectivity, adjusted the fresnel term and muddied the water tint some more:


As you can see, I re-used the palm tree leaf normal map while I await final artwork from Mark who is currently busy producing lots of lovely terrain art!

Some Scouting

I also checked out some of the 'competition' by viewing all the best of the best E3 game releases for 2013, and tried to mine more ideas for shaders I could throw into this engine. Alas most of what I saw was either scripted sequences or mountains of content, nothing technical I could pull out quickly and convert into an new engine feature that could improve the shots and vids. If you find inspirational material that contradicts my findings, please do post a comment so I can check it out. I am not in the least bit phased by the lofty heights established by 20 million dollar projects, and I don't mind having a go :)

Weapon Work

What you are not seeing here is the work progressing on the weapons side of things. We now have complete animations for all weapons, sounds are coming along nicely, lots of subtle touches in there over and above the airmod tricks such as a separate running animation for weapons, weapon wobble based on parent camera wobble and some new weapon lag code to create a natural effect when you swing around quickly.  Running along now feels more realistic and I am looking forward to completing the rest of the weapon systems once visuals have been cracked.

Signing Off

As customary, it's getting pretty late (or early) and my list still has a few items un-ticked which will be pushed to the next days. I had hoped to play around with dust particle effects and sugar steelers, and might plop another hour into it before noddy time.  Hopefully I will get some terrain content on Friday and have a fun filled weekend populating my little world.  I am pretty sure the only thing I need now to get some nice screenshots is enough content scattered about the empty fields to make it look like something ;)

Wednesday 25 September 2013

Wednesday Woes

It's Not All Cherries and Cream

A pretty 'orrid day really. Started good with some clean-up of the shadows and optimizations  and then came the re-integration of the color maps. This was when the dreaded performance monster caught up with me. I have escaped the beast for many a moon, but today it found me.

Turns out rendering the whole terrain in full polygon glory twice is a little too much for my graphics card and my FPS dropped to 43 fps. Completely unacceptable considering other parts of the engine where not engaged. Not sure the cause, but my first guess is that rendering that many polygons twice was too much, and that subtle use of a pixel shader is the solution out of this.  It could also be something silly, and not the first time, but for tonight and my frazzled brain, I do not know which.

Solutions Pending

I have a few ideas how to get around this one, but really the main idea was to double up on my texture slots and get the job done. Turns out I cannot do that without a 'significant' performance thump. One idea is to use more than eight texture slots, limiting the cards Reloaded could run on. Another is to create texture plates with four texture patterns and normals on them, therefore staying within the eight texture slots limit, but requiring some fiendish texture wrapping math in the pixel shader. A third option is to drop normal maps and shadows altogether and move on. A forth is to somehow have a 'shadow shader' which can overlay the established terrain surface. In fact there are as many solution as I could dream up, but I need one that I can code within the day, will perform at top speed and fit nicely with that I have already coded.  The life of a coder is never dull!

Pre-beta 'don't look if your name is Rick' Screenshot

So you don't feel too dejected, and not wishing to share my pain, here is a nice screenshot from my horrid proto with the color stripped out. As you can see, nice shadows and normals under the colored vegetation, and the vegetation being shadowed too which was no small feat! Also shadows spanning off into the distance, you can't see this, also no small feat!


I had hoped to show you a full color screenshot or even video of the shadows in all their glory, but not at 43 fps!!  No Sir!

Signing Off

I either need to find the route cause of this performance hog when rendering the full screen terrain twice, or find a new way to have colored textures, normals, veg map and cascade shadow maps all in the same shader pass.  No one will thank me for pretty visuals and horrid performance, so this needs solving right now or we have to back track on our visual ambitions!  Fear not, it's me we're worrying over, and I usually find a solution, eventually ;)

Tuesday 24 September 2013

Tuesday Was Shady

Message Received And Understood

All my plans, I placed in a bag and tossed out the window for Tuesday. The feedback both internal and external was clear, which was to get those pesky shadows back in!

A sage thought, and the right one. I have plenty plans for more eye candy in our terrain but shadows are super critical to make the scene 'pop'. To that end, apart from dealing with delegation via emails, my focus today was all things shadowy.

More Than Normal

As you may know I have already maxed out my texture stage usage on the terrain shader, and I ain't using more than eight slots in this engine to ensure some level of backward compatibility with last years graphics cards.  Mark, and now Rick are both insisting on normal maps for the terrain floor, and as they are technically shadow casters I decided to add them in. I achieve this by making the terrain a two pass process, or rather, a two render process. I can hear the intake of breath there, but there simply is no way to squeeze a veg map, five color textures, four cascade shadow map textures, multiple normal maps, one per texture style and who knows what else.  The good news is that in theory the shader work simply gets split between the two passes, with only the geometry getting processed twice. This is where deferred steps in to improve performance, and this can still be an optimization for us, but I need to get it written first before I can start performance tests.

I used some placeholder normal maps, and the terrain has had it's nice textures and subtle colors replaced by a basic lighting system (used by Valve) which employs said normal maps.  Once this was done, time for...

Shadow Games

I must have visited this shadow stuff about three times now, each time getting better and improving it. My finished shadow shader is now the best, with the ability to stretch all the way to the end of the terrain map and generate a convincing directional light.

The current prototype as I write this is in debug mode with each cascade tinted a specific color so I can see the quality step line and iron out any last minute artifacts like shadow edge bleeding and peter-panning.  All looks good to be which means time to add it to the new terrain shader.

It's 2:40AM now so I could slink off to bed and restore a more normal working day for the remainder of the week, but who would integrate the shadows into the new terrain shader :)

Signing Off

I am going to fix myself a small J.D & Coke as a little reward for getting the super sized shadow issue sorted (finally), and then put another 25 minutes into the shadow integration, then see if I can rotate myself back onto the day shift. It's hard to say whether day or night shift produces more, and I've experienced plenty of both. I dare say it's 50/50 and entirely dependent on the devilishness of the code on that day.

Monday 23 September 2013

Monday Visualised

It's All Eye Candy Baby

As you may know this week has been geared up to dedicate solely to visuals. I have postponed the necessary final integration as it was decided that we needed some gorgeous screenshots about the place, and in the grand scheme of things it all needs doing.  I had planned to add the layers of polish once all the main functionality was in place, but I am sure you will not be objecting to seeing more of the final art take it's rightful place.

As it is definitely blog-worthy, I have produced a very small sneak video from the end of this days work so you can see where I am:


This one shows you bloom, using the multiplication inverse technique, a much deeper water effect so you cannot see the bottom of deep areas and my favorite  the light ray effect which will cast light volumes from the sun through any canopy or other above surface obstructions to create a sense of light volume in the scene.

What Is Next

Having ticked off the three shaders I wanted to do, the next two big visual tasks (apart from adding more content) is to work on flak/explosions and shadows.  I have a neat idea for producing some fast shadows using the cascade technique but it's experimental and might swallow some precious time. To avoid this possibility, I have decided my next task will be flak, explosions and particles.

This should add lots of opportunities for more cool visuals as the flak will leave a trail when you fire the rocket launcher, the explosion will have plenty overlay effects which I am looking forward to tweaking and of course the scene can benefit from particle effects which comprises everything from the dust that slowly settles after an explosion through to gusts of wind, distant fogging using particles and sugar stealers.  Not sure how much of all that I can get done in one day as the Flak is coming directly from the classic engine and it will take some time to re-factor the code so it slots nicely into the new systems.

Signing Off

I stole two hours today to get some gardening done (the weekend was pretty cloudy and cold) and highlighted to me how out of shape I have become in the last six months. Spending every waking hour at the keyboard has it's downsides, with general fitness being the first to suffer.  Hopefully Tuesday will be cloudy so I can rest my bones, but if the sun appears again I have a small path to finish digging and the manual toil does not seem to make a dent in the subsequent coding I can get done.  If you add up all the hours I've been awake, deduct three hours when I was outside and one hour when I ate some food, today racked up a good 10 hours and I'm happy with the result :)

Friday 20 September 2013

Friday Fully Loaded

A Day In The Armory

A great day if you like playing with big guns!  In my efforts to ensure backwards compatibility with all legacy weapons and AIRMOD enhanced guns I brought in a few favorites from Errant AI's collection and made sure that full functionality was restored to them.

In the process I learned quite a lot about the new features I did not even realize existed in the engine such as ammunition pools so you can have a single type of ammo for multiple types of weapon.  Special animation reserves for zooming, empty weapon state, alternative weapon animations so on.  I even found early work on melee and dual wielding, though I am going to be careful about these to make sure we get the best result down the road.  
Simply duplicating the weapon and placing them to the left and right looks odd when you reload (as you see four hands).  I am thinking more in the style of sword and shield, or carrot and stick style systems which will be more controlled by the artist than the fine tricks of coders.

All Guns Present

I know have the Sniper, RPG, Shotgun, Uzi, Pistol and Magnum present and correct, working in the new weapons prototype and ready for Mark and Johann to do there thing and finish off the content.  It is staged in such a way that I don't have to get much involved now so can focus elsewhere.  Hopefully within a week, the weapons will have extra features such as animations for walking, running and pressing against walls, accurate fire spot and smoke emissions, and the very latest sound effects to lift the version up another notch in quality and game immersion.

Else Where?

My next task, should I chose to accept it, is to re-implement FLAK and EXPLOSIONS to the prototype. I was going to jump to shaders and shadows, but when I fire the RPG and get no trailing rocket and huge bang, it leaves one wanting. It also means that once coded, it's done and I don't have to back track too much.  The explosions will come from our new explosions code and art, and should make an impact in the new terrain scene.  My mind started thinking about underwater explosions and rockets skimming along the surface of the water but i stopped myself. These crazy notions are for the realm of future adaptions.

Signing Off

This weekend will be a gardening weekend if the weather holds.  In playing catch-up after my IDF trip, I seem to have burned my candle a little, and a small recharge is in order. I have some potatoes I am curious to unearth, and a small path to cut.  Hopefully this will give me the thrust on Sunday to add a little bang to the prototype. The classic FPSC rockets did not have a trail behind them, and flew is a perfect straight line. I am tinkering with the idea of a rocket that keeps it's heading, but slightly weaves it's way there and leaves a thick plume of smoke in it's wake.

It will also give me the chance to tie in the explosion code, which has remained an isolated module up to now, and start adding the good stuff like physics particles, knock-on effects and maybe a few brush fires :)

Thursday 19 September 2013

Thursday Peeky

Blur Works

Seems my blurry screen shot attracted a huge number of visitors yesterday and today :)  That said, I won't be making that level of tease again as I think I went a little too far. As I explained earlier today, I kept adding one more level of blur until the lack of shadows was hidden, but but then it was pretty much a wasted out shot. Sorry about that!

Good and Bad

The bad news is that won't be able to inflict any more shots on you for the next few days given the lack of public worthy visuals, but the good news is that I have switched tracks to work on shaders and shadows (and guns). I've made the decision that Windows 8 and integration can hold off for two weeks while I bring the visuals up to the level where screenshots are not embarrassing. I means delaying the beta slightly, but I think the eye candy treats will be worth it.

I was also sent this worthy article on SSAO which is a nice way to get top visuals through GPU power: http://en.wikipedia.org/wiki/Screen_space_ambient_occlusion

I also plan to visit the world of bloom, light rays, tone mapping, shadow blending and dynamic lighting on my way to better visuals as well, so hopefully screenshots in a few weeks time will not only be permitted but desirable.

Weapon Work

Today has been mostly about guns, and it's been a real haul this one. I had to strip out the gun code from FPSC Classic including all the AIRMOD and other modifications and integrate it into a new weapons prototype.  The idea is that rather that write the gun system from scratch, I would incorporate all of AIRMOD into the new engine and then augment it with some ideas for improved motion ans visuals around the weapon HUD object itself.

The first stage of this plan worked very nicely and now I have the classic FPSC guns in my prototype running around, reloading and firing through my gun selector.  All very good.

The next step is to add the new Reloaded weapons and configure the gunspec on each one to perform all the functionality you might expect of them.  The downside is that some animations are missing, some gunspec files don't seem to want to cooperate and the animation.txt file I need is missing on come. Completely expected as this is the first time I have ventured into the weapons area of the file structure we have here. The good part about this is that I can explore the new AIRMOD settings and create a neat and tidy template for the new weapons gunspec file, and get to grips with exactly what is missing. I can then produce a snag list for Mark for his return next week.

Signing Off

It's been great running around with more than the Rifle for company, and using the old weapons got me thinking that bringing in ALL the old weapons might be a real boon for Reloaded. Applying new shaders to the old weapon media might produce a lot of choice right out of the box, not to mention any old entity assets that still look pretty good. For now I am holding off on making too many legacy promises, but by re-using ALL the FPSC Classic gun code, I have paved the way for 100% backwards compatibility with legacy weapon models, including the much sought after ErrantAI collection!  My prediction is that by close of business Friday I will have the new weapons tamed and working as far as they can, then I can double back and re-activate related systems like flak, decals, full scale explosions and the myriad of hooks the weapon system taps into.  Exciting times!

Wednesday 18 September 2013

Wednesday's Ground

One Step Back, Two Forward

A strange sort of day, with some progress being made, only to be countered by breaking enough stuff to spend the second part of the day repairing it. That is not to say a wasted day as we now have good terrain loading and saving, all terrain, physics and combat prototypes load and run with the same media set and my personal favorite, our resident TGC Store administrator took charge of the entity library for Reloaded and created placeholders for them all. That meant I could drop the whole library into the main IDE and start browsing.

And That's Not All

After seeing all my new lovely entities, I could not resist continuing the integration work (despite some distractions I shall not mention here) to get entity ground detection and stacking. Now when you select and place an entity, it follows the terrain perfectly as you move it around and places it on the floor as you might expect. Also it has the smarts that when you get for example a crate, and press RETURN to find the new height at that point, the second crate stacks perfectly on the first.


I really don't want to show you the raw screenshot yet, not without shadows, some bloom and a few other nice touches, but the above is a sneak peek and totally blurred up view of my prototype as it is today. As you can see I have been adding pallets, barrels and even palm trees to my terrain scene, and you cannot see it now but I am using a night sky effect.  You might also make out the dumpster from the old Alley Level content which will probably make it's way to the final Reloaded asset collection!

Decisions

I have a decision now whether to work on Windows 8 compatibility for the IDE and prototype executable partly as we need this anyway for release, but mainly because it allows team members running Win8 to be able to see what is going on. The other direction is to complete the weapon and combat prototypes to include all the weapons we have so far, which will allow us to refine them and ensure all animations are in place and to get the sounds tailor made for each weapon.  Both are critical, though I have yet to decide which path to take for Thursday.

Signing Off

I must say, once I added terrain ground detection to the entity placer, it became a real pleasure carving out terrain shapes and adding things like trees in clumps.  Not a clue what the long term performance hit might be for such a proliferation of per-entity vegetation, but it really opened the floodgates for a more diverse level design from what we used to have with FPSC Classic.

Still, plenty progress being made as we march closer to October, and both the IDE and the slow unification of all the prototype modules are getting stronger every day.  It's also great to know the pledger community (and our beloved investor), and the team in general, are happy for us to continue aiming high, sacrificing a few arbitrary deadlines for a top quality result. I don't want to tease you needlessly, but I should be able to put something playable in the hands of all pledgers within the next 4 weeks if all goes smoothly.  You have shown extraordinary patience, and a sign you really understand the development process by allowing me the time to get it 'just so'.

Now I'm bouncing in and out of the IDE, it's starting to feel like one piece of software rather than 15 separate prototypes.  More to come!

Tuesday 17 September 2013

Tuesday In The Library

Integration Goes Well

I have started getting my prototypes to behave again after the massive step to integrate the terrain editing into the main IDE. All playing happily together again. This means I have separate AI, Terrain Edit, Physics and Combat prototypes to use for work on those specific areas, but all key work instantly feeds through the main engine automatically via the module files shared amongst them.  The bottom line is that it means my compile times are vastly smaller, and I can run the prototype much more quickly than launching the entire editor each time. No sense loading in all the characters and AI stuff if I am working on the terrain editor or the main map editor core.

Sounding Out

As part of the physics prototype, I have added the material sound system and are now able to work with this as the main testing platform with our sound guy. It's working very well and a great way to instantly test new sounds as they come in, and more importantly, for the sound guy to test his own work before announcing it to the rest of the team.

Right now we are working on weapon sounds, footfalls and experimenting with some barrel rolling sound effects though not sure if this last one will make it in as a main feature yet.

Backing Up The Lot

Since getting back I have been aware that backing up should be stepped up at this level of the project where every file counts.  To that end I have spent some time cleaning up older archives and ensuring only new files for the Reloaded project are kept at the front.  It's vital that should a PC decide to go on an extended holiday, I can get back up and running on a second machine. Always good advice, but especially now!

The Reloaded Library Forms

In my absence, a whole pile of lovely art was waiting for me, so I decided today was a good day to start organizing the new asset library for the Reloaded project.  Here is a rather nice render to keep your visual eye candy streaming in.


If you ever wandered why enemies in games sometimes have masks, scarfs and other facial obstruction's it's that if you removed it all the faces would be exactly the same. The problem with creating a game engine is that unique faces are a drain or artist time and GPU rendering. By hiding the face, you can confidently send hundreds of them into the battle without the player knowing any better.

Fortunately we DO have more characters with different faces, but we also want you to be able to drop in a handful of soldiers without changing your entity brush each time.  Maybe in the future we can add a system to randomly change the face on characters automatically so you don't have to worry about this particular scenario.

The library is small at the moment, but that is good for me as it allows everything to be tightly tested with physics, visual shader rendering, performance, back-end attribute data and how they work as a part of the whole game engine.  Still, six categories and growing so we're well on our way there.

A Call TO Action

I am in need of some parallel help if anyone from the Dark Basic Pro community is reading today's blog. Take a look at the shot below:


As you can see, a typical snipe position and a few victims in the distance, but the thing I want to point out are the green boxes placed around the base of the protruding hills in the terrain. This is my very quick hack to define obstacles that the enemy characters have to navigate around to chase the player.

I am looking for someone with some experience of DarkAI to write a new very small prototype which will take 1024x1024 height data and create a series of DarkAI polygon obstacles that contour around the raised parts of the terrain. y current technique is to detect a height difference of 50 units, and if detected, slap a box there.  Crude, and is a performance hog.  I need a system that can do this in real-time (as the terrain height data is being modified). Does not have to be 60 fps, just something that can be fired off and the DarkAI obstacle map adjusted in less than a second, ready for real-time game play.

It's something I am getting around to, but it's a B priority while I cobble everything else together so having someone produce the goods in parallel to what I am doing would be very helpful.  Just email at lee@thegamecreators.com or comment here for more information!

Signing Off

Well this is the end of another long day. Just going to let my PC finish off the backups, drop box and SVN uploads, then call it a day.  Rick kindly ran my new IDE on Windows 8 and totally broke it, so I am also getting a Windows 8 test machine set-up to start the compatibility work sooner rather than later.  I am sure it's just a few file permission related pebbles, but it's enough to prevent Windows 8 users having a good time!

Wednesday will see more Asset Library work, and a start on the entity mode in the IDE, to ensure selections are placed smartly on the new terrain instead of 'through' the terrain as the current version likes to do.  I also want to clean up the IDE a little more so what little there is in there feels more polished and less half-baked.  Coming together though, and with some new icons and art, will look as good as it's coded ;)

Monday 16 September 2013

Monday And Back From IDF13

What A Blast

As this is a Reloaded blog, I won't be writing a huge report on IDF 2013 except to say that it was a huge blast and I really enjoyed my time there. It's always the people you meet that make the event worthwhile, and a finer bunch of dudes they are too!

Some highlights are the introduction of a new super small chip called Quark which will usher in the era of wearable computers (something I predicted many moons ago).  Perceptual Computing continues it's relentless pace into a paradigm shifting future and it will be great to see what comes out of the imminent PerC competition. For the first time ever, IDF held a huge party for all developers and featured circus food and plenty drinks!  I tried to tweet some pictures but 3G costs a fortune for 'Brits in the States' and I used over £60 in less than three minutes when I accidently tethered to my Ultrabook.

Today's Progress

Aside from catching up on emails, paperwork and clearing some desk space, the main thrust for today was to implement the material sound system to suit the new modules. This allowed me to add footfalls, and a prototype splash sound effect around the water line.  The proto can also be used by our sound guy to fine tune the footfall sound effects that will be recreated for Reloaded.

My inbox still has some other items that need my attention, but alas my Internet connection is down (again), and in fact I am writing this in the browser cache in the hope the Internet magically comes back to life.

Signing Off

Of course, the internet would come back as soon as I wrote the above :) I am posting this now before it goes again!  Will be working on overall IDE integration this week so hopefully a screen shot or two to come in the next few days.  Alas I cannot take a screen shot of the new sounds ;)

Friday 6 September 2013

Friday Heights

'Highest' 'Users' 'Ever'

That's right, my blog received the highest readership ever yesterday at 950 sets of eyeballs :)  Quite pleased about that for some reason.  Anyhoo, the news of the day is that I managed to integrate the terrain editor into the IDE today and thanks to my painstaking diligence of preparing the modules ahead of time for seamless integration, it dropped in smooth as silk. Naturally I had to connect up a few power cables, but apart from that, it did the job.

Due to our new policy of not showing anything crude and unusual, there will be no shot of the combined IDE and terrain editor as the toolbar icons are a compete mess thanks to my tinkering and the rest of the IDE is in limbo.  I can report that I have tied the menu items and toolbar buttons to the shortcut keys and now a new terrain mode can be controlled like any other IDE feature. Saving and loading is not in, and that will be my task on my return.

Return From Where

Did I not mention?  I am flying out to San Francisco for the Intel Developer Forum conference on Sunday and not returning for a whole week. This is my last recharge before I dash to the finish line for the October release, and beyond that the Christmas version.

I will be attending a few lectures, meeting some friends and spending the best part of four days talking shop with fellow developers.  If any of you are also going to IDF, you are welcome to join me for a beer or two, and I will be tweeting on and off throughout the event. My tweet address is @leebambertgc

Signing Off

It's been a long week, largely thanks to the early morning starts and long un-interrupted days, and now I am at close of business on Friday my eyeballs are swimming in my head telling me to eat something and rest somewhere. I have achieved what I wanted to do which was to get the terrain editor part of the main software, and as a bonus I have cleaned up great swathes of code in the process too.  Let's hope I remember it all on my return!  

Thursday 5 September 2013

Thursday Big Bag O' Progress

Up Again

For the forth day in a row I have woken before 7AM which is something of a record for me, only achieved through going to bed ridiculously early and falling asleep right away.  The bad part about this is that I cannot work past 9PM as I am probably sleeping, but the good news is that the early morning cycle provides one with incredible clarity of purpose, before the confusions of the day begin.

Even a commute to work might upset this wonderful span of hours, where nothing is too ambitious and everything can be conceived and created.  It only lasts a few hours though, and then the marathon of the day begins as the brain floods with mental abstractions.

Progress Notes

Remove Segment Code - finished off removing the last of the segment code from the system, and also removed the blueprint mesh code that was associated with it.  Used this process to learn the entire map editor code again, which took a few hours but was WELL worth it.

Restore Entity Textures - got the map editor to load and place entities with their textures in tact. I hacked out shaders for the time being to achieve this, but shaders is another day and another challenge so I am happy with the solution for today.

Split entity code M and G - figured out which entity source code is required for editing, and which is purely for game running, and separated them from each other so my map editor compiling could be faster.

Center at 25Kx25K - new default starting position for level creation is the dead center of the 50,000 x 50,000 level.  This allows the author to build their levels out in any direction they wish. Thanks to the removal of segment mapping, there is now no real limit to the height of buildings, nor their depth.

Save & Load - added both saving and loading of entities and general map settings back into the IDE, having removed the segment and other data from the process. This clears the way to introduce terrain, AI, physics and other elements without wading through too much legacy code.

IDE Overhaul - as part of the process of getting a single piece of software ready for October, reduced the map editor source code down so that it remained fully functional through the IDE but compiled in a mere 16 seconds. This is an improvement from 90 seconds which is what the engine required a few days ago.  The IDE went through some reductions, replacing segment menu items with terrain items and cutting back anything that was not of immediate importance. I also included some new Reloaded art to give the IDE a newer feel about the place, and apart from some nagging BCG issues the IDE is well underway.   Once terrain module is integrated, I can connect up the menu and toolbar features to allow editing of terrains from the IDE and hopefully the subject of Fridays blog.

Signing Off

A good day, with about 10 hours of graft invested. Also heard that my little driving apps are doing even better these days in the iOS and Android charts, really knocking other educational apps out the park with it's awesomeness, and a real testimony to AGK.  When AGK V2 comes along, it will so even greater things I am sure!  Rather than push past the 'tire barrier', I will eat something then get some sleep and resume Friday where I hope to be able to add the first of the big modules, terrain, to the IDE integration and thus begin the slippery slope to a finished single piece of software which might affectionately be called the makings of a beta.  For all your pledgers out there, the chance to try out all this crazy code moves one significant step closer and I can't wait to share this with you.

Also, a special thank you to everyone who is supporting the shift from segments to room blobs. It's a critical upgrade, and one I feel will put Reloaded on a fast track to great things.  We live and learn, and when we see a limitation, we should actively seek it's elimination.  Constant and Never Ending Improvements is the name of the game, and we're just getting started!

Wednesday 4 September 2013

Wednesday Choppy Choppy

A Full Code Busy Day

Today was the day I broke my main engine into two pieces. Well in fact I broke it into about twenty pieces, all in the process of creating sub-modules for all the different sections required. 

When I moved the original FPSC source code into the public domain, and allowed modding of the official version to take place, I combined all the sections into a single code base. This helped to keep everything in one place, but the problem with having everything in one file is that the file is over 50,000 lines long and takes an age to compile!

The original project had the code split up, and today I started the process of dividing up the latest source code to recreate a much easier development environment while I work on the main engine.

Map Editor Under The Microscope

The reason for the above turmoil is so I can work on the map editor section quickly and easily, and around 5PM I managed to get the much smaller code base to compile under 25 seconds and a vastly smaller executable to feed into the IDE.  All the map editing is still present, but the test game and all the 'standby game code' has been shifted to a 'game file' for later integration.

I can still make significant reductions in the source code I have now, and hopefully I can reduce it to less than 10 seconds compile time for super rapid development.  I must however guard against spending too much time hunting down every last subroutine to reduce as in the end, it will all go back into one pot for the final software.

My final task before close of business was to get entities selected, loaded and pasted to the editor, which works fine apart from a strange texture problem which I will solve in 5 minutes in the morning. The next step is to disable all segment code from the engine and re-position the start location for editing at 25,000 x 25,000.  This will be the work of Thursday, along with more code reductions and clean-up.

Removing The WHAT! Code

Anyone who tuned into my previous blog will know of my crazy plan to drop one of the most successful features of FPSC from the product, and I am sure many of you are curious what I am going to replace it with.  To ensure everyone knows where I am coming from, I thought it best to sketch out a rough plan of the initial idea for the new structure creator.


As you can see, I am coining the term ROOM BLOB, which is the central building block of the new idea. As you can see, each room blob is capable of interchanging the key elements required for unique creations such as doors, windows and walls. The placement, number and size of these elements are also dynamic, selected by the user through an easy to use GUI system.


The second feature of a ROOM BLOB is that it can connect to another room blob and seamlessly and intelligently merge with it, creating common doors, windows and other features as part of the process of clicking them together. You can use simple arrows to drag the rooms wider and longer, and even higher! Gone are the days of painting two layers to create a realistically sized large room. You can also detach and drag the room blog to a new location, preserving any entities you may have placed inside the room.


Unlike traditional segments, room blobs can specify how many 'floors' you want them to have with a single property, specify what kind of roof it has and perhaps most importantly what textures should be used for each of the many materials that make up the room blobs. If you are happy with the style of a room, you can of course duplicate it and make modifications on top of your original design.

Instead of placing doors and windows at exactly 100 unit intervals, which creates a uniform sense to your levels, room blobs allow doors and windows to slide along the primary axis for pixel perfect positioning.  Stairs and ladders are accommodated by the room blob as walls and floors cut holes where required completely automatically and efficiently.

As a nice bonus, because the room blobs are mostly generated in real-time and constructed in code, the geometry placement is efficient which means less memory used per-square-meter, the performance improves and my personal favorite, every element and facet of the construct can be 'disassembled' in code for some awesome effects. An obvious one will be converting an entire building into brick blocks, tiles, wooden struts and girders, then blowing it up using Bullet physics!

Room Blob VS Segment

ADVANTAGES

  • Create large rooms quicker by simply dragging them out
  • Buildings can be variable height, not just multiples of 100
  • Instant roof generator for more realistic outdoor visuals
  • More refined control over door and window positions
  • Room contents are preserved as rooms are re-positioned & rotated
  • Highly efficient geometry use, no redundant trapped polygons
  • Built-in physics, LOD and AI meta-data (no baking required)
  • Allows all materials to be textured with your own choices
  • Intelligent inter-connectivity - snap rooms together easily
  • Create a structure 20 floors high with a single property change
  • Less memory as buildings are reduced to 'selections' data'
  • Renders and collides faster as fewer polygons required

Conclusion

We will be using the genre and style from the Reloaded beta to influence the capabilities of our first 'room blob' buildings, but will be able to expand them with more sophisticated elements as we move on.  With a clear template and modular system in place, artists will be able to add 'wall element' meshes and new textures to the system that builds the blobs allowing for a greater variety of structures, from angular offices to blobby caves.

Given this new system will take a little while to create, and the fact you are probably itching to get your hands on a beta, we've decided to create the pre-baked building templates first and add them to the library, and follow it up with the 'customize' option as soon as the basics of the editor and game runner are done.  This way you can feedback on editing tools, terrain system, AI, visuals and overall game play while my small team work on a super simple user interface and real-time structure generator that's fast and efficient.

Once the beta launches, we will also be opening up incremental cascade updates to all pledgers so you can check out the progress of the room blob technology as it develops.  As always you will be able to read up on the daily progress of this through the blog, which might go underground after October so only pledgers can read it.  The rationale for this is that my blogs can often paint a picture of the product that is not always complimentary and has an indirect affect on any PR and marketing that may be underway.  Your comments on this are most welcome!

Signing Off

Today started at 6AM due to an extremely early night last night. I am tempted to repeat this again, as I found great clarity coding before the sun came over the mountain!  Any questions on the new structure system, post your comments and I will try to provide more information. Bear in mind this is just a sketch, and almost every detail can change over the course of development, but you get the gist of where I am aiming.


Tuesday 3 September 2013

Tuesday Thoughtlings

Big Thoughts

Today I sketched out and began the proposed integration of all the main modules created so far into a single engine application. Perhaps the most significant factor in the final integration is the removal of the segment system as we know it.  As we explored the final shape of the software during our meeting yesterday, we realized that the grid system of editing buildings is rather antiquated and forces the user into creating very blocky and right-angle structures.  If Reloaded is to fulfill it's potential, we need to ensure that every element of the game creator produces the best results.

To that end we have sketched out a new system which will allow buildings to be dropped into the level instantly, and dynamically customized through real-time geometry generation.  This would allow buildings of any size and specification to be formed, rotated and placed throughout the level with the minimum of fuss and the maximum of flexibility. This would include doors, windows, floors, roofing and the usual subtle details that make the shell of the building.  From this shell, custom textures and shader effects can be applied to each material element to create highly bespoke structures that will look substantially better than the Borg cube buildings we have come to expect from FPSC Classic levels :) Everything else is added in the usual way through static and dynamic entities to create the furniture, fixtures, scenery elements and augmentations such as light switches, signs, lights and more.

Anyone who has used the segment editor for larger constructs like cathedrals, Dwarven halls and especially outdoor structures will sympathize with the limits of the 100x100x100 segment system, especially when piecing together sometimes upward of 30 segment pieces to construct a unique building. Rather that preserve the legacy that segments left us, an idea was born to re-imagine how buildings could be created that is both quicker and more flexible. Details on specifically what level of control we will gain remains to be drafted out, but the general consensus is that we should loose none of the capabilities segment painting provided FPSC such as drawing out buildings and editing on multiple levels.

Better Performance, Less Memory

This decision also improves the performance of the engine be vastly reducing polygon counts, with the byproduct that less memory is required to store them. Where an FPSC Classic building would typically need 24 polygons per 100x100 wall segment, the new real-time building would only require 12 for an entire face of wall, whether it be 100x100 or 1000x500.

Another bonus is that rather than have performance hungry processes to analyse the segments placed and produce physics, AI obstacles and geometry buffers from them, the new system will have these elements built-in which means pressing the 'big green button' to test your game will be instant as intended.

Segments vs Buildings

The real questions of which is better is theoretical at the moment, and I join many supporters of the segment system who believe it created a unique and easy to use method of building worlds. The intent is to reproduce all of these attributes, and also go places segments could never go. By dropping them now, before we invest any more time to them, will mean more energy put into building a system suitable for a 2014 game maker.  

More details on the specific features of the building maker will follow, starting with sketches and ideas, conversations through this blog and eventually some prototypes as proof of concept. To get an idea what the final building might look like, you need look no further than the 'combat super building' featured in the last round of screenshots. This is our template for everything a building might need, from walls and floors, to stairs, ladders and beyond.

Signing Off

As I hinted at yesterday, this week is about integrating the modules into a single application now to make sure all the preliminary pieces fit, the overall memory usage is predictable and most importantly, that the performance ticks along at 60 fps on my 'not very monster anymore' PC. I have a few Ultrabooks on standby to make sure Reloaded runs okay on decent laptops as I am sure I will be on more than a few roadshows demonstrating this product to journalists and interested parties throughout 2014.  I don't fancy tugging around a Tower PC with me (like the old days) and it's always good to aim for low spec when producing software as it keeps one honest.

Sorry if this development is turning into a complete re-write of the entire engine, but the more I work on it and play modern games, the more I am inspired to produce the best game creator possible.  The latest demo plays pretty good, and running around a gorgeous landscape, sniping characters that don't just stand there is pretty neat!  More visuals later this week!

Monday 2 September 2013

Monday Meeting

All Talked Out

You know when you've talked too much when your throat hurts after a meeting! I tried two glasses of Guinness but it only helped dull the pain of life as I know it.  All in all the meeting went very well again and everyone was happy with the demo and the planned progress for this week.

Progress Status

As customary, I did some Reloaded work over the weekend. Nothing on Saturday to recharge and 14 hours on Sunday (due to a stubborn coder refusing to sleep). The demo produced showed three enemy characters able to chase you down, reload, find cover, track you around mountains, climb ladders and perform a variety of basic animations including a cool death sequence based on the direction of the shot and the posture of the character.

Other incidental features also had to be created for the demo such as a relatively fast physics and AI back-end simulation, weapons for character hands, player weapon combat functionality, ducking and health refinements. Most of it needs optimizing (as I see some great optimizing opportunities now it's coded) and some needs fleshing out like a more complete weapon system and re-factoring of the code so resources are allocated based on offset values from a suitable data structure not hard coded into the module as they are now.

Performance Status

The demo runs nicely at 60fps (which is VSYNC capped for smooth 60hz refresh) and no one module is draining the performance. I have identified improvements I can make to the physics by replacing triangle mesh concave meshes with low LOD versions to improve speed and save memory, but also to write a small physics editor which can entirely replace triangle mesh dependence with axis aligned bound box positions which will substantially improve performance and memory usage further but will require manually editing each asset as it goes into the library. It's the same system used in many AAA games and the extra performance gain is well worth the pain.  On top of all this, I have not yet activated the multicore features of Bullet which looking at the API is a very simple process indeed, and will speed some great speed-ups for users with duel and quad core machines.

AI is currently draining due to the massive amount of occluders required to cull out all the mountains from the available paths the characters can follow. I have an idea to pass the improvement of this system out to the community so some bright button can perform the same DarkAI obstacle generation for an arbitrary matrix height field with resorting to blocks (and lots of them). Something that traces perfect polygon obstacles around the offending hills.

Rendering performance is hampered by lots of overdraw and hungry shaders, but the new Depth Occlusion system will be getting a new front to back draw order system coded and hierarchy system for visibility checking of occluded objects which means virtually no serious overdraw and hitting the shaders a lot less. This should result in some sizable performance gains.

The last performance bottleneck is the core DBP source code itself, which grows as features are added. I have already started the principal of moving complex code over to the DBP modules themselves which is pure compiled C++. Two such examples are the depth occlusion and LOD subsystem which is done entirely inside the Basic3D module of DBP and costs no DBP cycles to operate.

Granted, Reloaded won't run well on a barely adequate DX9 card, or an ancient machine running basic kit, but I am hoping some well placed tests and then scaling within the code will overcome these challenges.

Signing Off

Due to a 3AM finish and 7AM wake-up call, and not much sleep in the interim I am getting to the point where my brain will not function well beyond this blog. My plan is to answer all the emails, sort out any pending business for today and ensure my back-ups are in place, then have an early night. It's just coming up to 6PM which feels ridiculously early to sleep, but when you're tired you gotta sleep!

I can report that some juicy emails are coming in, showing some new modules in progress such as a cool Fire module that's coming along nicely, new RPG weapon from Mark which is fiendishly cool and some pre-production artwork for the Reloaded logo and animating intro logo too, all very encouraging as more final artwork comes in!

I have a busy four days ahead of me as I pack up on Saturday to attend IDF in San Francisco next week. Unlike many previous trips, this time I am attending purely as a coder attending lectures and being social with my fellow developers so if you're in the neighborhood I will be tweeting all the time I am there.  There will be plenty of tweets about IDF from other bloggers but I will be tweeting about things that make sense from a Reloaded perspective. Should be good fun too!  Until a very long and busy Tuesday, good day!