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.

Wednesday, May 6, 2009

myAVR board MK1 LPT

It's a microcontroller and I got one for computer science in school.
To be precise, we bought one of that for each one of our class.
Two days ago (Monday) we had our first lesson with that, and it was to simply test its functionality. We didn't test it completly though. But I know that all my ports (D, B, C), all LEDs, the buzzer and the two buttons work (and the processor, a Atmel Mega 8, works too of course).

The first program I made by myself is a ... err ... buzzer tone generator. It simply creates a static tone, getting quadratic lower on each pin down (6 pins all in all). The next addition are the two buttons to make even lower tones, so it's now 6*4 (=24) in total.

This is achieved by simply having a counter and putting its output to one of the ports. You have to know how numbers in the dual-number-system are working to understand that. Basically the first digit changes every clock, the second every two clocks, the third every fourth and so on.
The buttons simply add a predefined delay.
The bigger the pause between the signals, which are sent out to the port where you connect the buzzer to, the lower the tone will be.

I'd post my program here, but I doubt that anyone reading this blog would be interested in it or have any use for it.

Next I'm trying to make a little crappy game, where you have to press a button fast enough.

Done, took me about 2 damn hours! And it's crappy. But I learned something :)

Tuesday, May 5, 2009

Catchy Song

I never was really fond of the game, but the music is so damn catchy <3
That song was in my head for three days straight now :X

Saturday, May 2, 2009


Let's make an update, shall we?
I dunno.. I don't really feel like writing something; but here it goes!

School is being school again. I've even done some homework at home lately. I seem to have had a down-phase, because I was getting a bunch of bad marks from the tests written last month. Last year I didn't really have to learn anything for the test, but I guess for the next ones I'll better get my ass up.

Coding progressed. I did a little bit on a private project, which is a small class to read and write individual bits to a file. The 'problem' is that the hardware is only capable of writing and reading bytes (= 8 bits). It could probably be done fast with std::bitset or boost::dynamic_bitset, but where's the fun by that :P

Dreamball progressed sweet. The demo is not too far and I can promise you that it will be awesome :D

I helped Dec Doyle a little with coding of his The Mortewood Plaza mod for Half-Life 2. I have to say, it looks damn sweet, but I don't really wanna know how hacked the code for it is :P
I saved me a place for the closed beta with that :D

Spring brings hay fever for me. Pretty annoying, but I got some new kind of immunization last month which should help better than the ones I got before. It seems to be better indeed.

And that's it for today. At least I gave a life-sign since my plan to take over the world obviously has failed. Who knew that you can't train handkerchiefs to kill for you :O