Another fine day in developer land, and the sun has finally retreated behind the cool embrace of Welsh cloud. That means my office is no longer a sauna, and like a Troll, my brain is starting to function again in the cooler air.
I have my little task list for today which comprises mainly of dealing with the last of the map editor fixes. I have knocked my emails on the head this morning so my afternoon is free to code and conceptualise to my hearts content.
Running the current version was quite a good feeling as for the first time in weeks and weeks I can pick a segment, and paint with it without horrors appearing on the screen.
An Art Treat
After days of art-less blogging, I can reveal some new art to you in the form of some animations I left would help the final Reloaded game play experience. Rather than read my whittering, here is Mark to present the extras in this very cool video:
I am particularly excited about the pointing 'while talking' animation as it really opens up a whole new series of features for NPC and Combat interaction. Imagine hiding from a group of enemies, and in the distance you have your zoom lens locked onto the group commander. You see him talk with his men, then suddenly point in your direction, ooh the chills. I must maintain composure each time I see these animations as I know deep down it's the AI and game play that will make or break Reloaded. My current tasks are akin to rebuilding a straight six engine, when the exciting part are the lines of the car and the toys inside!
Off the bat I can see the editing does not delete at low LOD, which will need some more data structures and code to support this. The highlighter flickers which indicates which segment is being edited, there is some Z clash on the floor when you paint floor segments down, when you paint quickly, there is a performance hit as the deletion code rapidly removes (or to be added again) segments which is noticeable on my monster rig. That means it will definitely show up on an average machine.
Not sure what order I will tackle these issues, but a nice cup of tea will certainly help the decision making process.
13:45 A Cup Of Tea Later
I have decided to skip optimising the deletion code and leave it slowish for now, so I can focus on adding the required functionality for the map editor. I will doubtless see opportunities for speeding things up as I go along. I have also fixed the highlighting and Z clash issues, so my primary task now is editing in the low LOD areas (which in theory is just an extension of the high LOD deletion system).
14:42 Quick Tip
A nice tip for the new coder. When you are amending a data structure to include new fields or additional dimensions to an array, add the extras to the data structure and all the code that used the former structure, but don't add any new functionality associated with the new additions. Get your app working as before so you know existing functionality is in tact before expanding your code and using the new fields and data for the intended purpose. This way you are only fighting one fire at a time :)
14:56 Low LOD Deletion Done
Using my super tip, I was able to step through the logical steps to increase the capabilities of the delete code to include the larger low LOD area, and now I can paint and delete at any level of editing, which is great!
In testing this though, I found a new issue which was that when you overlay two segments on top of each other (which is fine), when it comes time to delete the crossed segments, they stay there. It gets worse, as in another test when I drew a segment over another one, two more segments that neighbour them also refused to delete. Just like bubbles, you push one down and another pops right back up :)
15:18 LOD Transition fixed
Before I could solve the above, I noticed the LOD transition was off on segments in the positive directions, now fixed and it's great to see an almost perfect transition in LOD right up until the camera clipping plane eats them. Something we never had in FPSC classic so a great addition!
15:29 Multiple Deletions Are Go
I disabled the code which only deletes segments of the same type and now we have no left-over segments, hurray! If I don't probe too deeply, I can be quite happy with how the map editor now behaves with the new instance stamp implementation. It does not do segment overlays, entities, lights or anything else you might associate with the editor, but segment editing, memory handling, rendering and LOD are all working nicely.
15:48 Eye Candy
Earlier today I was interrupted by Rick with the request to have some 'decent' stuff to show in a few weeks time when I disappear for my two week vacation. I only have one 'test' segment, which really does not help me construct a detailed game shot :) To this end I fired off an email to Mark to start the serious work around segments, scenes, shaders and all things beginning with S. While I wait for that reply, I have decided to derail my current work to get the map editor 100% back to factory functionality, and instead switch over to 'fancy visuals' mode.
Before I mentally switched tracks (about ten minutes), I created a small scene (oh, you can't save and load levels either as the level constructor code still uses the old system) which was a very very long tunnel from one end of the level to the other. As I ran down it, I considered how great it would be to use a shader to demonstrate parallax rendering here, and also to experiment with other visual techniques for shadows, lighting and anything else we need for the final shader.
I just noticed how long this blog was getting, and I don't want to be accused of spending all my time blogging about Reloaded instead of coding it, so I will end here. The rest of the day and evening will be working on the new shader prototype, which will be designed to drop into the map editor and allow that wonderful shaded tunnel scene I described above.
Hopefully in the next two weeks you will see some nice eye candy and visuals to excite you about Reloaded. It's not the best time to pull away from the map editor functionality work (as it's fresh in my mind), but the shader work is also time critical as Mark needs these early results. It will also be fun too!