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
- Unity 2019.4.0f1
- MVP
- Dependency Injection
- Reactive Programing
- Promises
- State Machine
- Generic Pooling System
- Pull the code.
- Use Unity 2018.3.4f1 to open it.
- Check /MainMenu/Game/Always Start from Startup Scene.
- Press Play.
- 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.
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!