Skip to content

This is a minimal CityBuilder Unity project with different type of building. We can add more buildings in Static data and it is maintaining the Game state of the player.

Notifications You must be signed in to change notification settings

mohsansaleem/CityBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CityBuilder

This is a simple farm game with the raw UI. Primary purpose of this project was to implement an expandable architecture.

We can build and collect resources. In Move Mode we can move the building around. TownHall automatically starts production of the resources. Remaining buildings need the user input to start production.

Video

IMAGE ALT TEXT

Highlights:
  • Unity 2019.4.0f1
  • MVP
  • Dependency Injection
  • Reactive Programing
  • Promises
  • State Machine
  • Generic Pooling System

Installation

  • Pull the code.
  • Use Unity 2018.3.4f1 to open it.
  • Check /MainMenu/Game/Always Start from Startup Scene.
  • Press Play.

Hierarchy Overview:

  • All the scenes code is in \Assets\Scripts\city\view. Each scene has the respective folders including some extra scenes like Popup and MainHub etc.
  • GamePlay scene has all the magic. Especially the Build & Regular state.
  • Bootstrap is the starting scene.
  • *Data files\classes are for Metadata objects.
  • *RemoteData files/classes are for GameState objects and I am linking the *Data on loading of GameState.
  • *RemoteDataModel are the Models that contain RemoteData and other reactive properties and collections.
  • \Assets\Scripts\core is submodule that contains just the abstract of some generics that can be shared across the project so I have added it to minimise my work.
  • All the scenes and respective resources are in \Assets\Resources
  • Main Game code is in \Assets\Scripts\city.
  • (Models, RemoteData and Data)s are in \Assets\Scripts\city\model.
  • All the Commands are in \Assets\Scripts\city\command.

Information:

Delete the /Assets/StreamingAssets/GameState.json & MetaData.json if you want to change the default setting after updating Scriptable Objects.

Plugins Description
Unity3D 3D Game Engine.
Zenject Dependency Injection.
UniRx Reactive Programming.
C# Promises Asynchronous coding.

Happy Day!

About

This is a minimal CityBuilder Unity project with different type of building. We can add more buildings in Static data and it is maintaining the Game state of the player.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published