Skip to content

An area maximisation game based on the idea of merging convex shapes.

License

Notifications You must be signed in to change notification settings

RoanH/ConvexMerger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConvexMerger

ConvexMerger is an area maximisation game based on the idea of merging convex shapes. The goal of the game is to claim as large an area as possible while competing against your opponents that try to do the same. To do this you can either claim new objects for your own or merge already claimed objects with other objects to also claim the area between them. It is possible to play the game with up to 4 players of which some can be AIs and it is also possible to play online multiplayer. The game ends when the active player has no moves left.

Jump directly to downloads

Example Game

A short example game between two AIs is shown below.
example game

Rules

The goal of the game is to maximise the area of the playfield you own by claiming and merging objects into new convex objects. In every turn you can do the following:

  1. Click an unowned object to claim it for yourself.
  2. Click an object you already own and then select a second object either owned by you or unowned. If there are no objects on what will become the boundary of the new convex object the merge will succeed. Objects fully contained in the newly created convex object will be stolen from their current owner.

The game ends when the player whose turn it is has no possible moves available. You can visualise merging two objects as spanning an elastic band around both objects, the resulting shape is the new convex object. A merge of two objects is shown below:
merge

Playfield Options

When generating the playfield you can control the object size, density and spacing. The exact function of these parameters is as follows:

  • Object size: Controls the size of the playfield objects.
  • Density: Controls how much of the playfield is initially covered by objects.
  • Spacing: Controls how much space there is between the objects. The spacing also affects the object size, with a larger spacing resulting in smaller objects.

Downloads

Requires Java 8 or higher

All releases: releases
GitHub repository: here

Online Multiplayer

The game has built in support for playing online multiplayer. Here one player will act as the host and all other players will connect to this host. If the host and all other players are on the same local network (e.g. WiFi), then players can connect to the host using the local IPv4 address of the host. If you want to play with remote players, then it is required for the host to portforward port 11111 and players can then connect using the external IP of the host. Please make sure you know what you are doing if you set this up and only play with people you trust.

Algorithms

This project was started for a course on geometric algorithms at the Eindhoven University of Technology and further extended during an algorithms capita selecta. As a result the internal logic for this game was designed around interesting geometric algorithms and most of the major algorithms can be visualised using the keybinds listed on the information screen. Detailed information about the capita selecta project where the game was extended can be found in our report titled ConvexMerger: Algorithmic Optimisations & Challenges. This report also contains a detailed description of all the visualisations and animations.

Credits

Development

This is an Eclipse + Gradle project with Util as the only dependency. Development work can be done using the Eclipse IDE (already setup) or using any other Gradle compatible IDE (manual setup). CI will check that all source files use Unix style line endings (LF) and that all functions and fields have valid documentation.

History

Project development started: 20th of November, 2021.
Project due date (2IMA25 course): 30th of January, 2022.
Project release (2IMA05 course): 12th of March, 2023.