getting ill? and working hard …

damn, currently i’m feeling a little bit ill … but i must not get ill now! there’s so much work to do. currently i’m working on the resource management in our game, sounds easy but it’s one of the most challenging things i’ve ever worked on, but let me explain the problem a little bit more detailed.

First something general, how the game architecture is constructed (every point listed is a single thread):

  1. Rendering
  2. Network Communication Incoming
  3. Network Communication Outgoing
  4. Resource Loading

So far nothing complicated, but now the fun starts:

Further our game consists out of thousands unique textures which are generated just in time as you walk through the world. You now may say that we should pre-render the world and then load the textures from disk, but that’s not that easy … here a realistic example:

  1. the world is a quad 200 x 200 tiles = 40000 tiles per map
  2. the half of all tiles are unique which we would have to pre render = 20000 unique tiles
  3. let’s store them as TGA files because there’s no compression and thus they’re fast to load = 64kb * 20000 tiles = 1250 mb
  4. wow! 1250 mb of data which needs to be pre - rendered on the client, that’s way too much

Therefore we do this just in time! But that’s not the only problem, the textures are generated in the resource management thread which is running on demand as the render thread requests new textures. so when the resource management thread awakes it pre renders the textures and this can be sometimes a time consuming task, this makes our game stuttering on slow single core computers.

But the problem isn’t that easy to solve due to the nature of java (preemptive multitasking) you can’t assign a thread a specific time which he is allowed to execute a task, so the magic word for today is: CACHING!
there are mutliple ways of caching:

  1. hit based caching
  2. time based caching
  3. cost based caching
  4. and many more …

after a little bit of brainstorming with some workingmates we decided to combine some of the caching tactics, thus we have now a time & cost based caching which stores unrendered textures asyncronous onto the harddisk according to their costs of how long it took to render them and how long they havn’t been displayed on the screen. and it worked out to be a very nice solution to our problem - we just need to pre render a small amount of textures on the beginning and then we can pre render ahead of time when the player moves through the world.

so that’s enough for now, but there is still much optimizing to do … so let’s hope i’ll not get really ill …

one man two guitars

this guy really impressed me … watch it! now!

remanufacturing …

wow, it has been quite a long time since my last blogging activities, to be exactly i havn’t blogged since february 2006. well i was in some kind of hibernation-mode with all the bloggin stuff due-to the fact that a lot of things happened in my life, there have been a lot of good things coming along as well as some which where not so good. Now everything is sorted out and running smoothly in the right direction i decided to start blogging again, as you can see there is also a new design which is nearly as minimalistic as the previous one, moreover there has been a big change in the backend i switched from the very sexy and beloved cuntilla to wordpress which is now powering bluthaupt.

now let’s switch back to the things which happened during the time i havn’t been blogging. i will just mention the good things which happened to me, in my opinion you should never look back at the bad things which happened to you. the first good thing which happened was that i’ve moved to vienna into a really nice flat, i really enjoy it to live here mostly because a lot of friends of mine live in vienna too.

the next good thing which happened was that i’ve got a really fantasic job at a game development company named avaloop. i enjoy every day working there, sometimes the tasks can be quite challenging which is good because the work never gets boring. besides of that i am really thankful for having the best workmates and chiefs you can ever ask for, our team matches perfectly which is an additional motivation for working in this company. i really love this job …

that’s enough for now, now it’s time to go to sleep, i have to go to work tomorrow …