Skip to content

Development Plan

Bil Simser edited this page Mar 13, 2018 · 24 revisions

Plan for developing Micropolis for Unity

This page outlines the plan for development ideas for the main Micropolis codebase and lists features, resources, and changes that are in progress or planned.

First order of business is to get all C++ code from the original MicropolisCore rewritten in C# and hooked up in Unity (about 90% done) with the following core features:

  • Basic display (using Unity's TileMap engine, Unity Sprites, and the original graphics)
  • Ability to load a saved city (from the original "cities" folder)
  • Ability to select a saved city to load
  • Ability to load a scenario (Tokyo, Hamburg, Detroit, etc.)
  • Ability to select a scenario to load
  • Generate a random city
  • Save a city for later loading
  • Navigate around the view with the keyboard (pan)
  • Navigate around the view with the mouse (pan)
  • Zoom in and out of the map with the keyboard
  • Zoom in and out of the map with the mouse
  • Animated tiles (using the original animation tables from the game)
  • Sprites (Planes, trains, and automobiles and monsters oh my!)
  • Basic UI using Unity UI (text messages, debug, nothing fancy)
  • Loading of graphic tilesets (wild west, classic, etc.) from the original system
  • Select a graphic tileset to load from within the game

TODO

After the initial code is all brought over here's the plan for transforming the code into something more manageable. The original C++ code was good but a) lives in a single giant Micropolis class and b) has a lot of funky stuff that's C++ language specific (like defines, macros, pointers and memory allocation, etc.). So now with a working version of the code, it's time to get to work.

  • Review the C# code and fill in gaps from original TCL/Tk C code that were missing in the C++ code (or unexplained or changed)
  • Comment everything that makes sense and address any TODO comments from the original codebase
  • Create a playable user interface using the Unity UI controls and a graphical package (look at SimCity 4/5, City:Skylines, etc. for inspiration and Graphic River or someplace for a package we can adapt)
  • Add Pie menus for build tools (see https://www.youtube.com/watch?v=WzQdc2rAdZc) and hook build tools up to be functional (currently not functional in the core code)
  • Startup screen for choosing a scenario, loading old city, or generating city (similar to the Micropolis X11 splash window but done in Unity UI with the new graphics package)

At this point we'll have a 1.0 release (or a 0.1 release if you prefer) and be able to move onto fun stuff.

Short(ish) term plans

These are plans to refactor the original codebase (now in C#) into something easier and more .NET like. Not a lot of functional changes as the system should be, at this point, a functional game. This is more technical cleanup and paying down whatever technical debt that was incurred as a result of moving from C++ to C#. This work should be completed within 3 months.

  • Cleanup code, get rid of redundant or dead (unused) code. Document anything that needs it.
  • Setup a new website (probably using github pages?) to offer up documentation and a place for the installer to run from.
  • Build an installer using Squirrel so people can install and run the application with little effort (and keep it up to date).
  • Refactor the entire codebase, rename functions and variables (currently uses Camel case based on the original code, prefer to use Pascal case), and generally make it more aligned to C# rather than C++ naming standards.
  • Public/private fixups. Internal variables and public and most methods should be marked as private (too much of the system is public right now and not needed).
  • Splitting of the Micropolis "GOD" class. Current build uses a single class for everything, figure out what makes sense (for example put all traffic functions in a class called Traffic) and call everything from a Micropolis class that represents the core engine. Not completely "object oriented" but the best we can do with the simulator code we have.

Long term plan for Micropolis Unity

This is longer term that will take some time to fix (because of sweeping changes across the entire system). This work is expected to be in the 6-12 month time period.

Crazy (but cool?) ideas

Maybe cool, maybe crazy, stuff to think about and build on that may affect core gameplay but might be really awesome to have. Long term stuff here. Or not.

  • Multiplayer (sharing cities, being able to build with friends, etc.). Still client based and not a web server, but using some kind of networking layer (using Unity Networking, Photon, or something else).
  • Allow players to use the bulldozer tool to drive around the map, crushing things in your path!
  • Terrain editor (like the original DOS version but better!) to create your own custom landscapes.
  • Support modding community with some kind of plugin system to let them do things with the system (Cities Skylines does a great job with this)
  • Custom Sound packages (might be combined with tilesets to create new theme packages)
  • Programmable interface (via C#) to build your own bots that can create, populate, run, or destroy cities (like the old 'C' robots where they could battle each other). Best bot wins.
  • Public scoreboards and achievements for best cities, fastest builds, longest runs, etc. (need a free service to tie into)