Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Java app which simulates an ecosystem with different animals.

Notifications You must be signed in to change notification settings

Neplex/Design-pattern-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

First view

This is an Java app which simulates an ecosystem with different animals.

Getting started

To launch the app enter the command bellow:

$ java -Djava.library.path=lib/ -jar Game.jar [options]

The options:

Option Description
--debug To have more log
--fullScreen Start the game in full screen mod
--size width height Start the game with resolution widthxheight

How to play

Shortcut Action
Esc Quit the game

Add some features

You can add some new animals just by editing the xml file data/livingBeings.xml. Simply copy the code below, adapt and paste it to the end of the file.

<livingBeing>
    <id>21</id>
    <name>Rabbit</name>
    <valEnergy>40</valEnergy>

    <!-- Life -->
    <life>10</life>
    <lifeLimit>5</lifeLimit>

    <!-- Energy -->
    <energy>200</energy>
    <energyLimit>75</energyLimit>

    <!-- Interface -->
    <movement>Pedestrian</movement>
    <reproduction>Reproducible</reproduction>

    <!-- Food -->
    <food>
        <id>111</id>
    </food>
</livingBeing>

Tag description:

Tag Description
id Id of the living being
name The name of the living beings for log. Is the path for sprite data/img/:name:/sprite.png
valEnergy The energetics value win when you eat it
life His maximum life
lifeLimit Bellow this it became injured
energy His maximum energy
energyLimit Bellow this his instinct is nutritional
movement His interface for him movement (Pedestrian or Fixed)
reproduction His interface for him reproduction (Reproducible or Unreproducible)
food Its diet

Advancement

  • v0.2.3: Balance the world

    • Fix some issues
    • Add interface IReproduction (now Carrot can't reproduce')
    • Balance the world
  • v0.2.2: Options

    • Fix some issues
    • Migration class Log to org.newdawn.slick.util.Log
    • Add sound player with slick
    • Add some option to main class (debug, fullScreen, size)
    • Add auto-adjustment between screen size and map size
  • v0.2.1: Mapping(v2)

    • Fix some issues
    • Remove old path finding because of issue
    • Remove old matrix map
    • Add new path finding (A* algorithm)
    • Add slick map
    • Add simple map generation (with grass and tree)
  • v0.2: Graphic interface

    • Fix some issues
    • Add class Game (main class)
    • Add sprite in living beings
  • v0.1.2: Mapping

    • Fix some issue
    • Add map (matrix of tile)
    • Add path finding
  • v0.1.1: More features

    • Fix some issues
    • Remove class Rabbit and Carrot
    • Add XML data file data/livingBeings.xml (lib: jDOM-2.0.6 http://www.jdom.org/)
    • Add better behavior
  • v0.1: First code

    • Add class LivingBeing
    • Add pattern state (Alive, Injured, Dead)
    • Add pattern state instinct (Reproduction or Nutritional)
    • Add pattern strategy for deplacement (Pedestrian or Fixed)
    • Add class Rabbit and Carrot (extends LivingBeing)
    • Add world
  • v0: Start

About

Java app which simulates an ecosystem with different animals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages