/Endless-Maze

A browser-based game that generates Maze on the fly with never-ending levels ๐ŸŽฎ

Primary LanguageJavaScript

Endless Maze ๐ŸŽฎ

Check it out here!

Overview ๐Ÿ‘€

Browser based game that generates Maze on the fly with never ending levels and incresed complexity in each level

  • WASD Controls ๐Ÿ•น
  • Endless Levels ๐Ÿ˜ต
  • Increasing Complexity with each level ๐Ÿ˜ฒ

Role of Matter.js ๐Ÿค”

  • This library helps in handling all the canvas manipulation which would be more difficult to do with default methods

  • One good thing about this library is providing collisions by defaults to every body created in the game world and does most of the heavy lifting for the detection

  • one thing to remember is Simulating Physics in computational world is very hard and Matter.js does a pretty good job coming very close to real physics

WIP ๐Ÿ› 

  • Mobile Version (making html canvas responsive is nightmare ๐Ÿ˜–)

Sidenote ๐Ÿ“„

  • The reason i stated Matter.js very close to real physics is due to its problem of not having CCD (Continous collision detection) built to its core, which tends to famous physics phenomenon Tunnelling where a body accquires enough velocity that it can pass through the rigid bodies.

  • This can be seen sometimes during gameplay of Endless-Maze when user does long press for a movement key, the velocity keeps adding to the ball and eventually pass through the walls.

  • I have done some workaround to this problem which minimizes the velocity in a nasty way, it dosen't totally removes this problem but somewhat reduces it.

  • This issue cant be resolved until CCD is built into Matter.js

  • On more info on how CCD solves this problem visit here

How To Contribute๐Ÿค

I would recommend you to get familar with the test\index2.js before you start learning the maze generation algorithm and also a piror knowledge on Matter.js should be necessary in order to understand the logic code

whole project took ~16hr to complete from learn to deploy

  • Yes,it is open source you can clone and change code to your need.
  • Most of the code is self explanatory, anyhow
  • for any clarification on code or want to contribute contact
  • Gmail / Twitter /LinkedIn