I played some more Dishonoured, only to discover what I thought was a 'kill the bad guy' last level was NOT the last level, and the story stretches before my hero for new adventures. Played a little further (to 5AM) and called it quits as I wanted to be up on Saturday before 4PM so I could see the snow!
A Pie Filled Weekend
As my Raspberry Pi case and power supply arrived the previous week, I made it a point to try them out, and wow are they cool. Amazing what a bit of plexi and power cord can do for ones general outlook. I assembled the case around my 'naked' raspberry pi, plugged in the very sensible power supply and it sprang into life!
Of course I had to add an HDMI cable and display, mouse and keyboard, but I was in the desktop within 20 seconds and playing games and coding Scratch. I had hoped to get AGK onto the device on day, but the device is pretty underpowered compared to the devices I generally deal with, and it might be as well to focus elsewhere for the time being. I do feel the device could do with a cool kick-ass B.A.S.I.C language built into the distribution so kids can discover the fun to be had with a basic device and a basic language. Maybe one day, if no one does this in the next few years. I am sure we could boil AGK right down to run most commands on the device as it has everything we would need such as OpenGL, usual file and memory systems, network, e.t.c. It's still a great device and I get a kick every time I plug it in!
A Reloaded Weekend
My reference to productivity was not in respect to my Pi assembly, but my work on the very first pure Reloaded prototype. Drum role! That's right, I've decided to start Reloaded coding today, the 20th January, ten full days before I had planned to start. I could not resist.
My first challenge and prototype was the 'real-time light-mapping while editing at full speed'. Rather that wait for the 'build step' to make all your lovely light maps, what if the editor was constantly building them in the background (using threads) and then showing you it's progress within the editor as you create your level. Cool huh! Well it was just a theory until I wrote some code to do it. I say was, cos' I did it.
I thought I would need to write a whole new set of DarkLights commands to conduct real-time lighting of meshes, but as it turns out, the lighting scene can be reset and launched again pretty quickly. I will still need commands to overwrite existing light-maps, and a few more concurrency tricks, but generally it went very well. The proto took six hours or so, and on my machine achieves frame rates of 5000 fps with light mapping in the background taking it down to 4500 fps :)
I also took the opportunity to experiment and refine the area lighting approach to lighting a scene. Instead of dropping a single light in the scene, you add about 20 lights in close proximity, and they create much more realistic shadows and lighting on the surrounding scene. I have done a before and after comparison so you can see what FPSC Classic does and what Reloaded is going to do. I will let you decide which is which:
The prototype itself is also pretty cool. You can move the 'placement' object around the scene, and when it moves, the light mapper is triggered to work out a new set of shadows and lighting for all affected surfaces. If you keep the object moving too much, the system removes the old shadow of the object until you have made up your mind. Depending on the workload, the new shadow takes anything from less than a second to several seconds to be created (in the background) and then the mesh is 'double buffer swapped' instantly into view. In the meantime, because all this is done on a background thread, your main editing experience thumps along at thousands of frames per second for smooth experiences for the end user.
Finally, I added a mode to jump directly into my light mapped scene so I could see it from different angles which was very cool. In the final reloaded, you will (should) be able to jump directly into the level and wonder about (and do some more editing) while the light mapper continues to work out which surfaces it has not yet updated and get on with the job of lighting. Removing this 'light map waiting' is perhaps the largest bottle neck for FPSC classic users and should produce a great level editing experience.
YouTube Video Link:
Prototype P002 will probably focus on the other big bottleneck from FPSC classic which was the occlusion system. The original version had a huge memory hungry system of constructing the entire level in a grid system, then working out what you could see through portals carved into this 4D grid database. It had the habit of eating massive chunks of memory and not giving it back so my thought is to throw it all away and think of the problem a fresh. I have had a few years to think about it so should come up with some solutions that work for us. More on this in a future blog.
There you go, another big one, and on a Saturday, which I said I would not do! Ah well, now you know something of the mind of Lee. Can't even follow my own rules, even the ones where the paint is still wet! It's 6:05AM now, technically Sunday, and I had planned to treat myself with some food and a Top Gear, but it pushes me dangerously into Sunday daylight. What to do, what to do. At least it's not a work night :)