Monday, September 7, 2009

A productive, non productive weekend

During the past week my son and I have been taking baby steps in regards to modifying the source code of the game engine. I’m showing him the differences between modifying the C++ code that requires a recompile/rebuild versus the game engines script that is updated on the fly and implemented when running the already compiled executable (pwnagesauce.exe).


  So we start with what I thought at the time was something simple, defaulting the game play view to third person. Easy enough, a single line of code within the engines script defaults the camera view from first to third person. But wait, could it be that easy? It’s never is, is it?
We seem to lose our crosshair when in third person view. This wouldn’t be such a big deal if it weren’t so cumbersome trying to accurately shoot down the test NPC as he runs around the level and continuously missing him each time. It’s almost impossible to pull off an accurate shot without the crosshair, so we’ve run into design gap number one. I recall having this same exact issue in our original version of the engine the first time we headed down the game design road. So I begin to dig through my old code and support forums looking for an answer to the third person cross hair issue.
It only took 3 days or so before I was able to implement a third person crosshair solution. We were ready to move forward, or at least we thought. Our first tests of the new code didn’t work out quit as planned. Yes we now have a crosshair in third person but the crosshair remains centered in the middle of the screen. Using the default third person camera places it right in between the models shoulder blades. You could imagine how annoying it was, in order to shoot straight you would have to lower the camera to be directly behind the model obstructing your view of the actual target.
  Our new issue was modifying the third person camera angle or possibly implementing a new improved camera system so we can see the cross hair and also view the target we were shooting at. So back to the forums it was. This time I stumbled across multiple solutions, all requiring changes to the source code and recompiling but none of which worked completely. There was one resource in particular that was very close and I did manage to partially implement it but multiple variable errors occurred during recompile. What annoyed me about this particular resource was the fact that at least two others reported the same exact compile errors that I received but there was no definitive answers posted. There were multiple other responses but nothing addressing this particular variable error. I wouldn’t have stressed out about it as much if the posts were more recent which they were not. One was as old as 2 years ago without a definitive answer or suggestion. I understand it’s a semi public forum but the support used to be so much better in the early stages of the engine. I put emphasis on the term “semi-public” because you must have a valid product license to access or contribute to the forums. So I understand spending countless hours debugging code or solving other coders’ issues and not wanting to share that intellectual property with the entire community of users for free. But I thought this was a general enough question that even a suggested solution could have been provided. It’s obviously a highly desired resource considering another user posted the same exact question and cut/paste of the error code back in 2006 that I did just this past weekend.


So until I find a solution to our camera dilemma we are back to square one. This time we are going for a first person view, which can easily be changed later. For now we’re focusing on NPC & AI, art and asset implementation. (Character design. Mission maps, etc.) This is the part I like anyway, so no more code stress for now I think I deserve a little break from from:
IF (real life resembles code)
THEN (you are NEO)
ELSE (you are burnt out and need another beer)
That was my week + the holiday weekend. So back to the drawing board we go.

No comments:

Post a Comment