Rudy Rucker's
Software Engineering and Computer Games

Download Page

Click here to Download a PDF file of the complete textbook, online as of July 28, 2011. (26 Megabytes.)

Click here to Download the Pop Software Framework

Software Engineering and Computer Games is to be used with the Pop framework software. The Pop framework supports 3D graphics with OpenGL as well as 2D graphics with standard Windows graphics calls. The book was written to match the Pop 27_1, August 24, 2002 release build, but you would do better to use the improved newer builds, such as 33.1.

The *.zip downlaod includes the release executable, a current help file, and buildable source code (~1 Meg in all). You may need to get WinZip to unzip it.

The executable can be built from the Pop source code if you have  
Microsoft Visual Studio.NET 2003 with Visual C++, OR
Microsoft Visual Studio.NET with Visual C++, Version 7.0,
OR with the older
Microsoft Visual Studio with Visual C++, Version 6.

The compilers work equally well for this package.

Once you unzip the source, use Windows Explorer to navigate to the new pop directory that was created by the unzip.  For Visual Studio.NET double-click on the solution file pop.sln. For Visual Studio, Version 6.0, double-click the workspace file pop.dsw. Once this starts Visual C++,  press F5 to build and run the Debug version of the application.

If you get a build error with the phrase "unresolved external symbol _HtmlHelpA" you can fix this by
(a) commenting in this line that appears near the head of mainfrm.cpp
or (b) you can read section 21.5 "Help Without Tears" of Software Engineering and Computer Games for information about how to get HtmlHelp working in your development environment.

Build Log (From most recent to oldest):

In the course of teaching classes using the Pop framework, Rucker revises the build from time to time, adding new features requested by student teams and then fixing the bugs that the new features introduce. You can always download the latest of these enhanced builds. Be warned that, unless described as stable, these builds have beta status, meaning that they haven't yet been thoroughly tested.

As of Spring, 2004, Rucker has retired from teaching, so there new versions of the Pop build are likely to be rare in the future. Version 26_3 seems quite stable at this point.

NOTE: The built-in Windows XP unzip utility has a bug/feature which may prevent it from unzipping my zip files, which are made using WinZip. If you are running Windows XP, after you download the *.zip file, the XP unzipper may tell you that there are no files in the *.zip file. It's mistaken! In this case, may need to get hold of WinZip. [This XP behavior can occur (a) when the temporary internet files folder
is full or (b) when an anti virus product is involved --- if the scan of the archive is not yet completed when the browser passes the file to WinZip, the result is a blank WinZip window. You may need to reconfigure or temporarily disable your anti virus software to avoid the behavior.]

Pop 36_3, April 27, 2004. Stable. Fixed a problem with building the DirectSound version on machines whoese environment path variable doesn't include the DirectX SDK directories needed for DirectSound. Edited the DirectSound Readme.txt file. Please read the "DirectSound Readme.txt" file in my build directory if you plan to make a DirectSound build. And remember to choose Rebuild All when switching between normal builds and DirectSound builds.

Pop 36_2, April 15, 2004. Fixed a bug where when you split the windows in Racer and Monster Hallway, the 2D view didn't look good. Added a DirectSound Readme.txt file.

Pop 36_1, April 6, 2004. Fixed a bug where the binormal flips sometimes. Leo Lee added support for DirectSound and DirectMusic, with new project files for Visual Studio 6.0 and .NET. In order to make DirectSound builds, you need to get the DirectX download with SDK (free from Microsoft). On some machines you'll need to change two occurances of "DWORD_PTR" to "DWORD*" in the DirectX dsound.h file. Haven't extensively tested the new build, but should be fine.

Pop 35_2, March 4, 2004. Fixed a last bug in the Ctrl+F for fullscreen. Removed most of the MDI features. Finally rewrote the pop.hlp and pop.chm help files.

Pop 35_1, March 3, 2004. Most of the outstanding bugs have been fixed, and color works for Quake sprites. Still haven't fixed 2ViewSlowdown bug. Ctrl+F for fullscreen is working great.

Pop 34_4, March 3, 2004. Alvin Cho found a great trick on the web for showing the game in full screen (no caption bar, toolbar, menubar, status bar). You toggle on and off with Ctrl+F. It works by actually making the window bigger than the screen and then sliding it so that only the client area shows! I also put a randomWallPaperID method into cGame to clean up the ugly wallpaper stuff I had in cGameRacer. I have been trying to clean and simplify popview.cpp, I hope I haven't broken anything. I have found one heretofore unnoticed bug (call it 2ViewSlowdown) that I don't yet know how to fix: when you start up press Alt+W, V, Alt+V, 3, Ctrl+F4, and the spacewar window will be running half as fast. You can speed it back up with Alt+V, 3, Alt+V, 2. I still need to rewrite the help file, also I think I still haven't put GL_MODULATE in for the texture mode when drawing cSpriteQuake textures. This had a lot of new bugs in it.

Pop 34_3, Feb 22, 2004. Stable. I fixed the cCritterWall::collide and the cRealBox::reflect and cRealBox surface-point-finding method so that now the wall/critter collisions are working better. I also commented out the LIMITCOLLLISIONSPERUPDATE switch in collider.h, so we again can have multiple collisions. The lack of multiple collisions was breaking the airhockey game, as if a player were touching a goal, the goal wouldn't collide with the puck. I removed the multiple game document window option, also the File save and load option.

Pop 34_2, Feb 20, 2004. My CS 240 students went over the program and found a variety of bugs, and now I have fixed a lot of them. I improved the graphicsopengl.cpp code and it runs a little faster. I also found out how to use OpenGL 1.2 and higher calls by including the SGI glext.h file and now delay the specular lighting till after the quake sprites are rendered, so they look a lot livelier. cRealBox no longer has a draw method, instead we always use cSpriteTextureBox to draw boxes. Also I fixed the .NET project file pop.sln, so it should build with no problem. There is still a little scuzz in the way a player bounces (or fails to bounce) off the corner of a wall.

Pop 33_4, Feb 10, 2004. This is the same as Pop 33_3 with one small change so that the speed info is a read-only edit field in the File|Motion Smoothness menu. The reason is to help Hamed create a VB script to write a file with Pop run speed. No need to download if you are presently using 33_3. I will collect bug reports on 33_3 this week and integrate the fixes into version 33_5.

Pop 33_3, Feb 4, 2004. Did more work on the memory handling of the graphics objects, wanting to make sure we won't get crashes again. Rearranged the menu a little, split the Game popup into a Game and a Critter popup, as the game popup was too big to fit on the screen. Still need to fix the help file.

Pop 33_2, Feb 3, 2004. Lots of fixes. We had a crash bug in the class demo, and I think I took out the cause --- though haven't reproduced the crash at home. Fixed some color flickering in 3D by commenting out the gimmick of drawing the injured player in wireframe, though seems like this should be possible. Finished fixing a problem of having the camera move through walls when you ride the player. I was seeing some bad z-fighting in Dambuilder at school, but don't see it at home. Still need to fix the help file.

Pop 33_1, Feb 2, 2004. Lots of fixes. Each game has been tweaked and tuned. Skybox is fully implemented. I added a fix to speed up textures and bitmaps by about 50%; the idea, which I got from Marvin Gouw, is to arrange the list of critters in such an order that I group all critters with the same sprite texture together, this way I render all sprites with the same texture one after the other, which avoids what seems to be a hefty startup cost for activating any particular texture. Next is to update the Pop Help file, and then I'm going to have my Spring, 2004, SJSU CS 240 students find bugs for us to fix.

Pop 32_3, Nov 19, 2003. Tiling now works on cSpriteTextureBox, you can feed in a final xtilecount argument to determine how many tiles across you want the rectangle. See spritetexturebox.h for the interface, also look at the usage in the special wall constructor in gameracer.cpp.
I #ifdef-ed out the kludge fix involving _znear from 32_2.
skybox still needs to be implemented for other games.

Pop 32_2, Nov 18, 2003. Has the new cSpriteTextureBox for use as a skybox so we can surround the scene with bitmaps on every side. See spritetexturebox.h for the interface. To use it, you overload the cGame::fixSkyBox() method and remove calls to setBackgroundBitmap(..). Check gameracer.cpp and gamespacewar.cpp for examples. I haven't yet made the skybox work with the other games.
I also put in a kludge fix for the following problem. If you are riding the player in a 3D world and the player is backed up against a wall, then sometimes your critterviewer will be inside the wall and you won't see anything. My kludge fix is the make the critterviewer have a near clip plane _znear be sizable enough so that anything closer than the rear of the player gets clipped. This doesn't look very nice. A better approach would be to only render the front faces of the walls so they'd be transparent from the inside. And only render the inward facing faces of teh skybox walls. A more complicated approach would be to collide the critterviewer with the walls.

Pop 32_1, Nov 3, 2003. Fixes a bug in cCritter::lookAt. Adds a curvature() method to cCritter to tell how rapidly you're turning, this is useful for making a cForceCentrifugal for a racing game. Added support for OpenGL fonts, both the 3D polygonal kind and the bitmapped kind (to exercise this feature, comment in #define TESTGLTEXT in the game.cpp file). Turned on some old MFC font code. Made a new Racer game which is slightly different from DamBuilder, but which starts in 3D view, and adjusts the cRacerWall constructor so the walls have their bases in the xy planes. Also tweaked the cSpriteQuake constructors to make these guys have their bases in the xy plane. Am adding a new cSpriteTextureBox for use as a skybox so we can surround the scene with bitmaps on every side, but this isn't done yet.

Pop 31_3, Sept 23, 2003. Same as 30_2, with a correct, tested fix to the .NET project file. Also changed the "FRESHLIFETIME" parameters in the graphicsMFC and graphicsOpenGL CPP files to be much longer to make less likelihood of lurches when loading a bitmap or Quake sprite.

Pop 31_2, Aug 26, 2003. Same as 30_3, with an incorrect fix to the .NET project file. Note that the Dambuilder game now starts with gravity off and in 3D view, unlike as its described in the book. Windows XP is known to have problems unzipping this file.

op 30_3, May 13, 2003. Includes all the fixes from the 29 series. 3D wall collisions should be OK at last. Merged Kenji Tan's Stereo Viewer code into the framework. If you have StereoEyes or CrystalEyes shutter glasses from StereoGraphics, Inc., you can now view our 3D games in stereo! Stereo dialog was cleaned up from version 30_1, and better behavior enforced for the various games. Fixed the PickNPop game, which got broken in the 29 series. This will be the last new build for awhile.

Pop 29_4, May 5, 2003. Fixed the bugs in the 3D wall collision code. Cleaned up the sSpriteQuake radius and location code. You can view the collision spheres for cSpriteQuake critters with View|Wireframe Polygons now. Cleaned up Dambuilder for 3D. Added a cSprite3DSphere. Pop 29_1, April 30, 2003. Gave the cCritterWall proper 3D behavior in terms of collisions. Made a new cListenerScooterYHopper that moves on the plane like a scooter, but hops with PgUp/PgDn. Start world has a "net" and a "ramp". This release has a bug; if the player goes fast enough in the MonsterHallway game, the player goes through the wall.

Pop 28_8, April 24, 2003. Beta. Fixes the PCX load. Any PCX file ought to work now. [Some of the student teams were having problems loading certain MD2 model files that have *.PCX skins. The problem skins were of size 320 x 200. There was a cast bug in the shareware PCX loading code I was using: the loader was reading the width into a byte instead of into an int, so it read 320 as 64.] I am leaving this build up so that you can easily compare it to Mensch's 28_8x DirectPlay build.

Pop 28_1 - 28_7, April 21, 2003. Added support for cSpriteQuake type based on Quake MD2 models. Version 28_4 fixed two bugs in 28_3 that made version 28_3 have slow cSpriteQuakes with zero radius. Version 28_5 fixes it so you can use both PCX skins and BMP skins, also makes the hopper control better in 3D (UP goes forward, PAGEUP hops). Version 28_6 fixes a bug that made the skins icompatible with cSpriteIcon, also added toolbar button to select random cSpriteQuakes into Spacewar or Game Stub 2D games for testing. Version 28_7 uses shared static memory for the models and textures with a CMap. Now multiple copies of the models load much faster. Cleaned up the memory management.

Pop 27_1, August 24, 2002. Stable. Fixed a little bug involving removing references to dead
critters. Getting the Pop framework package ready for the book's publication. This is the build described in the book.

Pop 26_2, May 16, 2002. Killed the "upside down in 3D Ballworld" bug hopefully for once and for all. Rewrote the lighting model to make the colors look better. Now computing normals better for irregular polygons, for better lighting on edges.

Pop 26_1, May 14, 2002. Fixed a few bugs, implemented HTML Help via *.chm files, made all bitmaps have edges that are powers of two, to make them work better with OpenGL.

Pop 25_5, May 1, 2002. Made compatible with Visual Studio.NET, added a BOOL cCritterWall::blocks(cVector start, cVector end) method..

Pop 25_4, April 9, 2002. Fixed more bugs found by students.

Pop 25_3, 25_2, March 14, 2002. Fixed an OpenGL SpriteIcon bug that was preventing us from using a long thin bitmap in a 3D view of the Ballworld Game. Had to fix texture.cpp.

Pop 25_1, March 14, 2002. Fixed about twenty bugs found by students in my CS 160. Updated the Help file.

Pop 24_2, Jan 28, 2002. Added a side-scroller game called Ballworld. Fixed a bug involving walls. Updated the Help file.

Pop 24_1, Jan 23, 2002. Fresh build for Spring, 2002, semester. Made Worms and GameStub2D more like games. Updated the Help file.

Pop 23_4, Jan 3, 2002. Cleaning up the code while revising the book, fixed a few bugs. The coins in Defender3D are health packs now.

Pop 23_3, Dec 7, 2001. Redid the cGame code used to initialize the views, mostly to make it clearer. As a result Defender3D now looks good when you turn off the View|Ride Player option. Cleaned up the cGraphicsOpenGL code and added a cLightingModel class. Fixed a possible bug in the Worms game.

