Open main menu

CDOT Wiki β

Changes

FSOSS 2010/processing.js/

493 bytes added, 08:29, 28 October 2010
no edit summary
<h3b>Welcome to the Game Development Using Processing.js Workshop!</h3b>
 <b>==Intro (me)</b><br />==
<ul>
<li>Seneca college BSD student</li>
<b>==Goals</b><br />& Schedule==<ul> <li>Develop a simple 2D or 3D game using in Processing</li> <li>9-11 Examples and exercises</li> <li>11-12 Work, experiment, collaborate</li></ul>
<b>==Processing (aka P5)</b> [http://www.Processing.org Processing.org]<br />==
<ul>
<li>[http://www.Processing.org Processing.org]</li>
<li>Open source data visualization language</li>
<li>Developed in Java</li>
<b>===Setting up Processing</b>===
<ul>
<li>Download it [http://www.processing.org/download/ here]</li>
<b>==Processing.js (aka PJS)</b> [http://www.ProcessingJS.org ProcessingJS.org]<br />==
<ul>
<li>[http://www.ProcessingJS.org ProcessingJS.org]</li>
<li>Open source JavaScript port of Processing</li>
<li>Started by John Resig</li>
<li>Does not require a plug-in</li>
<li>Uses the <canvas> tag</li>
<li>Lots of IDEs [http://processingjs.org/learning/ide Processing.js IDE], [http://hascanvas.com/ HasCanvas], [http://sketchpad.cc/ SketchPad], [http://sketch.processing.org/ Sketch.Processing.org], [http://matrix.senecac.on.ca/~asalga/pjswebide/ My IDE]</li>
</ul>
Lots of IDEs
[http://processingjs.org/learning/ide Processing.js IDE]
[http://hascanvas.com/ HasCanvas]
[http://sketchpad.cc/ SketchPad]
[http://sketch.processing.org/ Sketch.Processing.org]
[http://matrix.senecac.on.ca/~asalga/pjswebide/ My IDE]
<b>==Setting up Minefield</b>==
<ul>
<li>Minefield is much Why use it?</li> <li>Much faster than Firefox</li> <li>Has WebGL</li>
<li>Download a working version of Minefield [http://zenit.senecac.on.ca/wiki/index.php/Level_Up:_An_OpenWeb_Game_Jam#Resources here]</li>
<li>Instructions to enabled WebGL [http://www.c3dl.org/index.php/tutorials/tutorial-1-browsers/ here]</li>
<b>==Setting up Processing.js</b><br />==
<ul>
<li>3 Files Required</li>
<b>Coordinate system</b><br /><ul> <li>size() sets canvas dimensions</li> <li> top-left corner [0, 0]</li> <li> X increases right</li> <li> Y increases downwards</li> </ul>==Examples & Exercises==
===Basics===
size, background, rect [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example1 Example]
<b>Basics</b> 1 - size, background, rect setup [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example1 example2 Example]
2 - setup draw, noStroke, ellipse, fill, mousePressed [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example2 example3 Example]
3 - drawline, noStrokestroke, ellipse, fill, mousePressed strokeWeight [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example3 example4 Example]
4 - line, stroke, strokeWeight ArrayList [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example4 example5 Example]
===Input=== 5 - ArrayList mousePressed, mouseReleased, println, debugging with P5 [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example5 example6 Example]
<b>Input</b> 6 - mousePressed, mouseReleasedkeyPressed, printlnkeyCode, debugging with P5 keyReleased [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example6 example9 Example]
X - keyPressed, keyCode, keyReleased [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/example9 Example]
===Text & Random===
text, random [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/randomText Example]
<b>Text & Random</b> X - text, random [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/randomText Example]  X - [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/randomShapes Exercise]
<b>Animation Timing</b>
<b>Vectors & TransfomationsTransformations</b> X - [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/vectors Vectors]
X - Particle System [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/psys1 Examplevector_ex Vector Exercise]
X - <b>Exercise!</b> Modify the Particle System[http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/psys1 Example]
7 - transforms, triangle, rect, (point)<b>Exercise!</b> Modify the Particle System
[http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/transforms Transformations]
<b>3D< [http:/b>/zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/transforms_ex Transform Exercise]
X - box [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/box1 Example]
X - sphere, sphereDetail [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/sphere1 Example]===3D===
X - Vertex, Texture box [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/texture1 box1 Example]
<b> sphere, sphereDetail [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/sphere1 Example]  Vertex, Texture [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/texture1 Example] ===Debugging</b>===
println [http://zenit.senecac.on.ca/wiki/index.php/FSOSS_2010/processing.js/debugging1 Example]
Error console
<b>===DOM Manipulation/Library Integration</b>===
DOM Interaction [http://studio.sketchpad.cc/Qbm0fYDiTE Example]
More demos! [http://matrix.senecac.on.ca/~asalga/pjswebide/ My PJS Web IDE] ([http://matrix.senecac.on.ca/~asalga/pjswebide/index.php?sketchID=31 Visualizations], [http://matrix.senecac.on.ca/~asalga/pjswebide/index.php?sketchID=20 Spatial hierarchies], [http://matrix.senecac.on.ca/~asalga/pjswebide/index.php?sketchID=30 Image manipulation], [http://matrix.senecac.on.ca/~asalga/pjswebide/index.php?sketchID=33 Particle Systems!])
<b>==Sample Games==Here are some Processing.js games and prototypes to give you an idea what is possible<br /b> [http://pointmarker.com/webgl/test1b.html 3D Pong] by bmidgley<br /> [http://ptdef.com/ Tower Defense] by Will Larson and Peter Burns<br /> [http://matrix.senecac.on.ca/~asalga/pjswebide/index.php?sketchID=32 Core] by Andor Salga<br /> [http://bocoup.com/processing-js/docs/index.php?page=Game%20-%20Light%20Cycles Light Cycles] by Al MacDonald<br /> [http://processingjs.org/learning/topic/conway Game of Life] by Al MacDonald<br /> [http://code.bocoup.com/js-ninja/ JS Ninja] by Al MacDonald<br /> [http://matrix.senecac.on.ca/~asalga/FSOSS2010/zelda/zelda-js.html Zelda] by Scott Downe<br /> ==Challenges==Create an empty sketch and try to code a simple game:<br />Pong!<br />[http://www.concntr8.com/ Concentration]<br />Flying side-scroller<br />[http://en.wikipedia.org/wiki/Sokoban Sokoban]<br />
==Gotchas==<bul>Challenges</bli> Create an empty sketch and try to code a simple game: Pong! [http:Integer/Integer division println(5/www2) v.s.concntr8println(5/2.com0)</ Concentration]li> Flying side-scroller<li>NPOT (Non Power of Two) textures will not load in 3D</li> [http:<li>color does not use <b>new</b></en.wikipedia.orgli></wiki/Sokoban Sokoban]ul>
1
edit