Monday, January 25, 2010

No Post Today

My love has gone away ...


I was writing up a post today in school, because I was bored, but after writing a few sentences our schools' proxy server decided that I should have some 400s.

So this post is merely to inform you, that there won't be a decent post today, since I'm too pissed to write it up again.

Saturday, January 23, 2010

Friday Night Madness

as my friend Ionenbombe entitled our additional training on Friday night after Volleyball is over. Note the resemblance to Team Ryoukos Friday Night Madness, though we are far less awesome :P
Well, yesterday we had a good one in a long time. Before I had my torn ligaments, then a bunch of friends wanted to go grab something to eat after Volleyball training, or we trained, but it's been a long time since it was as good as this one.

(Personal) Highlights: I'm proud to have finally gotten a handstand with the support or a wall to lean on to work. I fought a little with Ionenbombe (really just a little bit, but better than nothing :D), we had music due to an misunderstanding and we were jogging for 15min. as the final point of training. Sure it's not much time, but it's been long since we last did that ;]

After I got home, I just needed something sweet and grabbed an Apple apple. After I had eaten it and worried about one of my computers hard drives (still have to run chkdsk on it - just to be sure) I was happy going to bed.


So next morning, after I've slept quite well, I was still a little tired, but somehow managed to drag by body under the shower.
When I got out of the bathroom and wanted to eat for breakfast, my mother reminded me that I wanted to help her get rid of some residual waste we had lying around in our basement about an hour ago. I totally forgot that, since she told me not too long before Volleyball training, where I simply did not keep it in mind.

Well, I dragged the stuff up into the car and we could at least get one load of to the waste disposal. I don't know the word for it, but it's a powerplant producing energy by burning garbage.


To not make this a mega-post I'll save some stuff up for later. Maybe tomorrow or something.
"So long, suckers!"(Prof. Farnsworth)

Monday, January 18, 2010

When Silence is

...
... ...

Well, I didn't post in a while, so here I am again. Still alive, still having internet and still blogging.
School went back on, and it seemed to hit my motivation hard. I didn't write a single line of code for any of my projects, though I wrote some to help others.

I mainly played games and watched some episodes of series I am following. Well, apart from school and some homework.


Not much to tell really.

A friend of mine showed me a nice band: Eyes Set to Kill. I like them very much, thanks!
They may look Emo, but their music is sweet.


I will yet again return to silence now. Live your lifes :)

Friday, January 8, 2010

Why MP3 is bad

Everywhere I look, I see music encoded as either CD-DA or MP3.
So, what's wrong with MP3? I don't care about perfect quality and it has a small filesize, why shouldn't I use it?


It's completely legitimate to have a lossy compression for your audio-files, especially for portable devices. With high bitrates, though not many use them, you often cannot tell a difference from the original, unless you scan the audio-signals with a computer.
But you have to pay for every MP3 you listen to. Why? Many patents on the MP3 codes are held by certain companies. And because their format is tossed around a lot, they thought that they can earn money with that.
So the creator of his music has to pay them, if he sells his music in a MP3 format. Anyone making an application, which encodes or decodes MP3, has to pay for using these algorithms.

You might say "But my music player was free and I never payed anyone for converting my audio CD to MP3". Well, if that is so, then you are culpable. You might never pay anything, since it would cost more to sue everybody just to extract a few dollars from them, but this thought in a free country should not be ignored!
And for any MP3-music you buy, you'll pay them, because it does pay off to sue bigger companies.

Maybe you do not care? Well, by still using that proprietary format you are supporting it. And if it keeps getting support, then it cannot get better, and let me tell you, there are better solutions! Before I go to them, I still have another point to address:

Maybe you have heard of LAME. LAME is a MP3-encoder and you might know it's open source.
Well, this does not make anything better, really. By not shipping out compiled binaries they can narrowly escape the patent and legal issues, but anyone using LAME will have to pay again, open source doesn't really matter.


Now: Solutions.

There is indeed a lossy audio-format, which is completely free from any parent. It provides better quality and smaller filesize. You don't trust me? Hear for yourself!
Even better: It's public domain! You don't believe me? Read for yourself!
If you don't care about the legal crap or any free spirit-stuff, then just use it for smaller filesizes. You can't complain about that, can you?

Not all MP3-Players can play that format though. Well, there's probably no chance for you then. Consider getting one supporting Ogg Vorbis next time!
Since the iPod is quite popular, you cannot natively listen to Vorbis audio, but there is a solution for you: iPodLinux
Don't be scared away by 'Linux'. There's nothing to loose, You can easily install it, You can always go back and It's even completely legal. Just look here if your iPod is supported and then get started and install it!

