Giter VIP home page Giter VIP logo

mohsansaleem / citybuilder Goto Github PK

View Code? Open in Web Editor NEW
26.0 1.0 7.0 14.44 MB

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.

C# 95.56% ShaderLab 3.91% HLSL 0.53%
unity promises gamestate generics unity3d zenject mvc unirx reactive-programming city-builder pooling

citybuilder's Introduction

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!

citybuilder's People

Contributors

mohsansaleem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.