Coder Social home page Coder Social logo

louislafontaine / thetaleofmaya Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 69.06 MB

Projet info ASINSA 2A - Jeu 2D avec implémetation de Boid

Java 100.00%
boid boids boids-algorithm boids-behaviour boids-simulation game game-2d game-development gamedev

thetaleofmaya's People

Contributors

louislafontaine avatar melaniephe avatar weiixiasax avatar

Watchers

 avatar

thetaleofmaya's Issues

Flocking color

Have boids change their color so that all neighbor flockmates are the same color

Display fps

Display the current fps of the boid simulation as a small overlay in a corner of the window

Snapshot problem

Currently after the new acceleration vector of a boid (i) has been computed, that boid is updated and put back in the list of all boids. So the (i+1) boid's acceleration is based on the already updated (0 to i) boid's accelerations.

The goal here is to update the acceleration vector of every boid so that the acceleration of the aforementioned (i+1) boid would be calculated based on the non updated (0 to i) boid's acceleration.

Add Animation Class

Add an Animation.java class that can handle animation based on a SpriteSheet

Viewing angle on the perception radius

Implement a viewing angle on the perception radius, eg :
http://www.red3d.com/cwr/boids/images/neighborhood.gif
Don't forget to also modify the way the percetion radius is drawn on screen.

I think that to solve this, we simply need to add a check in the flock method, next to the distance < perceptionRadius checking if the absolute value of the angle between the boid's velocity and the director vector of the line between the boid and the other boid, is inferior the to the viewing angle.

Border avoidance

Make the boid able to detect the border of the screen and avoid them

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.