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.
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.
- Clone the respository to your local machine.
- Open the folder in Visual Studio Code.
- The Remote Development extension should be installed to allow for development with DevContainers.
- From the command palette, select Remote-Containers: Open Folder in Container.
- Verify all is working by running
cd src && make all
from the terminal.
All common tasks included in the ./src/makefile
have been added as VSCode Tasks. See the ./vscode/tasks.json
for details.
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.
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.
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.
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.