Coder Social home page Coder Social logo

objectpoolingunity's Introduction

Object Pooling is very important and commonly used in bullet hell games when there are hundreds of bullets are fired.

In this game I used patterns like Object Pooling, Singleton design pattern, Top-Down Main Flow and Factory Pattern, Interface and Inheritance.

Its a simple game where there is a Turret and it fires 3 different kinds of bullets.

Turret.cs file is responsible to fire a bullet.

BulletFactory.cs is reponsible for creating a new bullet if the bullet is not already created.

IPoolable interface is for all the bullets that are to be Pooled and Depooled.

Polygon, Hexagone and Diamond are the bullet types and are accessible using an enum of BulletType.

BulletManager.cs asks for a new bullet from BulletFactory.cs. After returning the bullet, BulletManager sends the object to Turret.cs who is responsible for firing the bullet.

Bullet class is a parent class of Polygon, Hexagone and Diamond class.

objectpoolingunity's People

Contributors

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