Wednesday, January 6, 2010

ViruZ update 11

Compared to the last few entries, this one is quite late.
Well, I was saying that I'll be working on the Source-projects and I did.
I'm not reporting about them, because the one mod is kinda a secret as of now (nothing special though, just didn't care about PR yet, nor we have a design document, meaning no feature freeze yet) and the other one... well the report would be like:
So I added this weapon and debugged it and played that game because it's so boring and then I ended up watching a few episodes of that series and finished coding so I can get to sleep.


But the title is Viruz update 11, because I actually have some words to say about the doings of that game.
I've been wanting to test it on an older computer, with the result of it not starting up. The problem is, that I require the SSE2 extension. I decided to use it, because cairo is using doubles for every numerical stuff and thus I am using doubles in my code.
Doubles are double-precision floating-point values, thus they occupy the double amount of space and SSE2 makes enough room for that.
I guess I'll also compile a SSE2-less version, so you guys with older hardware can still try to play it. I still don't know how much FPS those machines give though.

I will also now move all the game-logic out of the Window-class I made. That was planned from the start anyways, so I have then a part I call 'playground' and one 'HUD'.
Upon this step I also plan on speeding up the infection-algorithm by not looping through each virus for each sick virus, but rather register each virus upon getting sick as such in the Playground-class, then looping through once and checking if any healthy virus is inside of a contamination-circle.

I also need to make my mind up about how to design levels. I guess I'll be using JSON. It looks so much cleaner than XML and it's still an easy editable format. For parsing it I'll probably just use some pre-written software. There's no need to reinvent the wheel here!

Sunday, January 3, 2010

ViruZ update 10

We reached a number with two digits already! Not bad.

So, I've implemented functionality to the anti-serum. Viruses now can get sick, infect others and die.
Though I have to loop through all viruses to find, which ones to infect, the framerate is still good enough.

I'm not sure what more to say. Have a picture:
Three viruses are in a sick-state, three are sickening and two are dying. Six are already dead and 38 are alive and healthy.

There's a small animation for the sickening. You can see the contamination-radius expanding.
Upon dying, the virus with his contamination-radius gets smaller and is dead upon reaching singularity.

Here's a fun picture when I didn't have them die yet:
If you compare it to the other picture, you can also see that in this version the viruses have a bit more contrast than now.

The next step is changing the movement of the viruses. I want them to move straight lines in a random fashion. Right now, they have a set velocity and bounce off the sides. Well, except when they are sick, in which case they stand still :P


I will spend less time on ViruZ now. I need to get back to code some stuff in Source I promised I would. And I also like to get it out of my head.
And school is back on next week (well, in 8 days). I should begin to worry about my final exams...

Friday, January 1, 2010

ViruZ update 9

I'm now using OpenMP (2.0, because MSVS did not update it) instead of Win32-Threads.
This way, I don't need to re-write my threaded-code for each platform, or disable it on specific ones.
It's supported on the platforms and compilers that matter to me, so it fits perfect.

I also optimized the threaded routine a bit, and I got an even better idea, which is quite simple:
One thread draws, the others update.
Since drawing must be synchronized, this should do a bit better than my current approach, but I have to think of a good solution of how to tell the draw-thread, what it can draw. Maybe a synchronized queue. I think my current approach would be better than this though. We'll see.

Because implementing parallel processing on loops with OpenMP is piss easy, I also added partial threading for my serum, with the result of the frame-drop being almost negligible now. Very nice! <3 OpenMP


And I fixed that bug, which caused the program to hang. After all, it was a memory-overflow. I'm not sure, why the program didn't crash or something... it was very little and I don't understand how that caused the program to not work anyways.
I used CreateRectRgnIndirect on a rect, and passed the result directly to InvalidateRgn. But you have to DeleteObject on the CreateRectRgnIndirect.. I didn't cache that into a variable, because it's still from my early code.
I've also done it in the loop, because I expected the region to be cleared after a call to UpdateWindow. Now I am also just using GetWindowRgn (still have to DeleteObject that though ;)).

I found that out by looking out for unusual processor usage. Since the memory-tab is right besides that, I noticed that it kept going up and stopped right when my application stopped drawing.
I tried out various things, until I just outputted a randomly chosen value each frame with the WinAPI and it still stopped.
I lookout out if I had pointers anywhere and at some point, CreateRectRgnIndirect caught my eye and BAM fixed.

I should also point out my thanks to schnitzl for that bug. Else it might have gone unnoticed for a long time. And more code means more to look after.

Mah hair

it's there:
quite a lot!
Well, now it's not:

At last, as promised :)

Also, Happy New Year!
Sorry if you're going for another calender than me.