runekrauss / carrots-hunting

A game where a rabbit has to collect carrots and beware of enemies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Carrots Hunting

Carrots Hunting is a game about collecting carrots with a rabbit on a game field, without being eliminated by enemies in the form of archers and wolves.

Game Field

🎯 Features

  • Multiple levels
  • Design of own levels
  • Pattern movement for NPCs
  • Collision detection of players

πŸš€ Getting Started

πŸ”§ Installation

To play this game, you just need to download and install Greenfoot according to the instructions.

πŸ’» Usage

Open Greenfoot and import CarrotsHunting. Then compile this game and run it by clicking the button labeled Run.

πŸ‘€ Examples

πŸ”Ά Designing Your Own Level

To build your own level, you need to define a text file following a certain scheme:

{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW","GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{"GSW","GSE"},{"GSWNE"},{"GNW","GNE","GSW"},{"GSWNE"},{"GNE","GSE"},{""},{""},{""},{""}},
{{"GNWSE"},{""},{""},{""},{"GNWSE"},{""},{""},{""},{""}},
{{"GSE","GNW"},{""},{""},{""},{"GSW","GSE","GNW"},{"GSWNE"},{"GSW","GNE"},{"GSWNE"},{"GNE"}},
{{"GNWSE"},{""},{""},{""},{"GNWSE"},{""},{""},{""},{""}},
{{"GSW","GNW"},{"GSWNE"},{"GSE","GNE","GSW"},{"GSWNE"},{"GNE","GNW"},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW","GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW"},{""},{""},{""},{""},{""},{""}}
1
1
8 
1 
1

The first sequence describes the grid layout using coordinates. The following values describe the location for eliminated players: origin x, origin y, initial position, increment of mover, and direction of rotation.

πŸ”Ά Using the Optional Server

Furthermore, there is a server in the directory Server that manages likes by users. In order to use this server, it must be compiled and started via java -jar Server.jar. The game will then try to establish a connection for communicating. The server can be terminated via the command stop.

βœ… Tests

In addition to UI tests such as reading levels, various unit tests were performed: The corresponding test classes have the suffix Test and can be executed directly in Greenfoot.

πŸ“– Documentation

Analogous to the tests, the documentation can also be accessed directly in Greenfoot. For this purpose, open the source code of a respective file and simply switch to the documentation.

⚠️ License

Carrots Hunting is licensed under the terms of the MIT license.

πŸ† Award

Carrots Hunting took 2nd place for Best Game of the student course Praktische Informatik 1 at University of Bremen in 2016.

About

A game where a rabbit has to collect carrots and beware of enemies

License:MIT License


Languages

Language:Java 98.6%Language:Rich Text Format 1.4%