Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 2.68 KB

README.md

File metadata and controls

40 lines (23 loc) · 2.68 KB

Modern Micropolis (Working Title)

Modern Micropolis (or MMicropolis for short) is a modernization of the original Micropolis game (a.k.a. SimCity) and source code released by Don Hopkins (Reference). This is a work-in-progress project.

For the original README included in the project, see README.original in the root project directory.

Development Setup

The MMicropolis repository is a self-contained development project that uses Visual Studio Code and DevContainers to handle the configuration and setup of a new environment. If you cannot install Docker locally, GitHub Codespaces provides a paid-hosting option for DevContainers.

Build

  1. Clone the respository to your local machine.
  2. Open the folder in Visual Studio Code.
    • The Remote Development extension should be installed to allow for development with DevContainers.
  3. From the command palette, select Remote-Containers: Open Folder in Container.
  4. Verify all is working by running cd src && make all from the terminal.

Common Tasks (Build, Rebuild, Clean, Run)

All common tasks included in the ./src/makefile have been added as VSCode Tasks. See the ./vscode/tasks.json for details.

Running the Game

Being a desktop application mean that Micropolis runs on the "desktop" inside the docker container not on the host machine. There are two ways to interact with the running game while testing or debugging.

Web Browser (noVNC)

The devcontainer exposes port 6080, where you can open localhost:6080 and use password vscode if hosted locally or through whatever port forwarding address is provided by Codespaces.

VNC Viewer (Locally Hosted Only)

The devcontainer exposes port 5091 which any VNC Viewer like this one from Real VNC can connect to. Use the address localhost:5901 with password vscode.

NOTE: This method does appear to work with Codespaces dev environments.

Debugging the Game

A debug launch configuration has been added to ./vscode/launch.json that attaches VSCode to the GDB installed in the devcontainer enviornment. See the documentation about Debugging in VSCode for details. On a successful launch, the debugger will break on start.

Refer to the Running the Game section to interact and test the game with the debugger attached.