Nuts and Bolts

I’d also like for this blog to be a place to discuss programming.  I’ve been doing it for over 30 years (yikes) and I’m still learning how to do it right.  My previous project was well over two million lines of code in about a dozen different languages at last count.  The bulk of it was C and C++.  I have an extreme love/hate relationship with C++, as I think nearly every C++ programmer probably does.  Some things about it are powerful and useful.  Other things are just unnecessary and often even counterproductive.

Love it or hate it, Ladon will be written in C++.  It is still considered by most to be the “language of games,” as far as I can tell.  It isn’t interpreted, garbage collected, or “just-in-time” compiled, like most more modern languages.  It’s still compiled directly to native machine code.  I think a lot of people expected to be using Terahertz processors by now, so that the difference between interpreted and compiled code wouldn’t even be noticeable.  Somewhere around ten years ago, we hit a wall as far as raw clock speed.  Intel and AMD (and now even graphics processor makers) continue cramming more transistors into each chip, but the clock speed hasn’t moved past about 3 to 4 GHz in a decade.  Now, we get more and more cores.  That’s an important trend to watch if you’re a coder.  It means that if you really want to push your game’s performance, you can’t just be good at writing clever, efficient algorithms.  You also need to know how to write effective concurrent code, i.e., multi-threaded code.

Modern games do so much these days that there’s plenty of work to go around.  The graphics can go in one thread, the AI in another, physics in another, sound in another, and so on.  It makes me nostalgic for the days when writing a game looked like this:


Ladon is currently using Irrlicht as its engine.  That may or may not change as work goes on.  It has been through several engines already — first was Irrlicht, then Ogre3D, then Unity, and now back to Irrlicht.  The great thing about Irrlicht is that it is extremely lightweight.  It’s also fully open source and free.  So, in the early stages of development, Irrlicht is a nice way to go, because it really doesn’t force anything on you.  The downside is that it is fairly minimal in terms of what it can do.  You’ll end up writing your own code to do things that are built into other modern engines.  I guess some people might not call that a “downside” at all, though…

Leave a Reply

Your email address will not be published.