Thursday, December 31, 2009

ViruZ update 8

So, I guess another time was today. Because I fixed the huge FPS lag.
cairo_scale seems to be a slow operation (or at least drawing on it after such a transformation). I had a buffer with a single blue circle, then would loop over it a few times to draw it.
The circles would be small at first and become bigger till they reach a certain size.

I tried out some different stuff, and it proved to be the fastest way when I just re-draw the circle each time it gets bigger, instead of scaling a buffer.
The performance-hit is now about 5FPS per core (since that drawing is not threaded (yet?)).

Here's a screenshot of it:

There's a nasty bug atm, which leads the program to just stop rendering after a time. I'm pretty sure the time is bound to the FPS, so it stops after a certain amount of rendered frames.
At first I thought it would be a memory-overrun somewhere, but that looked fine in the performance-monitor. So I began checking the code and the drawing-functions are executed properly. Then I suspected that maybe my timer would reach its max and stop counting, but that would just lead to an overflow and cause weird moving-behavior for one frame. Plus, I calculated that it will have to run over 500 years before it overflows.
I tried commenting out the drawing of my serum and the viruses (as well the update-function-calls), but it still just freezes.
I'm very clueless, but search will go on.

This post is, compared to the other ViruZ updates, quite early. This is due to tomorrow being the year 2010. I'm going to a friends New Years party in about 10 minutes, so I was searching for something to do and remembered, that I will probably not be able to post an update within the next few hours and that it would kill most of the time I wanna kill.
So, here it is. yaaaaaaaaaaaaaaaaay[/noemotion][/sarcasm]

Wednesday, December 30, 2009

ViruZ update 7

I still tweaked the render-code a bit today. Well, for threaded drawing at least.
I have a loop, in which I update and then draw the viruses. The mutex is only required for drawing, that's why I didn't put both in one function.
I also can then update while the window should not be drawn (e.g. minimized Window).

So, before I was like

for each(virus) {

now it's alike

for each(virus) {
  while(!tryObtainingMutex()) {
    virus = next_virus;
  //we have the mutex now
  for each(virus in queue)
if(!queue.empty()) {
  for each(virus in queue)

It's much more code, but I still got 10-20 more FPS out of it on my dual-core.
I also cleaned the thread-class. I guess I'm gonna keep it.

I also implemented the serum. Well, partly. Mostly just the drawing- and animation-part.
Sadly the FPS get cut in half while drawing it D:
I guess I'm doing something wrong.. but I'll get behind that at another time.

ViruZ update 6

I've been implementing a hacky way of clipping/masking stuff. I simply wanted to look at the FPS-change.
I've been writing some stuff for only drawing half the screen. Turns out that this as well does not affect the FPS much. I'm scrapping out half the frame and almost no change!
I guess I won't get much of a FPS boost for optimizing my drawing-routine. The most stuff seems to originate from the loops (stepping through each virus and calling its update- and draw-function) and from some other internal stuff, but not really drawing the vector graphics.

That's a bit disappointing, but at least I won't have to worry about that and can concentrate more about the actual game.

Sunday, December 27, 2009

ViruZ update 5

So, I added threading. The array is split into n parts, so that then n threads can get to work drawing. I'm using a CRITICAL_SECTION to keep cairo okay, since it does not support threads.
Well, since my viruses have a rather small logic (they bounce around), that didn't really pay off for the effort.

I have to make something more efficient, such as creating n rectangles or something and draw on them without the need of a CRITICAL_SECTION I guess, but drawing the viruses doesn't really seem to be the bottleneck.
Drawing them in one thread I get 150-200FPS, in two (I have a dual-core without Hyper-Threading) 170-240FPS and not drawing viruses at all (so just background & FPS-text) 240-430FPS.
The former two are again 100 viruses and I am still drawing the whole screen each frame.

The Thread-class I made is pretty hacky; I think I'm going to take it out again. I'll try how well it performs when I add this separate rectangle-thing and decide upon that. If I get a boost of about 100FPS or more I'll fix the class up, if not I'll remove that feature.

Friday, December 25, 2009

ViruZ update 4

A major performance-improvement today. Turns out that double-buffering increased the performance!
My guess is, that this way the device context doesn't have to be updated at every call of the paint-function.

I also added simple movement (the circles are simply moving in one direction) and the speed I'm getting from this is about 180-280 FPS for still 100 viruses, represented by outlined and anti-aliased circles blah blah :D
Oh, and the FPS-text is also drawn :P

I'm also still always drawing the whole frame and only using one thread to draw.
I also fixed some small stuff in my message-pump, which caused some messages to be sent twice (tbh I'm not sure if that is still occouring..).

note: that L on the FPS just indicates, that it is a double-precision float(ing-point number).

Thursday, December 24, 2009

ViruZ update 3

I moved the draw function into the entity today. I tried fiddling around with a way to effectively buffer the drawing, so it doesn't have to draw the circle again, but can just use that buffer on another position.
I don't think I got it right though. I'm not sure how cairo does things internally, but I'm just not sure.

Well, I tested the performance and I get about 50FPS with 100 outlined and anti-aliased circles, rendering on one core at 2.4Ghz; I'm still not sure how much my graphics-card is used with cairo, but I have a GeForce 9600GT.
This will probably become slower though, since there is no logic done atm, but that result shows me that it'll probably draw fast enough. 30FPS should still look fluent and maybe I can still optimize some stuff. I'm also not too sure that I'll need to draw 100 objects every frame (it's redrawing the whole scene atm).

Merry Christmas

I'm not a Christian, I don't even believe in god for that matter, but I was raised and still live in a Christian society, so Merry Christmas everybody.

If you believe in a(nother) religion, then so shall your god ram his invincible fist through me, so that my lifeless body shall explode by the mere thought of your angry god and my soul shall burn in eternity.
Good day to you, Sir/Madam.

ViruZ update 2

Okay, so now I finally fixed that window-closing. There was some weird stuff going on, because the event actually got rised and handled, but PostQuitMessage didn't seem to do its job.
So I am perkily pooping on this, which tells you to "not post the WM_QUIT message using PostMessage; [but to] use the PostQuitMessage function.". And then it works.

Yay :3

I also implemented double-buffering, using the cairo_push_group and cairo_pop_group_to_surface-functions. Well, it's not really double-buffering, since I'm not buffering the image and swap the fore- and back-buffer, but it gets rid of the flickering so it's good enough for me.
I stumbled upon them while looking for a way to copy surfaces.
I hope they cooperate with threads :S

I also started laying out a design for my virus-baseclass. I'm hoping to somehow cache the drawn circle, maybe even share that cache among equal looking viruses, and thus only having to copy the already drawn circle on the surface.

So my next step lies in putting some flesh (code) on the bones (class layout), making my draw-function loop through an array of viruses (later with threads) and use their draw-function.
After that, I will implement moving-logic to the viruses. Then the Anti-V. Then cleaning up a little and maybe I'm gonna upload a public executable.

Once I am taking care of installing GRUB to boot Ubuntu again, I'll also take care of the Linux-port. It'll be available for all Linux, which are running the X Window System and are compatible with cario. I guess.

Tuesday, December 22, 2009

ViruZ update 1

Well, I don't know if I'm going to post frequently about it, but well.. yesterday I moved the stuff into my Window-class completely.

There is a more elegant solution to my messagepump-function, instead of using a fake singleton.
Of course, other people have had this problem, too. I googled and quickly found an article on GameDev about it. Using Set/GetWindowLong with GWL_USERDATA lets you store a pointer, which will be associated with a window. I'd explain it, but it's probably easier if you just read this. If you wanna use it, you'll have to modify it a bit. Check for GetWindowLong to return NULL, because the first message is not WM_NCCREATE, but WM_GETMINMAXINFO, which does not have the lpCreateParams.
I ran into some fun invalid pointers with this :)

I then fiddled around with getting my program to close when you hit alt+F4 or click the close-button. I also ran into some invalid pointers by destroying the window on WM_CLOSE, but still running the messagepump-loop.
Fixed that by not destroying the window and calling PostQuitMessage on WM_CLOSE and WM_DESTROY. I'm gonna make WM_DESTROY check, if WM_CLOSE got called before at some point.

That only half-way fixed the problem though. There are problems when the window is closed in specific points in code. WaitMessage waits for new events only, not unhanded ones. So if I call WaitMessage after the user has pressed the close-button it would not close. I actually have no idea where that event went though.. but it just seemed to disappear then.
I fixed that just a minute ago by putting my redraw-hack in a thread, rather than in the messagepump-loop.

No, I didn't fix it. Strange stuff, it does not work at all. It only works after you've moved the window o_O
After you've done that, it works like it should]

The only problem left is slight flickering. I just have to double-buffer it by hand, then it won't flicker I bet :)

note: that screenshot was shot yesterday

built cairo

Wow, this seems to be my blog-month. Or maybe it's the holidays. Or my short hair. Or something else, that makes me more productive.

Note: the following-stuff is quite programming-related and might confuse you if you are not a programmer yourself

Whatever it is, I got cairo to compile and link, finally. Thanks to Stack Overflow I opened the MSYS-enviroment in the Microsoft Visual Studio Commandline Enviroment and thus got the UNIX-tools with the MSVC-tools.
Well, it wasn't as easy as just typing 'make' into it, I had to fiddle around with the makefiles, got some nasty errors, but now I've build all the required libs and cairo itself.

I was already thinking about just using pre-built libraries, but now I can sleep better :P

cairo doesn't have convenience-functions like SDL or OpenGL (though [{free, open}]GLUT) or something to open a window. I could use some GUI-library, but since I'll be using cairo to draw everything that seems to be a little bloat. I'll just have to write the platform-specific stuff for Windows and UNIX with XServer, maybe also MacOS stuff, myself.

As I can only boot Windows atm (install had overridden the boot-sector; didn't care to fix it yet) I started working on the Windows-port. I seem to have to use GDI for cairo, though I am wondering whether or not I am still getting the hardware-accelerated goodness.

I got a Window open pretty fast and used tutorial-code to draw on it, but I wanted debug-output. So I used AllocConsole, but std::cout can't print on that without rerouting.. and that code I saw for that seemed weird, so I wrote a small templated function to use WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), ... instead.

Windows seems to think that my Application does not respond very well and draws that loading-cursor when you hover over it. I also can't click the close-button; probably the same reason. I'm not really sure how to fix it, but I'll care about that later.

I initially had problems redrawing the graphic, which is needed since the scene is going to have moving stuff. I was thinking that RedrawWindow(wnd, NULL, NULL, RDW_INTERNALPAINT) would work, but the message/event WM_PAINT didn't go through. I then tried obtaining the rect via GetBoundsRect(GetDC(wnd), &rect, 0), but it is empty. I simply hard-coded it to have the same height and width as the window itself, and using this I can redraw fine.
Of course I won't be drawing the whole window over and over again in the final version if it doesn't need to be.

Well, right now I am on packing the test-stuff I had into a Window-class. It seems like I can't get a std::tr1::function with __stdcall. Really sucks, because I need to call a member-function for the MessagePump and the Windows SDK uses the __stdcall calling convention.
I tried around with casts 'n stuff, but I can't seem to get it to work :'(

I'll fiddle around a bit more, and if it doesn't work I'll hack it by having a static function in the Window-class returning an instance of itself. Kinda like a singleton, only that Window is no singleton...

Sunday, December 20, 2009

ViruZ - fifth rewrite

Some of you might have heard ViruZ before, but I doubt you will remember it.
I posted about it when I still wrote in German.

So, it was a flash-game before. It's about viruses you have to kill with an antidote.
The viruses are represented with circles and you can inject the antidote with a mouse-click on the cursor-position. The viruses move around randomly.
On injecting the antidote, the viruses in a set area around that spot will be infected and become sick. Some may survive, some may die. Any viruses, that are near enough on sick viruses, will get sick themselves.

I had a flash-version going, then attempted to rewrite that with proper use of OOP, but I ran into some complications with my C++-way of thinking.
After that I attempted to rewrite it in C++ using Qt. I also had some problems due to being new to Qt, but now, on my forth rewrite, I got around them.
Sadly Qt seems to be too slow. It draws 50 viruses at around 3 FPS. I am using vector-graphics, but they should be hardware-accelerated and I'm using caching, so it's probably the loop. They are saved in a stack-allocated array, so it's probably just to big.
Well, Qt is meant to be used for GUIs, not really games.

I'd use threads to batch-process the movement and maybe try to coordinate batched drawing, but Qt seems to be limited in its threading-ability.

So I am looking into cairo atm. I've already managed getting zlib and libpng to build, but I'm kinda clueless about cairo. fmake doesn't seem to work, so I'll try downloading MSYS.

Thursday, December 17, 2009

'Bout mah hair today

Well, today things look a bit different.

If you were reading the post of yesterday, you will notice that I was emotionally touched by the events that went wrong. I gave it some thought yesterday evening and I dealt with it.
My mother should know after more than 19 years, that I am not that well with names. And if she doesn't care that I really take this to my heart and that I am disappointed in myself, well that's just not my concern. I did say sorry, I did explain myself and I did search for solutions, but frankly I do not have a time machine (yet!).

So, when I stood up this morning and looked this new face in the mirror, my first thought was about "Man, do I have big eye brows". Of course I also was reminded that I was going to the wrong barber shop and that I might not be able to sell my hair, though I have gone through some trouble to get to this point, but whatever.
It feels great having short hair, finally after having decided for this over a year ago.

Also, no pics yet. I only have the before-picture atm and I wanna post both at the same time.
You still have to wait. Or kill yourself and become a spiritual creature that can travel through the multiverse and the time. Have fun! and try not to make a mess :/

Wednesday, December 16, 2009

Mah hair

is about 3mm long. And just an hour ago they were about 60cm long. Kind of a bit of a difference, huh?

I explained some stuff in my previous Mah hair-post, so I won't have you tell about that stuff. But I have something to say about my visit to the barber: My mother made an appointment by one in the city where we live.
My Ex-Girlfriend wanted to see me getting my hair cut off, so I met her a little sooner. We were driving with the bike to the barber, but as it will turn out, I simply did not remember the full description of the way when I saw a barbershop.

I am planning to sell my hair. That's not the reason why I cut it of, but it's a nice thing, since it's not costing me much if I do so. My mother already explained to the barber how they shall cur my hair so we can sell it, but since I got to the wrong place they did not do it like planned.

When I got home my mother was really mad at me. She's in doubt that I can sell it appropriately now and she doesn't want to go to that barbershop she made the appointment with, since that wrong I did makes her look bad to them. I tried to explain why it went wrong and that I am sorry for the way it turned out, but it is understandable that she still is mad.

I am really disappointed in myself for not realizing that I was inside the wrong shop. It all seemed so easy-going, but now everything just looks so... I don't know; I can't find the right words for it, at least something bad.

If I am still able to sell my hair, I will pass the money to my parents. I feel just wrong taking it now, even if it turns out alright. I know that I cannot right the wrongs I did today, never ever probably, but I will just have to live with that.
I actually thought that I will be happy looking in the mirror and seeing my short hair, but now all I will remember is the sorrow of this day.

Also, I will post pictures of me with and without my long hair soonish.

Monday, December 7, 2009


I've been jogging two weeks ago, the first time I did real sports after my ligaments had been torn. I really enjoyed sweating out of physical effort.
It's been for school sport, and I'm glad to say that my muscles didn't get too rusty within the 2.5month. I think I could have been jogging with the top, if I hadn't told my teacher why I prefer C# to Java. We had a little discussion about C# vs Java and my teacher was looking for the pupils on the back, so I would have had to put a lot of effort to reach the top ones. Besides, I tried not to get too far away from the group that I was already in, since we were quite spread out.

We were jogging about 50min. and a distance of about 7km, which calculates to an average speed of 2 1/3 m/s.
I also had hella aching muscles afterwards :P It kicked in about evening after I've been sitting on the computer for some while.

I think the lack of sport really demotivates me for some reason. I haven't been doing much work lately: haven't been learning for tests, not doing any homework (I usually at least try to remember what we did last lesson and if there is any homework we must do), barely been preparing the speeches I have to give, little coding, ...
One good thing I did was writing this up. And this is because its ticket is marked essential and I'm quite excited about the project CML. For one about the actual code that we'll have to write, the design concepts we have to think up as well as its application.
But CML is material for another blog-post...

So, getting back to sports, after I've been playing badminton last week in school, I've decided that my foot should be healed well enough to get started with volleyball again. Since on Friday last week we had a match or some tournament I didn't participate. I also don't go Tuesdays, because we have school sport on Wednesday and I've already been missing enough of that...

As such, I am looking forward to this Friday. Badly enough though that till then I will have conducted all my presentations. I think I still can prepare for a test we write this year though.

Stay safe folks!

Monday, November 23, 2009

Mah hair

is about 60cm long.. and I was expecting it to be 3mm. Kind of a bit of a difference, huh?

Well, let's get back to the time when I decided to let my hair grow. It was some when in in the later half of high school. I was more or less excluded from my class mates and I guess I wanted to express being different by growing my hair. Surely I was also influenced by my sister, who was taking a step or two in the direction of goth-style.

About when my hair started touching my shoulders I thought about what to exactly do with my hair. Dreadlocks was the answer, but I dropped the idea because these are rather expensive. I left them long, because I got used to it.

It's worth mentioning that some when around this time I also started wearing exclusively black. And I also got used to this.

Anyways, around summer last year two of my friends, who also had long hair (though not as long as mine :D), cut theirs down. One also got 3mm or something, while the other kept some of his length.
I started asking myself if I might decide to do this as well and was positive about it, since I now was doing sports in my free time and the hair gets in the way sometimes - especially when I'm fighting with Ionenbombe. And I'd also be faster when showering. The only disadvantage that might exist is loosing style. Whatever ^^

I still kept it though for Carnival, since last year there was a street band I was head banging with a bunch of friends to, since their music was sweet and I planned doing so again. I was also looking into maybe singing for a metal-band a few friends of mine opened, but I didn't take the time to take singing lessons, so I dropped that.

While I was lucky enough to not get invited to go on the streets on Carnival I had decided to take acting class in school for theater. Everyone in the 12th grade has to do something for your yearly theater; despite acting there's stuff like stage building, costume & make-up, editorial staff, organisational staff and technic staff (caring about sounds, music, lights and camera).
I decided for acting, because I was hoping to work against my shyness a bit and because Ionenbombe was in acting class last year and recommended it.

I regret this decision though. We had a new teacher this year; the last year we were playing classical theater and she wanted to do a more modern styled theater. Well, I thought I could get through with just blind obeying, but it still was shit since we should be like open and develop own stuff 'n shit.
Well, because of choosing acting class I decided to let my long hair stay till the theater plays are all over. This was a well made decision, since I was chosen to be Poseidon, the greek god of the see and earth-shaker.

Anyways about three weeks ago the last theater play was held. I was content that acting was over and it was time to let my hair leave my head. I also heard from some friends, that I can get money for my long hair, since wigs can be made out of it. So I phoned an hair-studio, but just to receive a message that this year they won't have any free appointments :(

Well, I'll try asking if I may go to another barber, take the hair and bring it to them to buy it, since your conventional barber won't buy it :P
I hope this is working so I can finally can get rid of my long hair, a plan I had over 1.5 years ago :S

Wednesday, November 18, 2009

Paramedical course

I went to a paramedical course for... well I have no idea what the US pendant is, but I'll get a batch with the Rod of Asclepius to put on my jacket soon (via Velcro, not by stitching :P).
I've spend 3 weekends for this, meaning 6 days from 8:30 to 17:00. These were the official times, so not taking stuff like staying up, getting there, overrun a bit (well, mostly it was just a bunch of minutes) and getting back home into account.

On the last day, there was a theoretical test and a practical test. Those who passed were to getting a certificate... every one but me got one ;_;
I did pass the tests, but someone screw up and forgot to bring my form or something. So I'll obtain it later via post.

I was actually planning on getting there by bike. The way's like 3km or something. But the first day I had to quit a bit earlier for theater play at school, so my mother drove me so I can get faster to my school. A comerade of the local red cross-union offered to take me with him in his car for the remaining 5 days. Of course I accepted.
The last day however I didn't drive back with him. They were searching for a guy who could be driving a vehicle of the red cross back where it belongs and still get home easily. As I have my driver license and live like 200m further, I reported in for that.

Now this vehicle was the widest, and possibly even the biggest one, I've ever driven. I was quite worried scratching parked cars or planted trees or hitting some contraflow, but everything worked fine. In hindsight is was a nice experience and quite fun.

And I also wanted to explain the Panzels-post. So when I finally got home on sunday, I thought "I gotta get out of these pants", because the red cross-pants I tend to build up their own high-humidity atmosphere. And for the lulz of corruption I thought "pantsls" (or something sounding alike). Then I thought that this sounded like "pencils" and somehow I got to the word "pretzels", which in combination with "pants" would actually result in "pantzels".

So, later this evening I was talking to a friend, who wanted me to test if his website works. I wanted to go to sleep, but I was friendly enough to wait to test it. I was bored and asked him what the result of "pants" + "pretzels" would be, the answer being pantzels of course. Before pointing out, that this sounds like pencils, I was thinking that "pencils" + "panzer" would also equal "pantzels", so I told him that and assured him, that the government was behind this.
Because I still had to wait, I decided to blog it.

Yeah, I get like this when I'm tired.

Monday, November 16, 2009


Pants + Pretzels = Panzels
Pencils + Panzers = Panzels
What the fuck ;_;

I'm tired, I'm going to sleep.

Friday, November 13, 2009

Busy weekend

Time to make myself useful and write a post again.
Last weekend I had a full schedule:

Friday - School (morning to noon), paramedical service (noon to afternoon), school theater (afternoon to night), sleep (night to morning)

Saturday - paramedical education (morning to afternoon), school theater (afternoon to night), sleep (night to morning)

Sunday - paramedical education (morning to afternoon), paramedical service (afternoon to early night), some free-time, sleep (night to morning)

And well... then school again. I really was jumping from event to event without any free time but about one hour before going to bed to check my mails and replying to some forum posts.
Therefore I know that I spend my time well. Yay :]

Sunday, October 18, 2009

Windows Speech Recognition

I've been mainly enjoying Source-games now and returned to posting on the Steam forums. I have to say there were times when the Source Coding-section was far more active.

Anyways, I wanted to play a Multiplayer-game and gone through the settings to discover that my microphone is too quiet. I've searched for the settings in Window (well, and found them quickly) but stumbled upon the "Microsoft Speech Recognition", which I had to try out immediatly.
I probably wouldn't use it in my daily live, but I thought it might be fun.

The tutorial was very easy and promising, but after it was finished it was a hell working with it. When I gone through the tutorial you are supposed to say a bunch of things and it shows you how it should react then. I wanted to quit it half-way through as I thought that I'd know enough to navigate now, but then it said that the Speech Recognition will adapt the longer I work with it and it already is adapting as I train in this tutorial, so I continued since my spoken English is probably only half as good as my written one - which also is not perfect - as I train it less; I mean I write and read English all over the internet and usually play games & films in English, but I rarely have the opportunity to actually speak it.
Dictating works okay, until I wanted it to write C++, which it interpreted as "c plus plus" and I simply couldn't correct it. It also understood "eat it" when I said delete and when I said "select ..." it wrote the whole thing, instead of selecting all the words. It's probably there for selecting only one word - but why?
And it also had problems with my way of saying "Google" when I wanted to switch to Google Chrome - which I finally selected with my mouse and was quite unable to click any links!

I also wanted to say that I had the 3 posts "I'm back online" to "My right foot" prepared while I had no internets. There shouldn't be one mega-post again, so I separated them and to not make a 'virtual mega-post' I also waited 5 days between each post.
I actually had a forth post prepared for that, but I'm too lazy to plug the old drives back in and copy them (I have too little energy-cables on my PSU (=Power Supplying Unit) to power more than 2 :/).

Wednesday, October 14, 2009


I'm back on Windows. I'm making this very post in Windows 7 on my current machine.

To not waste CDs (yes I know there are RWs.. still) I made up my mind about using a VM. So I booted up my Sidux Live-CD, installed virtualbox and mounted the Ubuntu-image as a CD-drive.

Why? Because I can :P
And after booting up Ubuntu, updating and installing some essentials I installed Windows 7 through Virtualbox.
Why? Because I f-ing can, that's why! :P
And you can do stuffs while it's loading :)
Well, now it's on updating, installing drivers, downloading Steam-games and getting back in touch with friends.

Also, 3 posts today.

New Linux

Well so I decided to get Ubuntu.
The Frugalware-site is still down and although reading through the Arch Linux Beginners' Guide, from which I noticed that it's not really hard, as long as you can work through a cli, I decided to be lazy. Arch Linux takes a minimal approach and I think I can allow a few extra megabytes as opposed to some work.

I also said that I wanted to try and compile GLib myself. Well, there doesn't seem to be a official mirror of that library, nor its source-code.
Is it just some open specification with no available standard implementation?

Ubuntu should be a good trade between Debian stable and testing. I mean I've already used it and the only annoying thing was the loads of pre-installed applications. Although that was Kubuntu I don't think that Ubuntu is that different.

New harddrives + Sidux

2x500GB shipped four days ago. And yesterday I build them into my system.

Before that I downloaded the newest Sidux-CD and burned it. After plugging them in, I installed it.
Sidux is a Linux-OS based on Debian Sid. It's basically just a Live CD version of it with some few additional features.

I was quite happy with it. Not much different from Debian Lenny for a normal user like me. Except I could already see that the software was more up-to-date :P

There's a downfall though: Old libraries don't seem to be supported. Well, Debian Sid warned that it is an unstable system, but I thought I'd be fine with it. I don't know if that is permament of or if simply still has to be ported. Two examples being Gtk1.2 and GLib1.2 (part of Gtk basically).
I noticed when I tried to compile some program using Gtk. Using apt-get I downloaded the version 2.0 to see few moments later that it needs version 1.2 and I was a bit surprised not seeing it in the package-list.

After a bit of googling I found out that it's simply not available for Debian Sid, testing or Sidux. I tried downloading the source and compiling it myself, but it depends on GLib1.2. I didn't try downloading and compiling that, but I guess it'll result in another bunch of errors. Maybe I'll try today after having gotten some sleep.

So well, it's either waiting for the support of these old libraries (unlikely), trying to compile it myself (I'll see about that.. and might still switch (see next point)) or getting another distro. As I havn't really done much yet I can still easily change.
I was thinking about some Ubuntu (either that or Xubuntu). Definetly not Debian stable again, as it's just not for people needing up-to-date software but rather for servers or administrators.

I've gone through the list of Debian derviates and found one interesting called Kanotix; but their last update was Janurary last year?!
I guess what I mainly liked about Debian is the Package-manager. Pac-man seems to do about the same job, so I looked up Arch Linux, but I heard from several sources that it's a distro for advanced Linux-users.

Then I found Frugalware. Their website seems down atm, but maybe they're updating their servers or something. I read about it in Wikipedia (here).

Well, so long. Also, I included quite some links in this post, LOL!

Thursday, October 8, 2009

My right foot

Last year - well about 14 or 15 month ago - I had ab accident with my left foot, which caused the ligament to be overbend.
This year I've got about the same thing on my right foot, only that they`re not just overbend, but torn.

That actually happened about 4 weeks ago and I forgot to blog about it (shitty network failing), but anyways, now you know.

I remember it hurting like a bitch and then sitting at the waiting room of the hospital for half an hour since all doctors were sleeping and they had to wake one up first to drive there.

After he looked at it, he wasn't quite sure what it is and gave me a bandage and crutches (lol, I just had to look up the word and the first thing that came into my mind was "crotches"), saying that I shall have a doctor looking at it again in two days.

So yeah, two days later, after shool, I visited a hospital again to let it being looked at. I waited for about half an hour - again :P - and the doctor said, that he'll need another X-ray (already gotten two 2 days ago, but he wanted another angle) as he's also not quite sure.
Waited a bit more, was x-rayed, waited some more, got the picture, waited a very long time (about 3h ffs) and the doctor couldn't tell by that, so he took the left foot, shoved the sole a bit forward, took the right foot, which popped a little at a point - hurt like hell for a second - and he said that my ligaments are torn.

But since my foot was swollen quite heavily I needed to wear a static bandage (I really have no idea how to call it) for a week and place my foot high when possible.

Well, now I have a splint in which I can walk. It was a real bitch getting up stairs without the help of my right foot (in school up to 3 etages at a time! 3.5 times a week! (this week 4 times :/)), but well, I made it. Getting down also wasn't too easy.
My left leg now probably has a better muscle than my right one :P Guess that'll get a bit more equal again at some point. You can't really see it anyways, but it bugs me to know it...

I can walk quite good now. Getting down stairs is still a litte weird, but that might just be that splint, which should prohibid me from moving the foot into certain angles anyways.
I'm looking forward to the 23th of this month, since the doctor said that I should be doing fine without that thing. Well, fine as in still not being able to do sports, but not too dangerous to tear them again relatively easy.

Saturday, October 3, 2009

How do people come up

with creative titles? Sometimes I just know one and use that, or I am simply stumped and write something stupid like just using it as the beginning of the first sentence.

Anyways, I've been watching the Matrix-trilogy while I had no internet. I had a few problems at first, since I could watch other DVDs, but not that movie. Turned out - using my fathers laptop - that movie-DVDs usually use an extra encryption called CSS.
Well, I downloaded the packed and then the problems were gone :D

I've noticed that I've gotten much more critical and demanding from movies.
While when watching them the first time I did spot a few weird things, but didn't care about that. But this time it just felt wrong; why didn't the machienes - as they knew that they'll wake up - put them in another Matrix in which they'd think to be in reality?
And another biggie: they can't reset the Matrix, lol.
Also, if the humans have enough energy to power Zion to have lights and warmth, to fly around with hovercrafts, power computers and these war machienery, why don't the machienes use it? And why don't they just built a floating powerstation to go above the artificial clouds?

But oh well, still a great idea and a neat-o movie.

And another thing I did to waste time while not having Internet is downloading the NCurses-library and a tutorial via my fathers laptop and working a little with it.
I planned on making a rogue-like at first, but I thought Tetris would be easier.

For some reason I don't quite remember I'm coding in standard C90 and so far only used one POSIX-function (nanosleep). Everything else is portable (I'm compiling with -pedandic-errors ffs - and -ansi for that matter (gcc)).
Well, the exception being NCurses ;)

And, well, I ran into a little design-issue concerning rotating pieces. At first I was having a 4x4 color-map inside a tetris-tile.
On creation it would simply take a 4x4-array of a form (I call them L, inverse L, T, S, Z, I and box), represented as 1s and 0s like
0, 1, 0, 0, /*I*/
0, 1, 0, 0,
0, 1, 0, 0,
0, 1, 0, 0
and multiply a random color with each element to store it in the tetris-tile color-array.

While rotating the I can be done with a bunch of xors and the T simply by moving each edge one further, the L and inverse L are more of a problem.
At first I even forgot about S and Z lol. Anyways, it was easy to add them, as - although being hacky to be quite efficient - it is modular.
It kinda bugged me that I'd need a variable indicating the rotation just for L, invL, S and Z and having dumb functions for them to rotate.

So then I though of another approach, which at least is the same for every piece (well... almost):
Having all formes in a const array, at first the non-rotating box, then the two-state I, S and Z and finally L, invL and T with 4 states.
A pointer to a function will take care of rotating correctly then.
Each tile has a color-variable and on rendering both, the color and the form, will be brought together.

My current solution is having a state variable and depending on that reading the array in another way, such as swapping the two indecies or reading from back to front and thus flipping the tile.
Not too sure it'll work correctly, because I didn't code the render-function yet, but I'll see.

If that doesn't work I'll use function-pointers so the tiles themselves decide how to render (these will be called on rendering, so that function renderes them, not the render-function itself).
...I'm not really too well educated about C concepts :S

Since I was working with bit-fields, which means that you decide how many bits to use per variable, it seems fitting to store two tiles in one struct to have 8 bits full.
That's pretty much perfect, since you have one tile you control and a preview to the next tile.

Hacky, therefore efficient. Not really proud about it being hacky, but at least it shows that I make up my mind :P

Also, inline-functions in headers are very wierd in C90 :S

Monday, September 28, 2009

I'm back online

Yeah, I had no internet for two weeks :'(
Well, not completly true: I had my fathers laptop a few times to check my E-Mail and go on the facepunch-forums.
I wasn't on the Steam-forums since my Windows crashed down, but that will change soon[ish]:

I finally copied the stuff I wanna keep from my NTFS-partitions (Windows drives) together into one folder on my Linux-distro.
What brought me to that is some loneliness and looking through some old files, finding an old chatlog from when Snowball: Source was still in development. Good times. And it reminded me that I really should get my ass up about reinstalling Windows.
Now I'm just buying new hard-drives, probably 2x500GB, and then I'll wish for two more on Christmas to RAID them. I'll also take care of my Windows this time (like defragging & updates).

I also thought of maybe getting Windows 7, although some versions are a big piece of shit and pulling even more money out of the customers.
Why the heck do cheaper versions limit my RAM and supported number of CPUs??

This will probably fill the capabilities of my current case, so I'll throw out my current drives.
I thought about maybe updating my whole system in a year or a year and a half; since I also want a new case, new CPU (thus new motherboard and thus new RAM) and a new graphicscard, I'll keep the drives and try to sell the whole computer.

I havn't really looked around much, but the last time I read stuff about CPUs they were 4 cores max (in one home-computer CPU that is), and now Intel bloats out 8 in their Core i7s. That really knocked me of my feet.
I'm estimating that in a year the price will be low enough to be called cheap. Looking forward from jumping from 2 to 8 cores as programs get more and more threaded sub-programs and thus can use multiple cores.

Well then... now to finally sudo apt-get update & upgrade again...

Monday, August 31, 2009

Still Linux

Yep, I haven't gotten around installing Windows as planned.
Thinking about going through all the folders to save stuff, then somehow still partition the drive nicely and having to wait for Windows to install to finally download all the drivers and set the system to a usable state. And then maintaining it >.<

Oh well, eventually I will be bored enough at some point to actually do it.

On the bright side, we now have double the internet-speed we were expecting. Today our phone-contract of the old company expired and I had to install a new box to get them working with the new contract - it was a pretty fast and easy process to set it all up :D

When it was installed I noticed that the connection-information showed that we have the full internet-speed we are paying for (said some stuff about that in my last post) and after testing it turned out to be true.

A week ago, school started again. This year I'll be heading towards my Abitur. I hope I don't screw this up, I kinda have a habit of not learning for tests :S
There are rare examples, such as history for which I sit down about an hour per day (with some minor distractions) - two days before the test.
But I surely will learn more for this! There's no way I could just pass it without doing (close to) anything.

That is about the post-size I am aiming for. I really should just make posts more frequently.
...although I don't get anything from making them. I hope someone finds them interesting :3

Monday, August 24, 2009

End of August already

Well, at least it seems like I'm holding up to my previous 'standard' of at least one post per month.

So, if you read my last post you might think that I'm on Windows. But shortly after I got that working, some system-file was corrupted. Luckily there was some backup I could restore with the Recovery Console.

That file is somehow related to the drivers; I forgot its name. After reinstalling all the drivers I found the mouse still not working, which is weird since it is a standard-conform USB-mouse. I downloaded the driver from the Logitech-site using the Keyboard, installed them, but that didn't make it work. I found out that the USB-bus-drivers (lol, bus-bus; lol, bus-driver) were some standard drivers from Microsoft, so I changed each one manually to the Gigabyte one. Then I even gone through all the other drivers, to make sure all is set correctly, but still the mouse did not work.
My soundcard was not functioning as well.

Because it all worked well in Ubuntu I downloaded Debian, since my Ubuntu-CD didn't have the newest Ubuntu-version and that Distribution is based upon Debian, and installed it. Out came some kind of quite minimal Debian-installation, but I got my way around most 'problems'.

So right now I am using Debian 5.0 (codename Lenny) and as UI I have LXDE through SLiM.

I'm lacking some scripts to automate a bunch of stuff simply because I'm too lazy to look up how to make them - although I know it's easy as I've done it before - but wut evar ^^
I can't seem to get sourround-sound get to work and my seems to not be a symbolic link everytime I restart the system, so if I'm developing some OpenGL-stuff I have to delete and create a symbolic link every time.

I also had a few problems with hibernation, but that work now as well.

I had plans to re-install Windows since quite a while now, but so far I was just too lazy, since I also have to backup my files. Not because I didn't partition right, but because it's heavily fragmentated (thanks Microsoft and NTFS).
It's quite a bummer, since I can't play my fancy games I was playing before, although having Wine. And I can't get through with the Sourcemod-coding to leave that code behind for a bit and develop something non-Source related.

While we're at Source, Dreamball is kinda dead. Danny wanted it out before his Collage starts, and me being on Linux couldn't develop any further, so he'll just take the stuff we have now and put it out there (not through Steam).
I might get back to that and update it a little and apply some fixes if something is not right.

And another thing on the coding-site: Qt. I've discovered it before, when looking for GUI-libraries. Back then I tried GTK+, gtkmm, FLTK2 and wxWidgets. I didn't like Qts licence, but it's under the LGPL now that Nokia purchased it.

I stumbled upon it when searching for hardware-accelerated vector-graphic libraries other than ShivaVG and AmanithVG (or however it's spelled; will correct & add links later). I found Cairo, which I heard of before, but read somewhere that it wasn't really good for games. It seems to be used in many GUIs having custom looks.
In a mailing list, someone was comparing that to Qts vector graphics. And at that point I thought I'll just try it out.

I downloaded the full SDK and was very suprised, because it has its own IDE.
Apart from that I grasped some stuff from the examples provided and thought of making a Viruz-version, since the Flash-version is dead and I wanted to port it to C++ at some point.
I don't have enough experience and knowledge about Qt though. That project will just have to wait.
I have a screen with a nice backhground, a black rectangle at the bottom for the HUD, which should have some information (currently FPS and amount of viruses), but the text-drawing acts wierd, and bouncing balls, being the viruses, so far. (Damn, what a sentence lol)

Well, that'll have to suffice for now. The post it big enough anyways... I really should start to break them down to individual posts, but I don't feel like simply doing that and posting 3 posts at the same time.
Live with it. Or not.

Sunday, July 19, 2009

One nerd, one computer and "no bootable partition"

If you don't like to read much, skip that block down there till the double-space and "tl;dr".

Well, I'm not sure what caused that, but I just stood up and the computer wouldn't boot. After two retries and the message "No bootable partition in table" I figured that it wouldn't fix itself.
I checked the cables to the hard-drives and the IDE configuration list when you start the computer and everything looked right, but it also wasn't some loose cable. That's when I started worrying about my data, especially about the Dreamball-code. Everything else would be a pity, but loosing that code would be really bad.

I dug up a Windows CD, put it in the drive, rebooted the computer to find out that this CD does not provide this option to re-copy the Windows core-files while keeping everything else, including the registry 'n stuff intact.
But I also didn't want to reinstall and setup the whole Windows, since I'm planning to do that once Dreamball is at VALVe for testing and we have faster internets (should be kinda soonish; more about that later).

After lunch I tried my luck on the Windows Recovery Console. I was happy that it recognized C:\Windows so far, but my code is on the second partition (I: for some reason).
Well, I logged into that and ran chkdsk with /P /R (find & repair invalid sectors). It took about 3.5h, by which time I took a shower and read a book about C++ for game programmers, which was kinda annoying because my chair (& table) is not comfortable for reading, leaving the bed in which it also gets uncomfortable after a time plus I already know about 70-80% of the stuff, and after that I just thought that I'd try to access the drive I, which I couldn't view the directories in because it was somehow broken.
So I wanted to run chkdsk on that drive, but it told me that this drive has one or more irreparable damages.
Well, I tried booting windows again, but no luck on that.

By that time I was going to a friend for a movie night. After I came home I started the Recovery Console again and tried my luck with fixmbr and fixboot (note here that I have GRUB since I had been using Xubuntu (Linux) in the past) and then bootcfg, but bootcfg told me that it didn't have enough memory or something.
Rebooting still displayed the error. So I read till I got a bit sleepy and slept.

In the morning I read the book, hopelessly that I'd fix the problem.
After lunch I tidied my cupboard a bit and having found an Ubuntu 7.10 CD I decided to boot that up and listen to some music from my USB stick.
Well, maybe it'll boot normally this time, but nope, it didn't fix itself.
I tried the Recovery Console again, which took me a step further to GRUB, which told me it's having the error 15. I then booted up Linux so that I can look up what that means (was pretty useless) maybe I could even fix the problem or at least recover my data.

The Live-CD told me that it couldn't find a fitting driver & configuration for my display and thus is only available in low-graphics mode. I wanted to at least set a better fitting resolution (because 640x480 or whatever it was looks really shit on a 1680x1050 widescreen LCD), but the test crashed to the console.

Not having used Linux in quite a while I forgot how to open up the GUI again, but I remembered the X server. So I tried xinit and startx, but both told me that there is no confuguration file.
With the man-pages I found out where it should be (it wasn't there) and how to confgure a new one. I did that and was finally able to open a GUI with the command xdm, which I also found while reading the man-pages. But the screen was pretty much empty and as such useless.
In a rather short time I found the command gdm, which did the trick after some flickering. The same dialog as before popped up, so I just selected continue, which led me back the the console again.
After some different display and driver settings, which all didn't work, I found a something at last to do what I want - some flag (I don't remember) in gdm did the trick.

Instead of listening to music I opened the partition manager to find that everything looked pretty much ok. I tried the file manager to mount the drives and at least could access I, but not C.
Well, the Dreamball-code is save.
I checked the man-pages for the mount-command and with help of the internets I figured out again how to use it.

So it told me that it couldn't mount it due to Windows being in hibernation mode. I tried the force-flag, but that didn't work. Then force and read-only, which did the trick. I could access all my data.
So I thought that it has to be fixable then. I just re-booted, but the same error came. Then Recovery Console again, where I used fixmbr and fixboot, but not bootcfg, which finally fixed the problem and here I am on my crappy Windows again. YAAAAAYY!!!!
Please note that I'm referring to my Windows, not to Windows in general, here. I have my reasons to like, but also very much hate Windows - please don't think I'm a bandwagon hater here though. But still, after just this little escapade I miss Linux a little.

I also remember tying the command ntfsfix in Linux, but that didn't help either.

tl;dr: Couldn't boot because of seemingly serious harddrive-error, I was worried about the data, the Windows CD couldn't help, booted Linux, which ran after some complications, fixed the error with no data-loss and I'm back online :)

I said earlier that I'll loose a few words about why I want to reinstall my computer and why I didn't do it now.
Well, my current setup was intended to run for only a month or two, until I can re-download all my old stuff when we get faster internets, which was kind of planned (we have a T1 atm). We didn't do much about that, so I ran my Windows along, downloading all the stuff time-by-time and it worked. Steadier slower, but it worked. Needless to say that I never defragmentated.

The real pain came when my graphiccard broke. I got a new one (nVidia GeForce 9600 GT), that old one didn't like shaders much anyways (as in running very slow) (an ATi X1900 XTX 512) and I'm pretty happy with it.
I didn't remove the ATi driver properly or something and because of that DirectX likes to complain with certain applications, sometimes causing Direct3D no stop functioning and me not being able to change the display-mode until a restart, which takes quite long for my PC, since I didn't take care of my Windows (which Linux does automatically, by the way! And yes I know that Linux is just a kernel and that there might be deviates not doing that, but that's not my point and it doesn't make it invalid).

So yeah, we've at least ordered faster internets. I was hoping for 1024/128 (down/up) kb/s, but the hardware connection (cable 'n shiz) doesn't support more than 384/48 kb/s. So we pay for a 768/96 kb/s (because 256/32 kb/s is too slow and that was the next one), get 384/48 kb/s(, which is still cheaper than right now because of reasons I find to be unneccesary to mention here) and when the cable connection shiz gets updated we'll have even faster internets
Better than out old one (a 128/16 kb/s) :)

I also bought 3 books, one on C++ programming specific for games (not a C++ starter-book..!), one about OpenGL (because lots of the internet tutorials use OpenGL 1.1 stuff with immediate mode, which is not really good in todays graphiccards) and one big (relative) about AI programming.

Yes I know A FRICKIN HUGE POST, but hey, it was a kind of long story :3

Thursday, June 11, 2009

<insert creative title here>

<insert informative blogpost here>

I've tried my hands on VALVes achievements, since I have access to the SteamWorks SDK. I would like to explain the way I've gone so far without e-mailing VALVe, but I didn't write my name under a NDA for nothing.
Let's just say that I wrote some test-code I mostly copied, which didn't work, edited it, got it compiled but didn't work in-game, tried to fix it, still didn't work, added the achievement to Dreamball (not code), still didn't work, thought that I have the solution, crashed, fixed, didn't work although probably closer to the solution and that's where I'm at now. I'll e-mail VALVe I guess.

The new, upcoming C++0x-Standard for C++ (duh!) is looking fukkin sweet so far. For those who don't know, the x there is to be replaced with the year it's going to be released... and guess what number that will be...
You can easily google up the list of changes; I'm so damn amazed. I'll make use of it for sure! For one in a small game-engine I wanna write with a friend and for a math library I wanna write with two of my friends.

gcc is already implementing the changes and publishing them, as an "experimental C++0x mode".

I've also stubled upon D (again). This time I've taken a closer look. It's official website seems like it's trying to bash the hell out of C++. The examples are like
That's the C++-way: <code> It can't do this and that, it looks ugly, it's unefficient under these circumstances.
That's the D-way: <code> It's easy, but could be better. It works like <description>.
That's another D-way: <code> And it's darn good.
Maybe I'm just picking it up the wrong way, but it sounds really assy. The worst thing is, they're right though.

I'm a C++-programmer by heart, but D just looks really promising. It's like a modern C++ - the syntax is quite alike, because it's goal is making a better C++.

The only thing I'd be worried about are the libraries. There are tons for C/C++, but D? I've read something about limited support for C/C++ libraries though.

It's definetly something I should look into when I don't have big projects on my hand. Can't wait to test it :S

Monday, June 1, 2009

Updated design

I updated the design a bit:
bigger post-span
slightly bigger post-font
new post-title color :D

And I want to take a bit more space for my posts themselves, meaning I won't only use single new lines, but also double new lines to format my text for easier readability.

And I also want to loose a small word on Google Wave. Plain awesome; can't wait. Another step in taking over the internets :) In Google I trust.

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

Sunday, April 12, 2009

Hey ya all

Today I'm gonna realize my world domination plan and take over the world!
Maybe not... you'll see..

Happy Easter btw

Thursday, April 2, 2009


Damn! I totally forgot about my blog.

Let's see... Rome.. I'll write something about that before I forget too much.

So yea, in our school the 11th form was offered different field excursions, all taking about a week. We had three options:
Hiking in Spain
Rome, with a guided tour each day telling us about the roman history (mainly)
Skiing in the Alps
I decided for Rome.

It's the first time I was on a plane, I felt a little unsure - but not really afraight. I guess it was just because it was something new for me. The feeling while taking of and when landing is awesome, because your sense of balance is all weird.
So, after... I don't remember ... seven hours or something we arrived at the hotel. I and many of the others didn't eat much till then, so some groups formed and met up on the local McDonalds not far from that hotel. After having eaten a bit, we've gone back to the hotel to just getting used to spend a week there.
I was in a room with four others. One being a friend of mine, another nerd known as Schnitzl, two who were trying to party or something (like drinking alcohol, being together with others talking about shit or something) and one who was either following them (I guess) or resting (at least trying to).

I think I've spend most of my free time with reading a book about maths and doing some excercises of that.
I've also spend some time on coding on paper - horrible! I might work better with a pencil and a rubber than a ballpen, lol.
And I also slept some hours in the afternoon - not particulary because I didn't catch enough sleep in the night (which wasn't too far off what I normally sleep), but rather out of lonelyness. Lonelyness didn't kill me though. Although I think I could have spend my time much better, I usually did something to kill time.

But, speaking of sleeping, we had to get up 8AM every day for breakfast and usually at 9AM we gone somewhere to see and hear stuff about roman history. So, I planned to go to bed at 1AM, because 7h sleep is very well for me. That was not possible though - in our room we had silence at about 3AM or something.
The noice of the others trying to share their thoughts and drinking alcohol wouldn't have been too loud to sleep for me, if not the bed was so different that I have at home.
We had three blankets (rather thin to make up for the number) and the mattress was harder than I'm used to.

I don't wanna make the post too big, so I'll leave you with that so long.

Friday, March 13, 2009

Should make a post

don't have time/delight to do so right now. Rome II is going to follow somewhen for sure though.

I had diarrhea the last two days (and this one), but I guess it's over now :)

Been working on my zcript-engine a little, a bit on Dreamball. btw, check out the the latest Dreamball-news and join the forum :D

On aside: I was at a friends (Ionenbombe) house tuesday. We were doing some stuff outside and his cat was wandering around, when she decided to jump on some wodden bars. Ionenbombe said that he's never seen her get up there and we wondered how she'll get down there if not simply jumping to the ground (was kinda high - not too high for a jump from a cat though).
We waited and observed, but she was like teasing us. My friend said that she'd meow if she needed help. After some time she was finally doing it. She was doing something like a wall-walk down.
Ionenbombe picked her up and pet her a little and wanted to set her down, when she jumped on the stairs and made a weird noise. Wondering what that sound was, Ionenbombe had the idea that she probably landed on her stomach and when you get a hit there you too exhale and create a similar sound; while saying that he was gesturing/demonstating it by hitting me gently in the stomach, but I was completly unawear of that movement which caused me to emit that sound and we laughed.
Funny stuff, but I don't know if it's the same if you read it. I hope so.

Saturday, February 28, 2009


That's where I'm going to go tomorrow. I'll be on a school trip to rome tomorrow, for 6 days.
I've already packed my stuff, but the feeling that I've forgotten something more or less important won't leave me. Guess that's normal though.

Dreamball is progressing, my development could be faster though. I'm gonna be relieved when the new panel for starting games is done lol. Some awesome bunch of news is on its way in about a week or two; if you like, you can follow the development on Twitter.
On a developer site: I've managed to get functions stored in a std::vector pretty neatly - you can write your function and use a makro (in global scope) for adding it to the vector.

I got myself the album Six Degrees of Inner Turbulence by Dream Theater :D It's pretty neat; the second CD is dedicated to one song alone, the so far longest song by Dream Thater (42min.).

I can't think of anything else to write. I made up my mind before and had lots of stuff... now everythings forgotten [d'oh]

Well, hope ya don't miss me :P

Saturday, February 7, 2009

Driving license

I got mine :) Damn, I'm so relieved ^.^
But of course my path of learning isn't over. I drove my mother two town further right away - it worked fine so far ;)

It has been a busy week. Monday I met up with someone to prepare a presentation, tuesday I had school till afternoon and then volleyball training; Wednesday driving lesson and a volleyball match. Thursday I had close to no spare time.. at first (after school) a driving lesson and then right away to paramedical service (kind of.. helping at the blood detonation in the name of the red cross). After that (~11:00PM) I had some time. Friday I had my theoritical driving test (almost screwed it), another driving lesson and then volleyball training. Well, today my practical test and now I actually have spare time :D
Tomorrow is parkour training and then I will also have some hours left till school on monday ;)

Last week, on thursday, I was at a KFC for my first time. It's kinda different than a normal burger indeed, but I think I prefer beef. I didn't try out the famous chicken wings there though.

Stay tuned for Dreamball news, because something big is coming this month!! :D

Sunday, January 25, 2009

And another one!

Already three posts this month. Kinda awesome.
Anyways, I've been doing some coding on Snowball: Source to get particle-effects. I had some problem with them, but I somehow managed to fix them. Dreamball is coming along a little slower right now, but still progressing good. Zat-development was going great!

But I'm thinking of killing this project, with the following reasons:
  You have to know the IP of the person you want to talk to.
  For an username-based system I'd need to run master-servers.
  (Or let the clients do it themselves and maybe build a module to allow servers to exchange lists with each other)
  It's worse than other chats anyways.
What might have been a sweet feature is the scripting-ability, as it already sits in the roots of the chat. But I'll reuse the script-system anyways because I like it when I think about that I've wrote it by myself (with Boost on my side;)). And the UI (=User Interfaces) having its own dll and such easy loadable.

Loosing a word about Boost, it's still really awesome. I've reached my goal, the actual purpose of my Zat-project, anyways - and that is diving deeper into Boost and learn how to do networking. I already did both successfully. Abandonning this (almost) hopeless project will give me more time to focus on more serious things. Like optimizing my script-system and coding for my mods.

When I get some more particle-effects working for Snowball: Source I'll post some screenshots on our devblog.

On a side-note: I think shorter posts, but more frequet posting encurage the reading more. Not that I've been doing that on purpose, but I just noticed that. yay ^.^

Saturday, January 17, 2009

School's back on

and it's holding me back from coding.. Mainly because I fell so discharged when I come home. I think I would actually have enough time for all this stuff, but I'm just not strong enough.
But of course I found some time to code.

I fixed some minor issues with Zat, added a little debugging-feature, made many enhancements to a Source-mod (soon to be revealed), which are not much visual but will pay off for extendability, added a particle-effect for Snowball: Source (took me some time, due to bugs that just kinda disappeared).

For school I've made a real crappy random sentence generator, which is crappy and has a quite smallish (and rather crappy) amount of three word-arrays and just picks some randomly (usually crappy sentence) to output them. It's crap, but it works and we (a friend of mine and me) laughed way too much for it being so crappy. Did I mentoin it's crap?
I'm rewriting it anyways, because it's easy to set up in school, compiles quick and we can laugh again. This version will respect gramatical rules 'n stuff. Will I release it? dunno. Probably not.. but let's see about that later.

To my surprise I started working out a little again. Sure, not much, but at least I'm doing something, right? I can't wait seeing it paying off when doing some sports ^^

I added labels for some of my younger posts and I added the followers-gadget, so if you want you can now follow my blog-updates :D

Thursday, January 1, 2009

Happy New Year!

Looking back at 2008 I wonder how fast the time has passed.
What I achieved.. I can't exactly remember, but it includes opening up a blog and posting something almost every month! The one exception is April, but I made 22 posts in 11 month (I started February, so no posts on January). My friends' blog didn't come along that well.. And considering the number of viewers/reader of my blog, then it probably didn't come along well, too. But whatever.
I bought two books about C++. One reference and "Effective C++" by Scott Meyers. That book it definitely worth reading! It taught me quite some things I've always had questions about.
I bought the Orange Box - definitely worth its money, although I'm not that a big player.
I joined some Source-modding teams, left some, began some personal project and even completed one. That was a Tic-Tac-Toe... let's hope the next project, zat, will be finished or in a close-to-finished state.

Speaking of zat, I made some progress in networking. I thought of completing the main-features first, so I have a somewhat working chat before making this scripting-system. I think transmitting messages already works, but I didn't have a chance to test it over the internet.

And then I turned 18, which means I have more freedom, but also more responsibility.

I was in love for the first time. It came very unexpected, and actually already started in 2007. Disregarding that, it was quite an experience. Something I will never forget. I ended the relationship for the good of both of us.
Being a nerd it really is difficult to actually spare enough time, but somehow I managed it. What was tearing us apart were simply the differences.
We didn't have much to talk about and when we found some interesting discussion she was mad at me for having better arguments. I could help with her problems, she couldn't really help me. Then she was complaining about too little conversation, while I tried to explain her that when we have something to talk about she usually gets mad or she is too tired (she's really sleepy) and so I finally couldn't bear seeing her like this. We probably both felt misunderstood and too left alone from the other side.
We are still friends, but thinking about this time makes me feel alone inside.

Speaking of bad things, I know that I could have done more for school. Much more, but it's a thing probably everybody thinks about and finally doesn't do much more.

As New Year's resolutions I want to be more like a few years ago. Which basically means being more restrained - I became more self-confident than it is good for my mind. I also want to work out more regular, but that probably won't happen.

So, getting to the actual festival itself. As a friend of mine said yesterday, New Year's Eve is overrated. The earth spins around the whole time (he didn't prove that though, although I asked :P). I am with him, but humans tend to simply like parties, as they are fun and you see your friends or even make new ones.
Some (many) people also like to drink to heighten their party-spirit or summin'.
But that's not what a festival is about, is it? You actually shall remember what ever happened this day. Well, in this case you probably shall look back and see, what happened this year and what you have archived and looking to the new year, to think about one's New Year's resolutions. But that isn't really done. Instead you party and talk/sing/whatever with your friends 'n stuff.

But well, I've been writing on this blog-post quite a while (more than half an hour!), and I want to do some other stuff today, so have a fulfilling new year!