Welcome!
This course is designed to people who already has some knowledge on programming and/or JavaScript. In case you don’t have this knowledge or you wish to get deep into this programming language, we recommend the online course at javascript.info, where you will learn from the beginning and in a simple way, this language.
Making games in canvas is simple and does not require any specialized or expensive software, you can edit the files with any text editor such as MS Notepad. Even so, we recommend using Visual Studio Code, as it’s advanced features like color highlight syntax, autocomplete suggestions and potential error detection, helps to better read codes and make less mistakes. You can download it at code.visualstudio.com.
Now with these tools, you are ready to make your own games!
Index
My first game
- 1.1. Drawing in the canvas.
- 1.2. Animating the canvas.
- 1.3. Using the keyboard.
- 1.4. Interaction with other elements.
- 1.5. Interaction with several alike elements.
- 1.6. The snake game.
- 1.7. Optimization for JavaScript.
- Appendix 1: RequestAnimationFrame.
- Appendix 2: RequestAnimationFrame: Consistent time among devices.
- Appendix 3: Object oriented programming.
- Appendix 4: JavaScript compatibility with old browsers.