Difference between revisions of "FSOSS 2010/processing.js/"
Line 1: | Line 1: | ||
− | <h3>Game Development Using Processing.js</h3> | + | <h3>Welcome to the Game Development Using Processing.js Workshop</h3> |
<b>Intro (me)</b><br /> | <b>Intro (me)</b><br /> |
Revision as of 21:52, 27 October 2010
Welcome to the Game Development Using Processing.js Workshop
Intro (me)
- Seneca college BSD student
- Research assistant in CDOT
- Related projects: C3DL and XB PointStream
- Wordpress, Twitter
Goals
- Develop a simple 2D or 3D game using in Processing
Processing (aka P5) Processing.org
- Open source data visualization language
- Developed in Java
- "Sketches" written using Java syntax
- Requires a JVM plug-in
- Uses the <object> tag
- Reference
- Bug tracking
Setting up Processing
- Download it here
- Save the .DMG file to the Desktop
- Double-click to extract file
- Drag the Processing icon to the desktop
- Double-click the icon to start
Processing.js (aka PJS) ProcessingJS.org
- Open source JavaScript port of Processing
- Started by John Resig
- Many contributions by Seneca
- Bug Tracking
- Does not require a plug-in
- Uses the <canvas> tag
Lots of IDEs Processing.js IDE HasCanvas SketchPad Sketch.Processing.org My IDE
Setting up Minefield
- Minefield is much faster than Firefox
- Download a working version of Minefield here
- Instructions to enabled WebGL here
Setting up Processing.js
- 3 Files Required
- Processing.js file
- Sketch file
- HTML file
Coordinate system
- size() sets canvas dimensions
- top-left corner [0, 0]
- X increases right
- Y increases downwards
Basics
1 - size, background, rect Example
2 - setup Example
3 - draw, noStroke, ellipse, fill, mousePressed Example
4 - line, stroke, strokeWeight Example
5 - ArrayList Example
Input
6 - mousePressed, mouseReleased, println, debugging with P5 Example
X - keyPressed, keyCode, keyReleased Example
Text & Random
X - text, random Example
X - Exercise
Animation Timing
Timing Example
Vectors & Transfomations
X - Vectors
X - Particle System Example
X - Exercise! Modify the Particle System
7 - transforms, triangle, rect, (point)
3D
X - box Example
X - sphere, sphereDetail Example
X - Vertex, Texture Example
Debugging
println Example
Checking in P5
Error console
DOM Manipulation/Library Integration
DOM Interaction Example
Integration with jQueryUI - Example
Audio Example, Audio Data API Demos
Physics using Box2DJS - Al MacDonald's Demo, 0.1 PJS Crayon Physics
More demos! My PJS Web IDE (Visualizations, Spatial hierarchies, Image manipulation, Particle Systems!)
Games
3D Pong by bmidgley Tower Defense by Will Larson and Peter Burns Core by Andor Salga Light Cycles by Al MacDonald Game of Life by Al MacDonald JS Ninja by Al MacDonald Zelda by Scott Downe
Challenges
Create an empty sketch and try to code a simple game: Pong! Concentration Flying side-scroller Sokoban