Skip to content

Final project for Coder's lab course. Simple "The incredible machines"-like game made entirely in HTML (Canvas) with JS and CSS (SCSS)

Notifications You must be signed in to change notification settings

Schkar/The_unbelievable_mechanisms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The-unbelievable-mechanisms

Final project for Coder's lab course.


Simple "The incredible machines"-like game made entirely in HTML (Canvas) with JS and CSS (SCSS)

Whole application is written by me, including physics engine (no external libraries used!)

Project finished as in terms of basic functionalities. Still more development is needed. (v.1.0).

https://schkar.github.io/The_unbelievable_mechanisms/


There is only one playable "level" with main functionalities. More to come:

  • rotated objects
  • DONE
  • collisions with rotated objects
  • DONE
  • better gravity
  • DONE
  • mass and force
  • DONE
  • more object types
  • DONE
  • better interactions
  • bigger levels
  • inventory
  • actually playable levels instead of just a show-off

About the project

Game visuals are written in HTML with a slight touch of SCSS.
The whole magic of bouncing, gravity, drawing is done in JavaScript.
JS is responsible, beside timer and button functions, for:
  • drawing things on HTML Canvas element
  • gravity of a moving object
  • collision detection
  • bouncing back

Physics engine

Physics engine was written by carefully reading and trying to apply many tutorials for physics in games development. Most of them didn't work for my case, which I have learned the hard way (after trying to implement them for a couple of days...) There is no external physics library used.
It was amazingly hard for a person without any physical or mathematical background, but, thanks to a couple of readings, I have finally got it working.

Whole development needed a lot of work and, many times, a change of way of thinking, a change of assumptions and, finally, a change of the way how a whole programm is behaving (commits like: "Gravity works!" followed by "Gravity doesn't work" aren't rare).

Credits

For everything that has been done here, I would like to thank countless authors (questioners and answerers, both) on Stack Overflow and on their own blog pages, who helped me grasp a concept of how physics works in games and pointed me to the direction of algorithms, that I, without technical background, never heard of (but now I did!)

I would like to thank my dad who spent countless hours helping me with complicated equation derivations.

I would like to thank colleagues and tutors from Coder's Lab Front End course, who helped me see what was wrong with code, that I thought was fine (that is mainly for you, Ada!)

About

Final project for Coder's lab course. Simple "The incredible machines"-like game made entirely in HTML (Canvas) with JS and CSS (SCSS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages