Giter Club home page Giter Club logo

2droomlos's Introduction

2DRoomLOS

2D line-of-sight mesh generator and renderer for room based Unity2D games. This generator works by checking the sightlines in a view origin room, then check what doors are visible from that point and generating the views trough whatever doors are visible. This approach seemed like a good idea to me because it limits the amount of raycasts there need to be done in one time, no need to check every corner point in the game, only the ones in the relevant room. The system can draw as many line-of-sight mesheses as possible (in theory).

Demo

Update 15-7-2019

I updated this project so that instead of rendering the line of sight as a camera-shader it writes the result to an instantiated panel, this is more useful because the camera can be moved without impacting how the los is rendered. It also allows for a fog of war so that areas which have been revealed but are no longer in sight can still be seen for how they looked when last seen. (that sentence is garbage but I'm tired af)

DemoFov DemoFovPerspective

I wrote this asset for a game I'm working on and it seemed like a nice idea to open source it. If you intend to use this code you should know that I am a hobbyist with no formal background in programming, therefor there are bugs and it is incredibly unlikely that the asset is as optimised as it could be.

In the future I might rewrite this to make use of the ECS, the code is really data driven and segmented so it seems feasible and might be a nice project.

I'm open to contributions to the project.

2droomlos's People

Contributors

timwillebrands avatar

Watchers

James Cloos 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.