Sunday, May 31, 2009

Sluggish me

So I've been quite unproductive the last month. I just didn't have motivation to do anything.
I watched some series, played some small games (because bigger ones make my PC crash and I want >T1 internets before reinstalling my computer).

But between all that I sometimes tried to pull myself together to do some shit. Which worked for about 1h. But in this small timespans I began to port Dreamball to the Beta SDK released by VALVe, featuring a new code-base, which mainly features new additions and some fixes. Needless to say that these additions only bloat the Dreamball-code as I'll barely use them; but I'll worry about stripping it down later.

I was actually hoping, that this would fix my issue I had with the HUD (=Heads up display). I remember removing it by setting all so called HiddenBits, as we didn't need a health-meter or crosshair or whatever. But when I tried to add a HUD element it didn't work ofcourse. After I reverted the HiddenBits to show all elements, there was still no HUD. Completly nothing, no crosshair, not my own. And I couldn't find the reason.

While porting, I added some code to call some of VALVes player-functions, hoping this would fix the HUD in case they need to be called for it to work.

After I was finished merging all the code, I thought to myself that I could just use the newer version (2008, not 2010) of Visual Studio, the program I use to code, as some adaptions were made. Mostly an easy job. I wanted to make a function to save screenshots in the PNG-format at some point, which caused the linker to go crazy and I tried to fix it, but then, after some time, remembered that this code was WIP and didn't work at all. So I commented it out; I might get back on that somewhen, because Targas are just not up-to-date and jpeg useses visible compression.

The build crashed, and the output from the dlls with release-configuration were not enough to track down the error. So I had to compile dlls with the debug-configuration, which stuff more debugging info in the dlls for the cost of being bigger and slower. The newer version of VS (=Visual Studio) is however known to cause problems with the debug-configuration, so my linker complained a lot. Being kinda perfectios I wanted the build to finish with 0 warnings, as well as 0 errors. I spend quite some time with that, because I was watching some show while doing this, till I thought "It's just a debug-build. Two small warnings per dll don't do any harm."

I could then debug, fix the error and could play. To see that respawning was totally broken. The marble would disappaer, but re-appear when jumping, so the camera could follow a bit, but then disappear again after a short while, although the calculations were done, e.g. if it would disappear on top of the ledge and I'd wait a little to then jump, it would re-appear in the middle or some way down.
I didn't know what was going on and thought, maybe the client and the server don't work in harmony here and I created a small command to output the marbles current position on the server and the client, but there was only a minimal and expected difference.

I still don't quite know what caused this, but I fixed it by removing the calls to VALVes player class which I had forgotten about. It didn't fix the HUD by the way.

So my last thing to do then (today, about 4:30AM) was suddenly seeing that I didn't fucking set the size of my HUD-element. DAMN! But at least it works now :)

Besides that big, mean paragraph up there I've also got more down with assembly, realizing that it's actually dead boring to code stuff in it. It's good to know how it works, but that's all I need I guess.

I'm thinking about taking singing lessons, training my normal voice and also grunting. But it's not 100% certain that I will.

That's enough text for today. I wanna eat supper.

No comments: