2010-07-05

Bioshock crashes - Windows 7

I've recently bought "Bioshock" for 5 bucks on Steam (nice offer!). Sadly, I could not get it to run on Windows 7 Pro x64 when not connected to the internet (?). Anyways, after reading a gazillion blogs on the definite way to solve this, I found my own solution. I did get most of my ideas from here.

Here are my steps:

Now when in steam offline mode, just start the shortcut => bingo! :-)

2009-04-04

LaTeX 4 the world!

A few weeks ago I started checking out LaTeX. TeX has been around since the 80's and is especially useful for creating scientific documents like books or articles. Instead of spending lots of time tweaking design and layout like in common WYSIWYG word processors you focus on a document's content and structure when using LaTeX.

To be able to work with LaTeX on windows you will have to get a distribution first. I recommend Miktex. Like "normal" code, LaTeX can be editied using any common text editor and then compiled with the tools contained in the distribution to generate PDF, DVI or PS files. There are also some extensions to generate other output formats. One should find an IDE to ease the work with LaTeX.

I chose TexnicCenter because it is setup to work fine with Miktex and brings some very powerful functions. I found a very nice tutorial (in German) that contains all you need to know to start working on your thesis with TexnicCenter.

2009-01-09

DI: Unity vs NInject

I stumbled across this interesting IoC-Container benchmark. Now these performance issues are not that relevant, since these values resulted from creating 1 million objects. Since I would like to give DI a shot when it's up to instanciating scene objects - like having the container create an object of the type 'Soldier' and injecting references to graphics or physics systems - I was mainly interested in the performance results for 'transient' mode (which means each call creates a new instance, as opposed to 'singleton' mode).

In particular two containers stand out in the transient benchmark: Microsofts Unity and Autofac. Now Autofac has impressing values. But since it is new to me and I therefore cannot really guess how stable and well documented it is, I decided to switch to second placed Unity. Microsoft does stand for a certain degree of quality (believe it or not), so this is more or less an intuitive decision. Coming from NInject (which is by the way excellent), I hope this will help me tickle out some more frames compared to creating scene objects with NInject or anything else.

It was no problem to exchange the NInject usage with Unity, and Unity does offer some neat options compared to NInject, like the possibility of establishing a container hierarchy, meaning containers having child-containers and so on. What also seems cool is the ability to build up and tear down objects by passing them through the container and that way having the container inject all it's dependencies - without having to actually bind said object in the container.

2008-11-28

Multi-core game engine

I stumbled upon an interesting article at Gamasutra concerning the design of game engines so that the calculations during each frame can be spread over multiple cpu cores,  as those can be found everywhere nowadays. Another article, this time by Intel, describes how such an engine could be designed with much detail.

It is an important issue for game engines and I will be evaluating how multi-core support could be supported by our engine.

2008-11-17

High precision timer

I've been working on implementing a high precision timer for the game engine. First I have been using DateTime.Now to geht the current ticks. Turns out that DateTime.Now (which is basically the same as Environment.TickCount) only has 16 ms precision. This would not matter on a scale of seconds, but it makes a huge difference inside the game loop which runs very many times a second.

After googling for a while I stumbled accross the windows method "QueryPerformanceCounter" in kernel32.dll. This gives me the most precise clock count windows has to offer in ticks. Using the related method "QueryPerormanceFrequency" gives me the amount of ticks the current cpu runs per second. QueryPerformanceCounter is accurate up to 1 microsecond (1/1.000.000th of a second).

Since QueryPerformanceCounter is windows dependant (and even there it is not guaranteed to be supported), I still implemented a fallback to Environment.TickCount for use under Mono. Here, TickCount is said to be implemented much more accurate than under dotnet, so it will be adequate for other platforms.

MSDN: Time Managed Code Using QueryPerformanceCounter and QueryPerformanceFrequency