Skip to content

MoveTest is a work in progress project which allowes to place and move GridElements like moving circles, obstacles, walls or even tanks, turrets and of course projectiles on a grid. The grid itself comes with a full collision- and bouncing-system which detects and handles collision and bouncing GridElements. The tanks and turrets come with a aut…

Notifications You must be signed in to change notification settings

brugalibre/MoveTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

#'MoveTest' is a 'work in progress' project which allowes to place and move GridElements like moving circles, obstacles, walls or even projectiles on a Grid.

Collision Detection

It comes with a full collision- and bouncing-system which detects and handles collision and bouncing GridElements. The collision detector takes the path-segments of all shapes within reach and verifies weather or not there is a collision with the shape of the moved GridElement. With a 'CollisionDetectionHandler' you can define the behavour of a grid in case of a collision. The 'BouncingCollisionDetectionHandlerImpl' e.g. provides a bouncing mecanism whenever two or more GridElements collides with each other.

Evasion-Detection

Detectors and evasion-avoiding systems like the EvasionStateMachine allows any moving GridElement to detect a potential collision with 'avoidable' GridElements and initiat a five stage evasion maneuvre which, in the end, will lead the moveable back on track after successfully avoided a obstacle. The detectors distinguish between detected objects and detected objects which are so close, that they are in potential collision course (evasion). Therefore you can defines detecting distance & angle as well as an evasion distance and angle.

Besides the 'Moveables', which are simply moveable GridElements there is also the EndPointMoveable. It describes a moveable which can be lead from position to position Here an example of such an EndPointMoveable which is lead through a bounch of randomly placed moveable obstacles:

randomendpointmoveableexample

Note that the visualization of the detector can be turned off.

Maze

With the detector cluster, a special kind of a detector, a moveable can even navigate through a maze. A light-barrier at the end indicates that the moving GridElement has successfully reached the end of the maze:

mazeexample

Battlefield

There are also elements like a tank or turret for less peacfull examples.

Turret

The behaviour of a turret is defines by it's strategy. Like this it's possible to distinguish between human- and automated turrets. Thanks to a scanner, a turret can detect, acquire and shoot on enemy targets like obstacles or other tanks and turrets automatically. Evaluating the target position includes also evaluating a lead for moving targets. A turret has gun mounted - either has a bullet or a missile gun.

Missile

The missile is a more intelligent type of a projectile which detect and follows the nearest detected target as soon as it's acquired. Since it's computing a lead for it's target, this usualy takes two cycles.

Tanks

A Tank comes with a 'TankEngine', a 'TankDetector' and a 'TankTurret'. The tank itselfs comes with a own tank-strategy which defines it's behaviour. Those mentioned tank elements can be replaced by different implementation using the builder pattern of the TankBuilder.

Missile-Countermeasure-System

In order to fight a missile, the tank-detector comes now with a 'MissileCounterMeasureSystem' which automatically detects missiles within a certain distance and automatically deploys a set of decoy flares. Those will lead the missile to change it's direction towards those decoy flares.

tankturretexample Tank/turret example with rendering plain awt-shapes

tankturretexample Tank/turret example with images.

Icons made by Smashicons from www.flaticon.com

One of this strategy is a 'human' strategy which allows the user to control the turret by himself (the bunch of blue circles are deployed decoy flares):

human_test

Whats missing

  • Continuous improvement of the collision detection system

About

MoveTest is a work in progress project which allowes to place and move GridElements like moving circles, obstacles, walls or even tanks, turrets and of course projectiles on a grid. The grid itself comes with a full collision- and bouncing-system which detects and handles collision and bouncing GridElements. The tanks and turrets come with a aut…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages