Monday, 21 January 2013

Monday Nightshift

Not Exactly To Plan

As you read, I glued Saturday and Sunday together to make a very long and tiring day, so I could go to bed early and be back on day shift. Well I went to bed at 2AM (Sunday late=Monday) so as you might expect, I am back on night shift.  I get my second and third wind in the evening so sleeping was not on the cards and did some more rendering research and emails (and social site updating) instead.


Fortunately my two big AGK apps are awaiting art from various quarters, which frees me to play in the field of the third AGK app this evening. However that will not take me too long, and so I have decided to start on the second Reloaded prototype (I feel like inventing something) and also try to squeeze in another FPS game during my shift.

The game 'Borderlands 2' arrived on my door mat this morning, so that sits in it's shrink wrap until I can turn my attentions to it. My video blog also attracted a comment that the renderer should use LPP for interior scenes in Reloaded (Lighting Pre-Pass) which is a form of deferred rendering that is kinder to the memory of your graphics card and allows multiple shader techniques to take place. I have done some light reading on it, and it does seem to be a more evolved concept that basic 'catch all' deferred rendering so I will be factoring that in when the time comes.

The video blog I posted featured some new visuals for FPSC fans, and I want to iterate that there are no new shader techniques in there, I simply switched from point lights to area lights.  Once you see it with shaders, new dynamic lighting techniques and viewing it from a live first person perspective, your jaw may very well drop off!

Prototype P002

My naming convention precedes a three digit number with the letter P. P for prototype and the three digits anticipate that I will make 999 prototypes before I start coding Reloaded. Fear not, I am just protecting myself if I get to 99 and otherwise have no where to go. Coders from the 80's will remember creating line numbered programs and wanting to squeeze a line of code between lines 14 and 15, grr!

P002 Project Unknown

As I write this I am not 100% sure what this prototype will be, whatever takes my fancy, but it will probably target a serious gremlin in FPSC classic. The two bottlenecks are light mapping (sorted in P001) and visibility occlusion. This second one is a bottle neck because the current engine chops up the scene about five times to produce the data I use to decide what polygons should be drawn and which to keep hidden. It hits the build time, the real time rendering time and produces lots of horrible artefacts like parts of your scene disappearing in front of your eyes and worse, causing an open window to force the engine to draw the entire universe in one frame, causing massive frame rate drop. And I mean MASSIVE!

The solution is to ditch the old one, and use a new one.  A simpler one. One which is sympathetic to the cards of today and predict scenes that are based outdoors, with the player standing on a hill looking at the entire level on one shot. In such a scenario, you may as well switch occlusion culling off you would think. Well no, not if each building contains 500 items to pick up and eat. It has to handle interior spaces as well, with lots of dividing walls and plenty of gaps to see through.  Not an easy problem to solve, and I don't think I will be using BSP for this one ;)

The best way to solve it is to read some articles while listening to some thinking music, then start a prototype to try out the speed of each rendering technique. Thanks to Dark Basic Pro, I can knock prototypes up in hours instead of days, so I should have some good results by this evening. I also have a potential weapon in my closet called Dark Occlusion which is an add-on we have been selling for a while to DBP users. It does exactly what you might expect, hiding objects blocked be nearer ones to save rendering the whole lot. The demo I ran looked very impressive, occluding over 90% of the entire scene with apparently no performance drop, so we'll see if it can handle an indoor/outdoor FPSC scene with thousands of items from small apples to huge castles :)

Activating the Blosser

I can also report we have activated our secret weapon, the mighty Blosser. His sub-systems have been working in preparation for some time, conceiving all manner of unfathomable creations but prior to this very day you have been protected from his unfathomableness.

We can't reveal any art today as it's just too hot to put in the blog. We are going to have to let it cool down so mere humans like us can handle them, and once they are safe I will post a few glimpses.  Providing we all don't turn instantly to stone, I will post a few more.

The current idea is to go for a modern day theme for our asset library, as this will remove as much narrative and context from the selection allowing you to create a wide variety of games.  If we picked 'bog monster on Mars' as the theme, we would just have a thousand bog monster games each month, so setting it plus minus 80 years from today you have the basis to create a huge array of stories. We are also tinkering with the idea of throwing in items from 1920 through to 2093 so you can have period pieces at one end and some futuristic innovations too.  They will all integrate nicely with the baseline 2013 theme as well, so you can mix and match as you see fit.

If there are overriding objections to this plan, post your comments here as they route directly to my inbox for instant scrutiny.  Think of this blog as the hotline to Lee (or as many would prefer to think of it, a hotline AWAY from Lee).

Signing Off

Plenty on my plate this evening, so will get cracking and report on my progress with the P002 prototype on Tuesday (if any).  Thanks also for the kind comments in response to my video blog, and will be sure to make one for P002 when the time comes.  Catch you later!


  1. Can I ask a question that's just occurred to me regarding the P001 lighting system?

    I noted with pleasure in the video you said you wanted to end up with a system where only parts of the lightmapping are done which would presumably vastly decrease the lightmapping times. How would this work in respect of sunlight? Presumably the sunlight is going to be hitting and illuminating a large amount (possibly all) of the objects in the scene, so does this mean the whole scene will need to be re-mapped (as the whole scene is hit by the sun) or will it be done on a more local basis to the area surrounding the entity in question?

  2. The sun uses a single directional light for the new light mapping process and represents a constant for localised normal editing. It is only when you 'move the sun' will you have to recalculate the entire level to get new light maps. My advice is don't move the sun unless you really need to ;)

  3. Do you have a "generic" number of total assets that will be new to FPSC: Reloaded? Is Mark also tasked in making sure existing (ie., official) Model Packs and TGC-Store Items (things made by TGC's artists), are all compatible (scripts and all) with FPSCR...or are you going to be contacting Pack authors to help out with this at a later date?

  4. No ideas on how big the asset library will be. As many as we can get from Mark before the deadline, and certainly enough to make a nice playable demo for the product. Legacy model packs will be assembled into a super library and I intent to create a unit test which loads each one in the Reloaded 'entity loader' and then farm the job of testing all ten thousand models to some insane but friendly grunt. When we get closer to this, I will make a check-list of what passes for 'compatible' but the basics should be covered such as 'visible, performs script like in V120, integrates with Reloaded shaders, spawns and dies normally, e.t.c'. They won't inherit any Reloaded features or do more than they do now, and my prediction is that they will import even better than V120 in some cases!

  5. Sorry for my English, but as I understand you, you want to create library of previous centuries for making fantasy games, modern for nowadays games and futuristic for sci-fi games?
    P.S: if that so, it would be ultimate constructor.

  6. I think D.O. Is a great and powerful plug-in for DBpro and should be music to Reloaded's ears. Concerning the entities, will custom entities be loaded in a similar way to classic (I.e. Model + textures + fpe) would be nice if existing method remained.

  7. Mainly modern day for V1, with bits of 1923 and bits of 2093 thrown in to make things interesting. For more in-depth explorations of different eras, we will produce more model packs to make the library bigger.

  8. Yes model + textures + fpe so older model packs can still be used.