Making a game in Visual Studio from 1997

Lobsters Hottest Tools

Summary

A senior developer used Visual Studio 6 from 1997 and pure C to build a dual-stick shooter game framework on Windows 7, demonstrating retro development practices such as fixed timestep, object management, and OpenGL compatibility mode.

<p><a href="https://lobste.rs/s/virlcj/making_game_visual_studio_from_1997">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 06/08/26, 03:18 AM

TL;DR: A developer used Visual Studio 6 (released in 1997) on Windows 7 to build a basic framework for a twin-stick shooter from scratch in pure C and OpenGL compatibility mode, including windowing, object management, coordinate system, and fixed time step. ## Development Environment & Motivation The presenter, Sean, uses **Visual Studio 6** (originally released in 1997) running on **Windows 7**. He has stuck with this environment since leaving Looking Glass Studios around 2001–2002. His reason for choosing such an old environment is familiarity and comfort; he doesn't want to migrate. The project goal is to build a simple twin-stick shooter, with WASD movement and mouse shooting. Since the development machine has no gamepad, the mouse substitutes for the right stick. ## Getting Started: Window & Basic Framework Sean first calls his personal platform library `STB` (for handling Windows window creation and OpenGL context), then initializes and creates a window with a gray background. He uses a 4:3 aspect ratio and sets up an orthographic projection matrix, with the coordinate system origin at the bottom-left (0,0), horizontal range -4 to +4, and vertical range -3 to +3 (later changed to -4 to 4 for testing). He uses an older OpenGL compatibility mode, requiring version 3.3. All code is written in a single `.c` file, without splitting into separate files beforehand. He explains: “If I knew I’d be serious about this project, I might split it right away. But for a quick stream, it’s not worth it.” ## Object Management: Static Array & ID Allocator Sean uses a simple static array to store all game objects and implements a basic allocator. Key design choices: - Array size is a power of two (e.g., 64). - **Object ID 0 is reserved as "null"**, similar to a null pointer. Allocation starts at index 1. - The allocator iterates through the array, finds a slot whose type is `none`, and returns its index. - The free function sets the slot to `none`. - The player object is hardcoded to a specific index in the array for more convenient syntax when accessed frequently. Sean explains that for an indie game, using one big array and manually managing slots is sufficient; no complex data structures or dynamic memory allocation are needed. He cites John Blow’s talk: “Just use a big array.” ## Coordinate System & Rendering The projection matrix uses `gluOrtho2D` (actual spelling is `gluOrtho2D`, but due to lack of autocomplete, he tried several times). Sean disables many 3D features (like face culling) and keeps only basic drawing. He uses a pink (magenta) square to test if rendering works. Math is handled with simple 2D vectors (position, velocity) inline in the game loop. ## Input & Movement Input handling uses Win32 API to check keyboard key states (WASD). Sean maps up/down and left/right to two axis variables and handles simultaneous opposite directions (they cancel out, resulting in 0). Movement speed is set to 20 units per second, using simple Euler integration: position += velocity * time step. ## Time Step: Fixed vs Variable Sean explicitly chooses a **fixed time step** (e.g., 60 or 120 FPS step), with multiple iterations per frame if the frame rate is low. His reasoning: - Variable time step leads to inconsistent physics behavior across different frame rates. - Fixed step ensures determinism for logic like collision detection. - For this game (touch and explode), simple fixed step is sufficient. He criticizes variable time step, noting it can cause trouble in projects requiring precise physics. ## Programming Philosophy: Warnings & Abstraction Sean takes a pragmatic approach to compiler warnings. He disables the warning about `double` to `float` conversion (4244) because “I simply don’t care about it.” He explains that during rapid prototyping or procedural generation, such warnings aren’t worth the time to fix. He emphasizes not over-engineering; get things running first. For instance, using static arrays instead of linked lists, and inline code instead of function abstractions. ## Summary The entire demo shows an experienced developer using a toolchain over 20 years old to quickly build the core game loop in a minimal, pragmatic way. While he admits game design is not his strength, his programming skills are sufficient for the project. The environment may be old, but the mindset is clear: focus on a working product, not perfect architecture. **Source:** Making a game in Visual Studio from 1997 - YouTube (https://www.youtube.com/watch?v=nQrzB5P5NPE)

Similar Articles

Let's compile Quake like it's 1997!

Fabien Sanglard

A detailed guide on recreating the process of compiling Quake's win32 binaries using vintage tools like Windows NT 4 and Visual C++ 6, as done in 1997.

Making Graphics Like it's 1993

Hacker News Top

A developer details building Catlantean 3D, a first-person shooter using 1993-era graphics techniques (256 colors, 320x240 resolution, hand-crafted assets, no AI) with a planned Steam release, focusing on palette rendering and asset creation.

Space Cadet Pinball in Real Life

Lobsters Hottest

This article describes the author's project of bringing the pinball table from the classic Windows game "Space Cadet Pinball" to life, building a real mechanical pinball machine from scratch using 3D printing, microcontrollers, and homemade mechanisms. It details the design and iteration of rebound buffers, drop targets, slingshots, and other features.

Building a 1997 Quake PC!

Fabien Sanglard

The author documents the process of building a vintage PC from 1997-1998 to play all versions of Quake, covering hardware choices like the Pentium MMX, 3dfx Voodoo2, and Socket 7 motherboards.

@AYi_AInotes: 卧槽,有大神直接用Claude Code,复刻出一整套完整游戏开发工作室。 GitHub 1.8万stars,免费开源,项目名叫Claude Code Game Studios, 48个AI智能体1:1还原线下工作室全岗位,从创意总监到关…

X AI KOLs Timeline

卧槽,有大神直接用Claude Code,复刻出一整套完整游戏开发工作室。 GitHub 1.8万stars,免费开源,项目名叫Claude Code Game Studios, 48个AI智能体1:1还原线下工作室全岗位,从创意总监到关卡设计师全覆盖。 36条斜杠指令一键启动全流程,适配Godot Unity Unreal三大游戏引擎。 自带自动化校验钩子、分路径编码规则、28套行业标准文档模板,架构拉满。 所有AI只做梳理方案不擅自操作,决策权全程握在自己手里。 克隆仓库一键启动,MIT开源可商用,凭空拥有一支专业游戏开发团队。 老规矩GitHub地址评论区自取!