When technology becomes the enemy

Published June 26, 2004
Advertisement
Disillusioned with the 3D graphics rat-race, yet still feeling the need to produce some code relevant to game development, I set out recently with the aim of creating some basic artificial intelligence proofs of concept to illustrate some simple ways in which clever algorithms could make games better. The first was finished in a day, and was a simple example of how a genetic algorithm could be used by a computer-controlled opponent to decide where to place air-strikes for maximum effect. (Download and further details at the top of my web page.) The second was to be an example of how a pseudo-random number generator could be twisted into being a procedural content-generator, by creating up to 4 billion RPG characters on demand based on a seed value, using absolutely no storage.

This too should have been simple and I expected it to be completed in a day. However, my treacherous tools turned upon me. As you can see in this thread, my preferred compiler (well, on Windows at least) and the near-standard Boost library don't seem to agree on a certain piece of code and this brought my work to a halt.

Now, the fact is, I could have rewritten the code in seconds to get it to work. I could even have used the modulus method on the standard random number generator and the slight bias would have been unimportant in this project. But I like to do things the right way, and learn in the process. So I posted here, to see if it was just me or if it was the compiler/library. I searched the web to see if anyone else had the same problem. (Doesn't appear they have.) I browsed the library source to see if there was some sort of configuration option I'd missed. I downloaded and installed the latest compiler service pack in case it was addressed in an update. I got as far as finally considering upgrading my compiler to the Visual C++ Toolkit 2003 or the latest version of Dev C++/MinGW in the hope of getting this one line of code to work.

Was this the high level, software engineering equivalent of the people who worry about optimising x++ vs. ++x, or about whether to use std::deque or std::vector on a collection of 10 objects? I don't like to admit it, but maybe it is. I was getting stuck on a tiny and unimportant detail; whereas it is performance for them, it's standards-compliance for me.

I allowed a trivial hindrance to turn into a project-delaying issue, and I'd like to think I've now recognised the futility of that. None of these compilers, development tools, or libraries are perfect, just as no significant piece of code is perfect, so there comes a point where you just have to accept the limitations of whatever technology you're using and code around them.
Next Entry Following procedure
0 likes 1 comments

Comments

evolutional
Quote:
I allowed a trivial hindrance to turn into a project-delaying issue, and I'd like to think I've now recognised the futility of that. None of these compilers, development tools, or libraries are perfect, just as no significant piece of code is perfect, so there comes a point where you just have to accept the limitations of whatever technology you're using and code around them.


I can't empathise more with this statement. All too often I've tried to reinvent the wheel or come unstuck because of trivial things wrong in libraries "I don't like the interface", "It's not working how I want" - only to realise that the time I spent whining about things not being the way I wanted could have been spent better finding a workaround to the problem.

I wish you luck with finding your workaround. As you say, nothing is perfect, if it was we wouldn't need any more programmers.
June 30, 2004 01:34 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement