GithubHelp home page GithubHelp logo

vadimgerc / level-generator Goto Github PK

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

Endless level generator with obstacles (using blue noise algorithm).

License: MIT License

ShaderLab 0.05% C# 98.83% Objective-C 0.97% C 0.04% Objective-C++ 0.06% JavaScript 0.01% HLSL 0.06%

level-generator's Introduction

Endless Level Generator

Generates an endless level with obstacles (using blue noise algorithm).

Overview

ezgif com-optimize

How generation works

Chunks Generation

  • When the character comes within a certain distance to the edge of the level, new chunks are generated.

  • When the character moves away from the far chunks, they are disabled (to save the generated level and not to affect performance).

    Drawing distance can be customized in the LevelGenerator script

    Screenshot 2023-11-08 at 18 56 52

Obstacles Generation

When a new chunk is spawned, obstacles are generated on it using the blue noise algorithm. The chunk is divided into several virtual segments, in each of which an object can be generated (at a random point). This allows for more predictable (but still random) generation of objects in the scene and not worry that they will be generated close to each other. Here you'll find more info about the blue noise algorithm.

Screenshot 2023-11-08 at 17 45 07

You can customize the generation parameters for each chunk separately in the ChunkObject script.

Screenshot 2023-11-08 at 19 13 50

Assets

Character - https://assetstore.unity.com/packages/3d/characters/meshtint-free-boximon-fiery-mega-toon-series-153958
Obstacles - https://assetstore.unity.com/packages/3d/props/polygon-starter-pack-low-poly-3d-art-by-synty-156819

level-generator's People

Contributors

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