GithubHelp home page GithubHelp logo

bertaye / tower-defense-prototype Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 66.48 MB

A Tower Defence game prototype which implements object pooling & flyweight patterns in Unity3D

C# 62.83% ShaderLab 31.66% HLSL 5.50%
design-patterns flyweight-pattern game object-pool-pattern object-pooling tower-defence tower-defense-game unity unity3d

tower-defense-prototype's Introduction

GAME PLAY

tower_defense.mp4

DESIGNER'S MANUAL

HOW TO PLAY GAME

 Open StartScene, hit Play button in editor.

HOW TO ADD A NEW ENEMY OR TOWER(turret)?

  You simply go to Game Data/Enemies folder; create New EnemyData; then do the same for creating a PoolableObject of the Enemy.
  Then open de ObjectPooler prefab, add the PoolableObject of the Enemy. 
  Follow same steps for the Tower(Turret). Range of the turret will calculated by considering your input and a collider will created during instantiation phase of the game.

HOW TO DESIGN LEVELS

  You can duplicate "BaseScene" scene in  Scenes folder; than go to Game Data/LevelData directory and create New LevelData;
  add the objects and amounts for that level to this data. Then, drag and drop this data object to your new scenes following objects
      -UI & Input/Canvas/LayoutGroup/Turret_1 
      -UI & Input/Canvas/LayoutGroup/Turret_2
      -UI & Input/Canvas/LayoutGroup/Turret_3
      -EnemySpawner
  After that dont forget to add your level scene to the Scenes in Build panel.

HOW TO CREATE NEW LEVELS WITH DIFFERENT GRID

  Go to Game Data/Grid folder; create new GridPreferences; customize your preferences. Then,
  Duplicate the "BaseScene" scene; select GridCreator object from hierarchy, on the inspector drag and drop your new
  GridPreferences to GridCreator script and activate it; DONT FORGET to deactivate it after your new grid is created
  and deleting the old grids!
  Then, drag and drop your new GridPreferences to Enemy and Turret prefabs; so that Turrets can create
  their colliders for that grid prefs and
  Enemies can know where to stop.
  PS: You should use same GridPreferences through all game.

HOW TO CHANGE TURRET BULLETS

   Create new PoolableObject inside Game Data/PoolableObjects; customize your new bullet; drag and drop this bullet 
   to corresponding TurretData objects
   under Game Data/Turrets folder.

OTHER CUSTOMIZATIONS

 -You can change each bullets' speed from their prefabs. Just find the "BulletController" script and adjust speed.
 
 -You can change shooting frequency of each turret, just open that turrets' prefab and find the "TurretController" script, adjust TimeBetweenShots.

tower-defense-prototype's People

Contributors

bertaye 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.