JS Breakout Part 2 (Responsive Design and Touch Events)
Mt. Ford Studios
In the second part of this JavaScript tutorial to recreate the 1976 game, Breakout, we slightly redesign our code to handle multiple screen dimensions, that is, we create a responsive design! This allows our game to fill the device’s screen and modifies the game components to suit. We also add touch events so that our game can be played on mobile devices! Just as a note, there is a bug in the code shown in the video. In the third event listener, "touchMove" should be changed to "touchmove" (all lowercase).
If you’d like to learn how to program a browser-based game in JavaScript, please feel free to download the code below!
CODE Breakout Part 2 (Responsive Design and Touch Events): https://drive.google.com/open?id=1aLugaNR2NrxV7wJTIDJ6aNw9WNTSr9_t
USEFUL LINKS Firefox Responsive Design Mode: https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode “resize” Event https://www.w3schools.com/jsref/event_onresize.asp Touch Events: https://developer.mozilla.org/en-US/docs/Web/API/Touch_events Visual Studio Code: https://code.visualstudio.com/
FIND US ON FACEBOOK https://www.facebook.com/MountfordStudios/ ... https://www.youtube.com/watch?v=gwYtacVlP-8
40428040 Bytes