So youíre into games, eh? Youíve chosen to forgo social interaction, exercise,
and sunlight to live in a virtual world where you have saved 12 million gold,
have conquered the entire American continent, and hold the trophies for too
many fighting tournaments to count. Youíd much rather plant a few more SimBushes
than do actual yard work. Youíve spent 1237 hours behind the wheel of a Cessna,
but have yet to attend a single flight class. You, my friend, are a gamer,
and youíve come to the right place.
I was at a bit of a loss as for what to write about this month. We all know
the old adage Ė you canít please everyone. I could write a tutorial on getting
a window up and running in DirectX, or I could write a review of a game Iíve
recently played, and half of you would be upset either way. So I thought
Iíd compromise. The first half of this article is going to be a set of resources
for those of you interested in getting up into your elbows in code Ė that
small segment of the population who would much rather spend their nights
writing that slick terrain-generation algorithm than sleep. And the latter
half Iím going to devote to resources for those of you who want the hard
product Ė you just want to beat Bowser as quickly as possible, and you donít
care why it happens. This will largely be the format youíll see from me Ė half
technical, half superficial. Expect a new tutorial each month, and a new
review of a game or technology that piques the interest of the masses. No
hard format, just games (or something like them). So letís get started.
Tech Corner Ė All the Resources you could Never Want
Letís get one thing out of the way, first Ė Google. It is the beginning
and end of every self-taught gamer. If you donít grasp a concept, or if youíve
been hunting for the same bug for the past hundred hours, thereís a good
chance that youíre not the first to encounter similar difficulties. But since
this is a primarily technical magazine, Iím sure most of you already know
that Ė so Iíll take down the billboard.
The web is a fantastic resource for those of you wanting to learn games.
Iíll be covering a new set of topics every month, with the goal being to
provide the uneducated with the tools to create a better game every month.
You, the reader, will judge whether or not that goal is met. But for now,
if youíre a little too eager to get going, there are a slew of websites devoted
to the training of new game programmers. Note Ė most of these will not cover
programming language basics. You can pretty much write a game in any computer
language, but first you have to learn a language. Donít worry, the days of
hacking the video card with ASM to squeeze that last ounce of color out are
pretty close to gone Ė at least, I wonít be covering them (yet). Iím going
to do most of my work in C++, because bitblt in VisualBasic can be very annoying
(not to mention that VB is typically too poorly optimized for efficient game
programming), and I donít know java well enough yet (still taking classes)
to do more than put a few buttons in a swing frame. Additionally, I come
from an OpenGL background, but fear not! In an effort to demonstrate how
flexibility is the life or death of the game programmer, I will do my best
to provide DirectX code equivalents for all of my OpenGL code. Iíll be more
or less learning parts of the DirectX API as I go along, so you may have to bear with me in a few places.
The only things a game programmer needs are a text editor and a compiler.
Whether it is a Pico-like editor and GCC or a full-blown IDE, you canít do
much of anything without something to translate the code into an executable.
There are plenty of decent compilers out there, but most of them arenít cheap.
If you arenít a lucky student (like me) who can get Visual Studio.NET
for free from school (Donít worry MVPs Ė itís the MSDNAA, not piracy), youíll
probably want to opt for a freeware version. Some of the more prominent ones,
and where they can be found, are:
- MinGW Studio for Windows Ė http://www.parinya.ca/ -
A free IDE based off of MinGW (Minimalist GNU for Windows) Ė has much of
the look and feel of Visual Studio, without all the costs
- DJGPP - http://www.delorie.com/djgpp/ -
for those of you out there who firmly believe that GUIs ruin productivity,
this freeware compiler is for you.
- Cygwin Ė http://www.cygwin.com/ -
Not really a compiler, but it comes with several compiler packages. This
program more or less emulates a Unix terminal on a Windows machine, giving
you all the joys of VI and GCC without the pain of reformatting and partitioning
Youíll also need some SDKs to get started programming in various graphics.
The core of OpenGL is included in most modern video cards, but can be found
if youíve got nothing better to do. Aside from that, youíll need:
- GLUT - http://www.xmission.com/~nate/glut.html -
The GL Utility Toolkit. This library makes things like creating a window
and drawing certain 3D shapes a snap. Free for download, licensed under
- SDL Ė http://www.libsdl.org - another interface
library for OpenGL, this one gives you a bit more flexibility than GLUT,
but is also still under development (thus maybe a little buggy), and can
be a bit confusing to set up at times
- Microsoftís DirectX SDK Ė http://www.microsoft.com/ -
The DirectX SDK is available for free download from Microsoft.com, just
check out their downloads section, select DirectX as the Product/Technology,
and find the DirectX 9.0 SDK with 9.0b runtime (note that this number changes
roughly once a year as updates are made to the DirectX SDK)
Probably the last thing youíll need is a good reference on each of these
graphics APIs. For OpenGL I recommend The OpenGL Programming Guide, Third
Edition, known as the OpenGL ďred bookĒ, and any books on 3D graphics
programming you think you may need. For DirectX, Andrť LaMothe has a pretty
good book in Tricks of the Windows Game Programming Gurus, which covers
much of the set up and use of DirectX, as well as what little MFC programming youíll need to get your
window up and running.
Finally, there are literally hundreds of tutorials available on various
websites around the net. The ones I tend to surf are:
Tune in next month when I cover the basics of setting up the window, the
game loop, and drawing to the screen. If youíre that special brand of coder
who just canít wait a month (YOU know who you are :-P ) I highly recommend
you check out the above sites and work through some of the tutorials.
Game Corner Ė Cheat Codes, Walk-Throughs, and the Latest in Railroad Management
Letís face it - games are HARD! Getting your city to attract and hold 1
million residents takes a lot of work, and forcing your way through Max Payne
for the first time can be one of the greatest annoyances known to the world.
Itís inevitable Ė you canít do it on your own. You need help. And here are
a couple of places to find it.
- http://www.cheatcc.com - All the cheat
codes you could want for a large portion of computer games. It can be kind
of an annoying array of banners and pop-ups, but itís got it where it counts
- http://www.gamefaqs.com - walk-throughs
and FAQs for a large number of games. If youíve played it, they probably
host a strategy guide for it
These sites helped me through many games, from GTA to Final Fantasy Tactics. All it takes
is finding the right FAQ.
In the meantime, if youíre looking for a game to use these codes on, I must
recommend Railroad Tycoon 3. Now I have to admit, Iíve always been a fan
of the series, but donít let that sway your opinion. This game is visually
beautiful, and mentally challenging. It implements a full 3D world, with
a surprising amount of freedom in the use of the in-game camera. It has all
the perks of the economy from the previous game, with some new enhancements.
Suppliers will now use multiple routes to get their products to your train
line, if you provide decent enough service.
The campaign mode covers all aspects of railroad management through a series
of missions set in various historical periods. The provided scenarios also
provide a decent number of ways to waste time, and the included scenario
editor allows you to create your own scenarios if those provided are too
The music is more of the same Ė lazy blues and adaptations of folk songs,
with a mood that fits the game very well. The sounds are nothing special,
though in some places they are used extremely well (the peal of thunder in
a rainstorm can still make me jump sometimes).
The only problems Iíve encountered are the standard in todayís quick-to-market
style of game programming Ė random crashes to desktop, and a rather steep learning curve (though the tutorials
are well done). Overall, the game provides an excellent way to escape from
the annoyances of real life, and is well worth the falling price.
And that wraps it up for this month. Tune in next month for the wonders
of window creation, and the latest in obscure games Ė same bat time, same