Coder Social home page Coder Social logo

smidmatej / aquarium Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 92.29 MB

A simple game featuring 3D submarine movement inside a glass box. The environment is populated by fish, that swarm together in a boid-like manner and avoid obstacles, and by grass kelp, that are proceduraly generated at start-time using L-systems.

C# 75.63% ShaderLab 20.41% HLSL 3.96%
boids lsystem lsystem-plant-generator unity unity3d

aquarium's Introduction

Aquarium

A simple game featuring 3D submarine movement inside a glass box. The environment is populated by fish, that swarm together in a boid-like manner and avoid obstacles, and by grass kelp, that are proceduraly generated at start-time using L-systems.

submarine

Fish simulation

Each fish is an agent simulated using the Unity physics system as a rigid body with a mesh collider. Each fish searches for other fish in a radius around them and try to align themselves to the swarm. They also cast collision detection rays in front of them and try to avoid obstacles.

boids

The fish decides on the swim direction based on the swarm behaviour and nearby obstacles, and then a PID controller computes a torque that is then applied on the fish's rigidbody to turn it toward the desired swim direction.

ShaderGraph

The fish meshes are animated using a sinusoidal pattern to emulate a wave-like swimming pattern using the ShaderGraph tool in Unity. Similar effect is applied on the plants and water surfaces.

fish

aquarium's People

Contributors

smidmatej avatar sofizzaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hafewa martindiao

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.