Skip to content

dbmikus/mr-driller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mr. Driller

Mr. Driller

Instructions

In Mr. Driller, it is your objective to drill as many blocks as possible. Arrow keys move Mr. Driller and change the direction that he drills in. Space bar drills in whichever direction Mr. Driller's drill is facing.

Blocks of the same color will connect and form groups, which fall together and are drilled together. There are two types of special blocks:

  • air blocks
  • durable blocks

Mr. Driller has a dwindling air supply, so to continue drilling, he must collect air blocks. Durable blocks require three hits to drill through and, when drilled through, they deplete 20% of your air supply.

If a block falls on Mr. Driller or if he runs out of air, he loses a life. Mr. Driller has three lives, and when tthey are gone, it's game over.

Ideas Used from Class

We made use of only HTML5 canvas and Javascript. We used object oriented programming to make Driller and Block objects with their own fields and methods. However, we avoided object prototyping and inheritance.

We used keyboard event handling and a timer events to control logic for falling blocks and redrawing of the canvas.

We used closures in some cases to make code more compact and concise. We used recursion! YEAH!

We used optional parameters for some functions, allowing function overloading.

Releases

No releases published

Packages

No packages published