GithubHelp home page GithubHelp logo

wlgs / life-simulation Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 586 KB

Life simulation. Project for Object Oriented Programming course 2021/22 at AGH UST. It consists of simulating animals behaviour - such as eating and reproducing. Setting up different starting options differ in late-game results.

Java 100.00%
simulation life life-simulation oop project agh agh-ust

life-simulation's Introduction

Life simulation

Screenshot of the game

A wild life simulation program, that shows how cruel some living (or programmed) things can be.

What is the Life Simulation about?

Life simulation is a program written in Java that was a final project for our Object Oriented Programming Course at AGH UST. We had to implement some Darwin Life's rules into RNG generated world with animals that want to just reproduce, eat and survive the next day.
Full project information (and its requirements) can be seen here.

Starting parameters

  • map width - the width of the map
  • map height - the height of the map
  • animals amount - the amount of animals spawned at start
  • start energy - the amount of energy that animals spawn with
  • move energy - the amount of energy it costs to move
  • plant energy - the amount of energy the plant gives to an animal
  • jungle ratio - percentage of the map which is covered by jungle
  • render delay - delay which is waited before rendering next era

Basic game rules:

  • Animal can act only if its energy is above 0
  • Animal can reproduce only if it has 50% or more energy (based on max capacity)
  • Animal gets greener the more it eats
  • Animal gets more blueish when it is close to death
  • Maximum of 2 plants can spawn each era (one in jungle area, one outside jungle area)
  • There can be more than 1 animal on each square
  • If there are more than 1 animal on square on which plant has grown - the plant is evenly distributed between most healthy animals
  • Only 1 pair of animals can reproduce per square per era
  • And some more not mentioned rules (check them out!)

Screenshots

screenshot of main menu of the app

Main menu, the first thing you see when starting the application.

screenshot of application running

Application running and recording all the statistics, which you can export later on to a .csv file.

life-simulation's People

Contributors

wlgs avatar

Stargazers

 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.