Skip to content

thalter/Three-Mile-Island.Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three Mile Island - C# Conversion

three-mile-island_1

This is a C# conversion of the classic Three Mile Island nuclear reactor simulation game originally written in Integer BASIC for the Apple II computer.

Background

It has been my life-long dream to bring one of my favorite Apple II games into the 21st century, but converting the original Integer BASIC code always seemed to be a huge lift. I decided to turn this into an exercise in "Vibe Coding" to see if AI could complete what I never had time to do, and I'm so glad I did. Thanks to the help of Claude Opus, I was able to do much of the work in a matter of minutes.

Like most AI generated code, Claude's first iteration wouldn't even compile, much less run. However, it gave me a huge leg up, and didn't take much effort on my part to get the code ship-shape and running.

About the Original Game

Three Mile Island was a nuclear reactor management simulation game that challenged players to safely operate a nuclear power plant while managing various systems including:

  • Reactor core and control rods
  • Primary and secondary cooling systems
  • Turbines and generators
  • Pumps and valves
  • Emergency systems

The game featured real-time simulation of reactor physics, equipment failures, and economic considerations.

Building and Running

Prerequisites

  • .NET 8.0 SDK or later. Will run on Windows, MacOS, or Linux.

To Build

dotnet build

To Run

dotnet run

How to Play

The game presents a main menu with numbered options:

  1. CONTAINMENT - View containment vessel status
  2. TURBINE, FILTER, CONDENSER - Manage power generation systems
  3. REACTOR CORE - Monitor and control the reactor core
  4. PUMP HOUSE - View pump house status
  5. MAINTENANCE SCHEDULE - Check equipment maintenance status
  6. COST ANALYSIS - View financial information
  7. OPERATIONAL STATUS - View all system status and warnings
  8. SAVE / RESET STATE - Save or load game state

Press the number keys (0-7) to navigate to different screens. Press ESC to return to the main menu from any screen.

Reactor Core Controls

  • + or =: Insert control rods (increase reactivity)
  • - or _: Withdraw control rods (decrease reactivity)

Conversion Notes

This C# version is a modernized conversion that maintains the core game logic and simulation while adapting it to:

  • Modern console I/O instead of Apple II text/graphics modes
  • Object-oriented C# structure
  • Cross-platform compatibility
  • Simplified graphics rendering (text-based instead of lo-res graphics)

Some features from the original that are simplified or not yet implemented:

  • Lo-res graphics displays (converted to text representations)
  • Sound effects (Apple II speaker pokes)
  • Save/load state functionality (planned for future update)
  • Some advanced graphical displays

Game Objective

Manage the nuclear power plant safely and profitably. Balance:

  • Power output to meet demand
  • Reactor temperature control
  • Equipment maintenance
  • Financial performance

Avoid:

  • Meltdown (temperature too high)
  • Containment breach
  • Excessive financial losses
  • Radiation leaks

Future Plans

  • Continue to modernize the code with improved method, property, and variable naming. Done
  • Separate game logic from presentation layer to allow for a variety of front-ends (Blazor, Maui, Native App, etc.) In Progress
  • Restore original low-res graphics and sounds. In Progress

Original Source

This conversion is based on the Apple II Integer BASIC source code from the original Three Mile Island game. I've included the original source code in this repo, however I make no claims of ownership of it or representations of its license.

License

This is a fan conversion for non-profit and educational purposes. Original game rights belong to their respective owners.

three-mile-island_7

About

C# Port of Vintage Apple II Game Three Mile Island

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •