8000 GitHub - ayualy8/invader: Java assignment Invader game built using Gradle ٩(ˊᗜˋ*)و
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Java assignment Invader game built using Gradle ٩(ˊᗜˋ*)و

Notifications You must be signed in to change notification settings

ayualy8/invader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

invader ・:..。o♬゚・:..。o♬゚・:..。o♬゚・:..。o♬

꒰(꜆꜄•ω•)꜆꜄꜆ ᵃʳⁱᵍᵅᵗᵒ for visiting my repository!

Invader game built through Gradle Build Tool💓

Gradle Build Tool;

gradlelogo


The collision detection algorithm I implemented might be a bit off( ´•௰•`)

Although, here is a possible alternative; Assume the following variables (r1, r2) have the properties: x, y, width, height.

check_collection(r1, r2):
    if ( r1.x < (r2.x + r2.width) ) and
       ( (r1.x + r1.width) > r2.x ) and
       ( r1.y < (r2.y + r2.height) ) and
       ( (r1.height + r1.y) > r2.y ):
       //Collision has been detected
      return true;
    else:
      return false

also, the tutors' suggested version of the alternative algorithm for animation; assume each entity will contain a list of sprites that can be swapped to.

AnimationData {
  sprites[];
  currentSpriteIndex;
  delay;
  tick() {
    //Action to take on a draw call
    //use information to delay a sprite transition
    //Loop around if index >= length of sprites
  } 
}

※All the java files are in "src" folder (๑•̀ㅂ•́)و✧

ଘ(੭ˊ꒳​ˋ)੭✧ this code was written for the assignment 2 of a course at the University of Sydney.

About

Java assignment Invader game built using Gradle ٩(ˊᗜˋ*)و

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0