Object-Oriented Programming (OOP) for Game Development with p5.js by Juan Olaya
For this course we use the JavaScript library p5.js and its Java version Processing.
The following are the course steps:
- Step 1: One Instance + Function move right
- Step 2: Two Instances + Functions move right/left
- Step 3: Multiple Instances + ArrayList + Functions move right/left
- Step 4: Multiple Instances + ArrayList + Functions move right/left + Rebound Function
- Step 5: Multiple Instances + ArrayList + Rebound Function + Location Vector + Multiple Constructors
- Step 6: Multiple Instances + ArrayList + Rebound Function + Velocity Vector + Gravity Vector
- Coding Challenge 1: Class Car showing a X
- Coding Challenge 2: Class Node showing a network
One Instance + Function move right. Download Class Car.
Two Instances + Functions move right/left.
Multiple Instances + ArrayList + Functions move right/left.
Rebound Function + Multiple Constructors + Multiple Instances + ArrayList + Functions move right/left.
Multiple instances of the Class Car shaping a X
Location Vector + Rebound Function + Multiple Constructors + Multiple Instances + ArrayList.
Velocity Vector + Gravity Vector + Rebound Function + Multiple Instances + ArrayList.
Rotate
Multiple instances of the Class Node showing a dynamic network
Multiple instances of the Class Point showing a dynamic network
The abstract Class Shape (superclass) extending the following concrete classes (subclasses): Class Circle, Class Square and Class Triangle
We use p5js and OOP in LiveCoding using the tool Hydra of Olivia Jackson. Hydra is available as a package of the code editor Atom or online on the web editor. Download the JavaScript OOP code
To see and interact online with the sketches made by the students, you can visit the following classes on OpenProcessing:
- Object-Oriented Programming (2018.2)
- Object-Oriented Programming (2018.1)
- Object-Oriented Programming (2017.2)
- Computer Graphics (2017.2)
- Computer Graphics (2017.1)
- Computer Graphics (2016.2)
For more examples, visit OpenProcessing - Juan Olaya
- Object-Oriented JavaScript - Third Edition
- ECMAScript 6
- ECMAScript 2015 - Español
- Abstract Methods and Classes
- Abstract and Concrete Classes
- A guide to prototype-based class inheritance in JavaScript
- A basic introduction to JavaScript variable definitions and hoisting
- Algorithm Visualizer
- JavaScript Visualizer 9000