Thursday, 31 January 2013

Thursday Reload

Progress on P002

Woke at 2:30AM today so after some quick emails, I dived right into Reloaded before anything else distracted me.  The last prototype only had two clipping planes in effect and so the mission this morning was to get the bound boxes fully occluding.

Occlusion Solution

After all sorts of crazy vector techniques to figure out where to place my planes, I finally figured out a method which I liked. It is fast and simple. I detect which sides of the bound box the camera can see, then disregard the other faces. I then work out which edges of all the faces define the contour around the remaining sides. I then create planes against each of these edges to form a volume starting at the camera and extending into infinity, respecting the edges of the item doing the occluding.

As you can see in the above screen shot form the P002 prototype, the big block is occluding the boxes behind it, and even knows the size of the objects and can avoid occluding the ones on the very edge of occlusion (see the box on the left which you might think would be occluded but a little bit of it sticks out that should still remain visible).  When you use planes to clip things, you have a handy method of determining distance from the plane before you clip which is cool.

I have been gently instructed not to show you any programmer art in future screen shots and demos for the remainder of 2013, so the above demo had a little extra time spent on it to add a skybox plus floor and wall textures from the Reloaded asset collection which is already being build as I write this.  Although you cannot see it, the bricks in the semi-transparent wall use parallax mapping which makes them stick out even though they are mapped to a perfectly flat polygon.

As I have put in 6 hours on P002, I think I will quit while I am ahead and do some other TGC tasks to ensure my workload remains nice and even.  The next bit of the occlusion system will involve solving the problem that individual occluders that sit next to each other do not join forces to hide an object. Each only partially occludes to the object remains visible and you get distant objects remaining visible when in the real world you simply cannot see it. Maybe something along the lines of merging occluders that share two dimensions or something, we will see.

Awesome New System

I find the best way to test a new system is to leap in and start using it, which is what I have done. I have set it up using Synergy alongside my main machine, and have transferred all Reloaded project work to that machine. I have installed only the tools the Reloaded project needs and will be coding from there moving forward.

Dishonoured: My all time newest favourite game of all time

I have added an inspirational backdrop, and sorted out as many of the tools I think I will need. Check out the tools for 2013 and do let me know if you have a better suggestion for any of the software types I have chosen. As it's a new system, now is the best time to discover new tools that make life easier!

My first real deadline is the end of February when I hope to have enough coded that I can design a map, click a button then jump directly into playing the game, complete with light-mapping, occlusion and some of the newer Reloaded graphics and shaders.  I will be sure to reveal a video of this when the time comes, and post lovely graphics of the progress along the way.

Other News

As it's 'going' to be a long day, I am going to dig a few holes in the garden to keep my mind fresh and then resume some AGK project work running up to the usual 7PM clock off time.  Sometime between now and then, I am expecting delivery of a brand new state of the art convertible Ultrabook, my newest weapon in my attempt to win the next Ultimate Coder Challenge.  I can also reveal that the secret item I mentioned a few blogs ago is the remarkable new Gesture Camera from Creative. These two pieces of hardware will form the basis of my competition entry and the development will be stretched over a 7 week period starting mid-February.  I will be running a separate weekly blog for this, but don't worry I will keep my daily appointments here, perhaps with a more informal perspective on how the competition is going for me.

Signing Off

I must say it's really refreshing to be working on FPSC again.  It was my pet project for many years around 2006 and I had a blast. Having the opportunity to go back in and do a major spring clean and wholesale replacement of ancient technology is simply awesome.  Once I've got the boring back-end engine stuff out the way, I look forward to bringing you massive explosions, flame throwers, insane physics and lush landscapes!

As a quick taster, here is an explosion our artist prepared earlier:


Have a nice day!


  1. I thought I was the only person on the planet who still installed Paint Shop Pro 7 on my new PC! I still load it every now and then for quick seamless tiling ("pattern" tool) and to play with those picture tubes :) has become my goto place for effortlessly installing all the most common and useful tools after a format. You select whatever you want out of around a hundred products including browsers, editors, developer tools, codecs and plugins, etc. Then it creates a custom EXE that installs all of these apps silently without interrupting you once. Saves hours of manual grunt work.

    Also, that explosion animation is amazing.

  2. When I moved from the Amiga, I missed my DPaint. As long as I use the PC, PSP7 will be my new DPaint ;)