Pop23 _2, Dec 1, 2001. Switched from a CArray to a CList for the collision hander cCollider object. Seems to make it run smoother on more machines, also seems to have removed a lock-up-and-hang bug that I was seeing, possibly caused by undue memory fragmentation from the order(N-cubed) array removals. Runs good now. Only files changed from 23_1 are, I believe, biota.* and collider.*. The cGame collide was renamed collideStep as well, so that's a simple change in game.h and gamepicknpop.h as well.

Pop 23_1, Nov 28, 2001. Changed the collision handling to work faster, particularly in worlds with many walls. Main changes are in new collider.* files, in critter.*, biota.*, and game.*. Also have been renaming some variables to match the book, so nearly every file has been changed at little. Changed the setAttitudeLock(int) method to something like setAttitudeToMotionLock(BOOL). If you need this build for improved speed, your best bet is to try and merge your changed files into the new framework. Also fixed the 2D clipping so that you don't see multiple copies of a wrapped asteroid, for instance.

Pop 22_8, Nov 12, 2001. Fixed the listeners and forces to work better. Mouse now works in zoomed-in view. Startup is now a Mario-style world (a weak basketball game). If you switch the Basketball listener from Mouse to Car or Spaceship, you'll see that gravity and friction work on the player with these listeners, which is good. We don't apply physical forces to critters with Arrow, Fly (Scooter), or Cursor listeners. Fly(Scooter) and Car now allow you to use Down arrow to move in reverse. Also changed the cForceEvade and cForceAccelerateTowards to use slightly better algorithms, so had to retweak Spacewar game. You might consider integrating whatever you've done so far on your project into the new build of the framework.

Pop 22_7, Oct 14, 2001. Wasn't posted here. Did some fixup on Defender3D, to freeze and wireframe the critters you shoot.

Pop 22_6, Oct 12, 2001. Fixed a bug where if you had two views open and closed one the program exited (as result of a bad SwapBuffers call). Added lights to all OpenGl graphcis models (they don't cost any extra speed unless you turn them on with the new cGraphics::enableLighting(BOOL yesno).) Cleand up the cGameStub3DLighting code. Added normals to the cPolygon sprites in opengl, so that they look nice with lighting now. Turned lighting on for Defender.

Pop 22_5, Oct 8, 2001. The DEBUG_NEW wasn't the problem we put it back. The problem --- which involved having the Debug build crash on machines with good graphics cards ---- was caused by trying to store the OpenGL extnesions info for the card and TRACE it to the output window. Turns out TRACE thows an exception if you give it more than a 512 char string. Fixed this. Also did some little fix to make the lighting demo look better. Also changed the behavior when swapping beween 3D and 2D graphics to reduce the work. Rewrote the cRandomizer singleton class. Moved most static variables out of static.cpp and into their home *.cpp files.

Pop 22_4, Oct 3, 2001. Comments out the line #define new DEBUG_NEW in stdafx.h in case this has been causing trouble. Fixed the cSprite::radius overloads.

Pop 22_3, Oct 2, 2001. Attempted to fix the slow-down bug by cleaning up the cGraphicsOpenGL::activate() method. Seems to work okay now, but needs further testing. Definitely fixed the old bug in multiple views of OpenGL game, the problem was that our code wasn't "activating" the appropriate OpenGL rendering context for the view being resized or moused upon, it was not a problem with OpenGL as some students had believed. Added better explosions to 3D Defender.

Pop 22_1, 22_2, Sept 30, 2001, fixed bugs, added new 3D Defender game. Noticed a serious bug with this build: over a prolonged run time (more than five to ten minutes) the OpenGL mode gets slower and slower, eventually locking up

Pop 21, 21_1, 21_2, Sept 8, 2001 used at start of classes. New OpenGL support. Students looked for bugs.

An Optional Additional Download

Although you can use the older Microsoft Help File format for your game's help files, it's recommended that you use the newer Microsoft HTML Help File format. HTML help files have the *.chm extension instead of the old *.hlp extenstion, and they support the full range of HTML features.

To work with the HTML Help files, you will need the Microsoft HTML Help Workshop software to create HTML help files and write apps that can read HTML help.

To obtain a complete set of the HTML Help components needed for creating and reading HTML help files, download the free self-extracting htmlhelp.exe archive from Microsoft at Microsoft HTML Help Downloads. (If and when this particular link stops working, try going to and entering "download HTMLhelp" in the "Search Site" window.)

Visual Studio.NET, Version 7.0, installs the support files htmlhelp.lib and htmlhelp.h for creating an application that can read *.chm files, but not the HTML Help Workshop executable htmlhelp.exe which is needed to create your own *.chm files.

Visual Studio, Version 6.0, doesn't install any of the HTML help files.