Coder Social home page Coder Social logo

dynamic-walls-demo's Introduction

Dynamic Walls - demo implementation

Alt Text

In-game example

IMAGE ALT TEXT HERE

(click to open)

About this repository

This demo project showcases dynamic walls whose sides adapt to the environment used in our upcoming game: Pelagos: Rise of Greece.

It contains a working example scene and commented source code. This project also uses techniques of Object Pooling and custom Frustum Culling, which can be viewed here: (https://github.com/keypax/object-pooling-in-unity-demo)

How it works

The idea behind it is very simple. Wall has 4 separate sides (front, right, back, left). If another wall is in front, disable the front side. The same for the second wall. If something is on the back of the wall: disable the back wall. Randomize a little for the prettier look and that's all ;)

IMAGE ALT TEXT HERE

Requirements

Unity 2019.3.2: go to Unity download archive page and download Unity 2019.3.2 version.

Installation

Just download ZIP of this repo or use GIT client and open in Unity. That's all :)

Implementation

This is a demonstration of a solution that we're using in our project. This is not an out of the box plugin that you can download and make work in 2 minutes. In this example we're using Dependency Injection. We also try to use Unity components only if necessary.

It may be scary, but don't worry and take a look :)

Where to start

Good places to start understanding the code are:

Prefab:

Assets/Prefabs/Buildings/Wall.prefab

Code:

Buildings.Application.WallConfigurator

Buildings.Application.WallSidesUpdater

Buildings.Application.Spawners.WallSpawner

ObjectPooler.Application.Displayers.BuildingsDisplayer

dynamic-walls-demo's People

Contributors

keypax 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

dynamic-walls-demo's Issues

Var

Hello,

Is there a reason why you are not using var?

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.