Thursday, October 16, 2008

How To Set Up Your Windows PC for OpenGL Programming

These instructions will walk you through the process of setting up a programming environment for creation of 3D programs using OpenGL. In this case, we will be using Microsoft Visual C++ 2008 Express Edition running on a Windows XP system.



Instructions

  1. Download the Microsoft Visual C++ 2008 installer at http://www.microsoft.com/express/download/#webInstall
  2. Run the installer and follow the instructions included. (You do not need to install the optional SQL Server 2008 Express).
  3. Download the OpenGL utility toolkit from http://www.xmission.com/~nate/glut.html
  4. Extract files from the glut-#.#.#-bin.zip file to a folder on your desktop. (If you do not have an archiver, 7-zip is a good free software package for creating and unzipping archives.)
  5. Move the file glut.dll into the directory C:/WINDOWS/system32/
  6. Move the file glut.h into the include directory for Visual Studio 2008. C:/Program Files/Microsoft Visual Studio/VC/include/GL/. (You may need to create the GL folder).
  7. Move the file glut.lib into the lib directory for Visual Studio 2008. C:/Program Files/Microsoft Visual Studio/VC/lib/.
  8. In your source code, include glut.h with the preprocessor code: #include "glut.h"


Troubleshooting

If you receive linker errors during compilation, take the following steps:

  1. Add glut.lib to your additional dependencies. Navigate the menus as follows: Project->Properties->Configuration Properties->Linker->Input.
  2. Enter the text glut.lib into the line labeled "Additional Dependencies."

  3. Add glut.h to your additional include directories. Navigate the menus as follows: Project->Properties->Configuration Properties->Linker->Input.
  4. Click the ellipses button on the right hand side of the text field labeled "Additional Include Directories" and locate the glut.h file you downloaded in steps 3 and 4 of setup.

Wednesday, October 8, 2008

SmartDraw

For my technical writing class I'm demonstrating how a data flow chart can be helpful in video game design/programming. I've found a very convenient tool for generating flow charts that look neat and are easily rearrangeable. SmartDraw lets you arrange the data stores, processes, and external sources on a page without cluttering up your chart with criss-crossing lines. This chart here is one possible approach I've considered for how to handle the artificial intelligence in a real-time strategy game I am trying to program (not very successfully, although way back in high school I did manage to get a simple 2D version of this game working, sans AI, with the help of my classmates in a programming/3D design class).


Thursday, October 2, 2008

Starting Anew

Since I've taken a few years off from any serious attempt at game programming, or anything involving 3D Graphics, I'm trying to pick it up again mostly from scratch (maybe this time I'll learn the right way to do it). I remember looking over the NeHe tutorials on OpenGL programming a while ago, they seem like a really good way to get started in 3D graphics. When I started trying to learn DirectX, I had a hard time finding a good tutorial website, but I think this one fits the bill pretty well. As I dive back into the world of 3D game programming, I'm going to keep updating with screenshots from my latest lessons here.

Wednesday, October 1, 2008

Game Programming

The word "game" makes people think of something that is fun and easy, something you don't really have to put any effort into, something you can just do to relax. When coupled with the word "programming," however, things become a whole different story.

I said in my welcome post that I've been scripting and programming since 2003, which is something of a lie, since during the last year and a half I haven't done much of either in my free time, since all my programming effort has been focused on school.

This semester, though, I am taking a Software Engineering class that provides a perfect excuse to break out an old project and make myself finish it. This will be my third attempt to break into the world of 3D graphics programming, complete with all the vector algebra and matrix transformations that 3D visualization is based on.

For this try, I've decided to go back to OpenGL, after having a pretty pleasant experience with DirectX, but running into a few too many derisive comments from hip UNIX users. (In case you were wondering, yes, Microsoft is the devil.) Both libraries seem fairly intuitive, so it's really not an issue.

Escape from the Underdark

One of the main reasons many gamers play games is to indulge in escapism, and I've found no better escape than Escape from the Underdark, at least where video games are concerned.

This server for Neverwinter Nights is a mass story-telling project with hundreds of new features scripted in to breathe new life into an aging game. While most online games focus on the violent dispatch of hundreds of goblins, dragons, and fellow players, this server pushes all that off to the side a little to focus more on story. A team of moderators introduces the "hooks" for various plots (often woven together by virtue of a few key characters shared), and players jump into the mix with characters of their own creation, sometimes made specifically for a plot, but more often just along for the ride as the various stories come and go. This is a game that really appeals to the storyteller in me as much as the gamer.

You can play ...






... a dastardly anti-hero ...











... a dejected poet ...











... the cowardly little cohort ...








... or anything else you want. Characters controlled by players on this server have risen to the lofty heights of lordship, sunk into the depravity of a vile mad scientist, built up merchant empires, torn down totalitarian establishments, and so forth down the list. This is about as immersive as gaming gets.

Neverwinter Nights

In 2001, Bioware released a game called Neverwinter Nights. The game itself offered decent gameplay and a fairly shoddy RPG storyline, which was enough to separate it from the majority of RPGs that year since most of them had poor gameplay and fairly shoddy RPG storylines. (For those unaware, RPG stands for role-playing game, which I think is a misnomer since most of them consist of you playing the role of somebody who kills lots of random monsters without much incentive for doing so.)





What really has separated Neverwinter Nights from the other games of its kind is that the developers made the smart decision of releasing the module design toolset with the game, complete with a versatile scripting language that lets customers create just about any effect you can imagine in what amounts to a 2D field of motion rendered in three dimensions. It's basically a budding game designer's dream, being able to manipulate the workings of a full commercial game.

With relative ease, just about anybody can use the Bioware Aurora toolset and jump into the role of a commercial game designer and scripter.

Welcome!

You can call this the obligatory welcome and explanation post. This blog was born as a project for my technical writing class, but I actually am interested in the content I'm going to post here. I've been playing video games since my parents got an NES back in 1991, and I've been programming and scripting for them since 2003, and that's mostly what this blog will focus on. Posts may drift off into the territory of discussion on films and books I like, so consider that a warning if you're allergic to posts that don't contain beautifully outdated screenshots.