Skip to content

gmrempe/Aether

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aether

Aether pits the user against 1 to 3 AI players with the goal of taking control of all the circles. Play now

Technologies

  • JavaScript
  • HTML5 Canvas
  • CSS3

Getting Started

Read instructions, change settings or start game

Game Menu Game Menu

Settings Menu Adjust Game Settings

Weapon Animation

Coordinates are grabbed from mousedown and mouseup events and then used to calculate distance with the pythagorean theorem. The distance is then divided by 2 to give a speed for smooth animation. The following picture shows multiple attacks occuring simultaneously.

During Game, Player is blue, weapons are small colored circles Player losing in game

AI targeting

Every game is generated with a randomized map using a random number for x and y coordinates on the canvas, AI players then sort all instances of bases in two arrays, one for their bases and one for target bases. The AI then iterates through both it's own bases and target bases and attacks any base with a number that is less than half the number in the AI's base.

Each AI uses a different attack pattern for targeting.

    attackPatternMedium() {
        this.sortBases();
        for(let j = 0; j < this.myBases.length; j++) {
            for(let i = 0; i < this.targetBases.length; i++) {
                if((this.targetBases[i].counter < (this.myBases[j].counter / 2))) {
                    this.swarm(this.myBases[j], this.targetBases[i])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published