Apr 12, 2012

Why you should reinvent the wheel

Below, I will talk about game development specifically, but I think this can be applied to any type of development.

The main theme I want to concentrate on is: if you personally experienced problems which some "wheel" solves, then you will use it better and with more satisfaction.

Consider arrays for example. Do you remember very first time you really understand concept of arrays? Usually this is very close to the beginning of language study. But despite that, usefulness of arrays is immediately obvious. You dont need tens of variables to store multiple values, and of course cycle processing of this values is much easier, to say the least.

Now remember user defined functions. They also come early, but not so early as arrays. Functions benefits is not so obvious until your programs go beyond some 100 lines.

And then, pointers. Double linked-lists. Queue. Stack. All of that strange useless magic. Then classes arrived and OOP with that strange inheritance thing. Why do you need to block access to a structure field? Some of us were forced to all this stuff at university or college. But as time goes you begin to understand why all this exist.

There is, however, a different side of this. Many starting game developers, as I can see, for example, at gamedev.stackexchange.com tend to use heavily some rather complex frameworks for games. The problem is that unless you will create game without usage of some frameworks, unless you didn't try to solve problems which arise with you own hands, you can't quite understand even basic logic that stands behind framework, and can't use it effectively.

You don't use classes from the start. You don't use pointers and complex data structures from the start. Not even functions. You use variables and arrays. Then your code grows, you understand concept of a function. And so on, you use more advanced features, then you face problem and understand how that feature helps to solve it. Before that time, your usage of it would be wrong and unefficient. Similarly enough you don't start game development by creating WoW clone, you are making Tetris clone.

Of course there are exceptions. You don't write XNA youself. You don't write standard C library. But this are well built, long time tested, basic functionality tools from a major brand. They can be considered a part of a language. You don't write image manipulation library, it's not the core kwnoledge that drives your game. But you write your game editor, your game core and physics engine. Even if you fail, your experience will be invaluable.

Apr 5, 2012

A set of XNA tutorinals beginner shouldn't miss

This article data (and much more) can now be found here. I find that blogger platform was not suited well for managing of this kind of list.

You may also find useful:
- XNA tools 2D game developer should not miss
- XNA articles beginner should not miss

Apr 2, 2012

Conjurer: Reloaded

The Conjurer project which was my little playground for something related to game development, but which ultimately become a failure, will now hold something quite more useful. It will be my personal XNA Framework utilities library. For now it contains a KeyboardManager class which helps to manage keyboard input handling.

As you can expect, main user of this project will be (and is) Digger.NET project.

Brian Fargo interviews

Brian Fargo interviews concerning mostly Wasteland 2 funding, development and much more. Very interesting read for any game developer and gamer.

Mar 30, 2012

Errors on GAC operations

If on any GAC operation you receive gacutil.exe errors similar to this:

Failure adding assembly to the cache: Access denied. You might not have administrative credentials to perform this task. Contact your system administrator for assistance.

but, on contrary to the message, you have administrator rights then problem is, almost certanly in enabled UAC. Either use "Run as Administrator" or just disable damn UAC.

Digger.NET in development, part 3

Well, project progress is good (considering how little free time I spend on it). I must admit that XNA is very convenient framework to work with, so some glory goes there. By now I've converted all graphics, and project Digger.Convert can be treated as accomplished.

Now I've switched to actual DiggerGame project. As I previously mentioned first part would be implementing ultra-simple text editor using game's bitmap font. As of now, I partially succeeded in that, it was somethat simplier then I thought. Oddly enough such simple procedure as reading text input in XNA can become very complicated. Nonetheless, here it comes, first screen of a my very first, big expectations XNA app:














The screen size is original 320x200 resolution. I've decided to work initially with it, and add scaling later (yet not decided how to do it right). It types all pressed keys in one row. That's all. It doesn't correctly process keys other then letters. But I'm excited like I've written some good game. That's what I like about programmig. Game programming excites even more, because you basically see the result of your work.

Mar 27, 2012

A way to fix freezing WMI

Problem symptoms (as on my Windows Server 2008 R2 Standard x64), after reboot you have following problems:
  1. WMI functions are unacessible. For example, if you try to start "SQL Server Configuration Manager" (which uses WMI internally) it will fail to lauch with error. Other programs just won't start or freeze indefinetely;
  2. svchost.exe process which hosts "Windows Management Instrumentation" service (Winmgmt) will use 100% of single CPU core time;
  3. HDD led will glow constantly;
  4. If you wait for some time (some hours) all previous symptoms disapper and everything functions normally until next reboot.
My solution was to:
  1. Load into "Safe mode";
  2. Kill svchost.exe in question via Task Manager, and then quickly;
  3. Delete "%systemroot%\System32\wbem\Repository" folder;
  4. Reboot.
Again you need to perform steps 2 and 3 quickly, since Windows will restart "Winmgmt" service shortly after it was killed, and running "Winmgmt" blocks deletion of this folder.

After this procedure Windows will recreate this folder and symptoms described above will stop. I think this folder is some kind of cache, which becomes either corrupted (more likely) or very large and WMI service enters some kind of almost infinite loop on booting then processing this folder data. As an interesting fact "Repository" folder which I deleted on my system was 559Mb, while recreted folder is 22Mb which is 25 times difference.