SlideShare una empresa de Scribd logo
1 de 75
Descargar para leer sin conexión
LFU - 12. October 2014 - Ljubljana - KCQ
Ada 
Lovelace 
L. F. Menabrea: Sketch of The Analytical Engine Invented 
by Charles Babbage Note G
Have the courage 
to try. You can 
make amazing 
things happen. 
Megan Smith, U.S. CTO, former VP of Google[x] 
Photo: Taylor Hill/FilmMagic for
Source Code 
Original: https://github.com/andrea-3000/TAMPON-RUN 
Workshop Copy: https://github.com/princessdesign/TAMPON-RUN
Building Blocks 
● HTML 
● CSS 
● JavaScript 
○ Processing.js http://processingjs.org/ 
○ Buzz a Javascript HTML5 Audio library http://buzz.jaysalvat.com/ 
● Images, music
Avatars / Images
Navigation with Keys 
● RIGHT: 39 // forward 
● LEFT: 37 // back 
● M: 77 // mute 
● SHIFT: 16 // begin 
● SPACE: 32 // throw tampon 
● UP: 38 // jump 
● P: 80 // pause 
● S: 83 // restart
Music 
● beethovenSound 
● jumpSound 
● tamponSound 
● gameOverSound 
● ouchSound 
● shootSound
Let’s make our own game...
Play the game for the next 
5 minutes and make a list 
of things you would like 
to change.
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
TODO
DOABLE TODAY 
● ____________ 
● ____________ 
● ____________ 
● ____________ 
● ____________
What can we ‘easily’ 
change? 
● Skip intro and go directly to the game 
● Navigation keys 
● Initial number of tampons 
● Number of tampons in the pack 
● Color of tampons 
● Avatar of the enemy 
● Animations 
● Background color 
● Ground color 
● Cloud color 
● Image of the lamppost 
● Change lamppost into another object 
● The height of the jump 
● Larger canvas with the game 
● Change Intro Images (Translate) 
● Change sounds 
● ...
Let’s do it...
index.html
<html> 
<head> 
<title>Tampon Run!</title> 
<style type="text/css"> 
/* CSS CODE for STYLE */ 
</style> 
<script src="lib/processing-1.4.1.min.js"></script> 
<script src="lib/buzz.min.js" type="text/javascript"></script> 
<script type="text/processing" data-processing-target="creators"> 
// JAVASCRIPT CODE (creators canvas) 
</script> 
<script type="text/processing" data-processing-target="mycanvas"> 
/* JAVASCRIPT 
CODE FOR THE GAME (mycanvas canvas) */ 
</script> 
</head> 
<body> 
<canvas id="creators"></canvas> 
<canvas id="mycanvas"></canvas> 
</body> 
</html>
for loop 
for(var count=0; count<10; count++){ 
console.log(count); 
}JavaScript Basics
brackets.io
Comments 
for loop 
// Hi, my name is comment 
for(var count=0; count<10; count++){ 
console.log(count); 
/* 
} 
I am comment too. 
I can take more space. 
*/
for test.html 
loop 
<html> 
for(var count=0; count<10; count++){ 
console.log(count); 
} 
<head> 
<script> 
console.log("JavaScript"); 
</script> 
</head> 
<body> 
</body> 
</html>
Google Chrome Console
Numbers 
for loop 
14 
1+1 
5-2 
32*3 
829/3 
5%4 
for(var count=0; count<10; count++){ 
console.log(count); 
}
Strings 
"Ada" 
"Lovelace" 
"Ada".length 
"Lovelace".length 
for loop 
for(var count=0; count<10; count++){ 
console.log(count); 
}
Boolean 
for loop 
true 
false 
1<2 
for(var count=0; count<10; count++){ 
console.log(count); 
}
Variables 
for loop 
var score = 0; // number 
score; 
console.log(score); 
for(var count=0; count<10; count++){ 
console.log(count); 
} 
var muted = false; // boolean 
var feedback = "I feel awesome";
Arrays 
for loop 
var lampList = []; 
for(var count=0; count<10; count++){ 
var console.tampons log(= ["count); 
red", "green", "blue"]; 
var } 
first = tampons[0]; 
console.log(first); 
console.log(tampons[0]);
Functions 
for loop 
confirm("I feel awesome!"); 
for(var count=0; count<10; count++){ 
console.log(count); 
prompt("What is your name?"); 
} 
console.log("What is your name?");
Functions 
for loop 
var sayHello = function(name) { 
for(var count=0; count<10; count++){ 
console.log(count); 
} 
console.log("Hello" + " " + name); 
}; 
sayHello("Maja");
Functions / Methods 
for loop 
void pauseSound(soundToPlay) { 
for(var count=0; count<10; count++){ 
console.log(count); 
} 
soundToPlay.pause() 
}
if sentence 
for loop 
var x = 1; 
if ( x == 1) { 
for(var count=0; count<10; count++){ 
console.log(count); 
} 
console.log("x equals 1"); 
}
if sentence 
for loop 
var x = 4; 
if ( x !== 1) { 
console.log("x doesn’t equal 1"); 
} 
for(var count=0; count<10; count++){ 
console.log(count); 
}
if for else 
loop 
var key = "left"; 
for(var count=0; count<10; count++){ 
if (key == "up" ){ 
console.log(count); 
} 
console.log("Key is up."); 
} else { 
console.log("Some key."); 
}
if for & loop 
else if & else 
var key = "left"; 
for(var count=0; count<10; count++){ 
if (key == "right" ) { 
console.log(count); 
} 
console.log("Key is right."); 
} else if (key == "up" ){ 
console.log("Key is up."); 
} else { 
console.log("Some key."); 
}
for loop 
for(var count=0; count<100; count++){ 
console.log(count); 
}
for loop 
towns = ["LJ", "MB", "KR", "NM", "KP", "GO", "KR"]; 
for(var i=0; i<towns.length; i++){ 
document.write(towns[i]); 
document.write("<br />") 
}
Classes and objects 
Animation 
GameState 
Lamppost 
LampFactory 
Cloud 
CloudFactory 
Gun 
Ammo 
BuildingFactory 
EnemyFactory 
DuaneReade 
Building 
Player 
Enemy 
Tampon
class Tampon { 
var xTamp; 
var yTamp; 
var tampSpeed; 
var randFR; 
Animation tampPic; 
var h; 
var w; 
Tampon() { 
xTamp = 750; 
yTamp = 250; 
tampSpeed = -2; 
randFR = Math.floor((Math.random() * 20) + 8); 
tampPic = new Animation("tampz", 2, randFR); 
h = tampPic.getHeight(); 
w = tampPic.getWidth(); 
} 
void showTamp() { 
tampPic.display(xTamp, yTamp); 
} 
void moveTamp() { 
xTamp = xTamp + tampSpeed; 
} 
void releaseTamp() { 
yTamp = yTamp + tampSpeed; 
} 
} 
class DuaneReade { 
var tamponList; 
DuaneReade() { 
tamponList = []; 
} 
void animate() { 
var willItBlend = Math.floor((Math.random() * 500) + 1); 
if (willItBlend == 50) { 
tamponList.push(new Tampon()); 
} 
showTamponList(); 
moveTamponList(); 
removeTampon(); 
reloadTampon(); 
} 
// MORE CODE... 
}
Methods 
play(soundToPlay) 
pauseSound(SoundToPlay) 
setup() 
draw() 
keyPressed() 
keyReleased()
Remember what you wanted 
to change in the game?
What can we ‘easily’ 
change? 
● Skip intro and go directly to the game 
● Navigation keys 
● Initial number of tampons 
● Number of tampons in the pack 
● Color of tampons 
● Avatar of the enemy 
● Animations 
● Background color 
● Ground color 
● Cloud color 
● Image of the lamppost 
● Change lamppost into another object 
● The height of the jump 
● Larger canvas with the game 
● Change Intro Images (Translate) 
● Change sounds 
● ...
Skip intro 
HINT: If you are on the first page (0: home) press SHIFT (key 16) and go to the game 
page (3: game play) 
if (keyCode == 16 && state.page==0){ 
state.page = 1; // change to 3 
Why is sound not playing?
Change navigation keys 
if (keyCode == 77) 
if (keyCode == 39) 
if (keyCode == 16) 
if (keyCode == 83) 
if (keyCode == 38) 
SPACE: 32 // throw tampon 
RIGHT: 39 // forward 
LEFT: 37 // back 
M: 77 // mute 
SHIFT: 16 // begin 
UP: 38 // jump 
P: 80 // pause 
S: 83 // restart 
TASK: Change the code so that you will be able to play the game with one hand!
Change the number of 
initial tampons 
HINT: find where the number is defined and change it 
//player variables 
var tampon = 10; //50 
TASK: What happens if we restart the game (S)? Fix it! 
HINT: Find where the conditions are end screen (4) and key S (83).
Change the number of 
tampons in the pack 
HINT: Find where the number is defined and change it 
tampon = tampon + 5 // 50
Change intro images 
statementOne = loadImage("res/statementOne0000.png"); 
statementTwo = loadImage("res/statementTwo0000.png"); 
statementThree = loadImage("res/statementThree0000.png"); 
statementFour = loadImage("res/statementFour0000.png"); 
statementFive = loadImage("res/statementFive0000.png"); 
instructOne = loadImage("res/learn0000.png"); 
pausePage = loadImage("res/pause0000.png");
Color of tampons 
TASK: Open images in image 
editor and change the color. 
● ammo…png 4x 
● attack…png 2x
New enemy 
enemies = new EnemyFactory("eWalk", 1); 
/* change to swat and play the game */ 
eWalk swat 
TASK: Now try to build your own.
Animations 
Animation title; 
title = new Animation("title", 2, 20); 
Animation girlIntro; 
girlIntro = new Animation("walk",2,5);
Background coloor 
void startGame() { 
background(100); 
/* 
background(255,255,0); //yellow (red, green and blue 0-255) 
color yellow = color(255,252, 25); 
color red = color(178,18,18); 
color orange = color(255,83, 13); 
color blue = color(9, 113, 178); 
color pink = color(255, 182, 193); 
*/
Ground color 
void showBuilding() { 
fill(0); // color name or number(s) 
/* 
background(255,255,0); //yellow (red, green and blue 0-255) 
color yellow = color(255,252, 25); 
color red = color(178,18,18); 
color orange = color(255,83, 13); 
color blue = color(9, 113, 178); 
color pink = color(255, 182, 193); 
*/
Change the cloud color 
void showCloud() { 
fill(255); 
fill(0); // black or 
// (0,0,0) (red, green and blue 0-255)
Change the cloud color 
Gray clouds (uncomment c and add c to fill()) 
c = Math.floor((Math.random() * 255) + 1); 
} 
void showCloud() { 
fill(c);
Change the cloud color 
Color clouds 
r = Math.floor((Math.random() * 255) + 1); 
g = Math.floor((Math.random() * 255) + 1); 
b = Math.floor((Math.random() * 255) + 1); 
} 
void showCloud() { 
fill(r,g,b);
Image of lamppost 
TASK: Open the image 
lamppost0000.png in Image editor 
and change it.
Height of the jump 
jumpHeight = 200; 
/* 
jumpHeight = 100; // higher 
jumpHeight = 300; // lower 
*/
Larger game canvas 
var CANVAS_HEIGHT = 500; // 700 
var CANVAS_WIDTH = 700; // 1200
Change sounds 
var jumpSound = new buzz.sound("res/sound/jumpSound", {formats: ["ogg", "mp3"]}); 
var tamponSound = new buzz.sound("res/sound/tamponSound", {formats: ["ogg", "mp3"]}); 
var gameOverSound = new buzz.sound("res/sound/gameOverSound", {formats: ["ogg", "mp3"]}); 
var beethovenSound = new buzz.sound("res/sound/beethovenSound", {formats: ["ogg", "mp3"]}); 
var ouchSound = new buzz.sound("res/sound/ouchSound", {formats: ["ogg", "mp3"]}); 
var shootSound = new buzz.sound("res/sound/shootSound", {formats: ["ogg", "mp3"]});
You can leave behind the old 
regressive sexist 
representations and 
instead create interactive 
experiences that portray 
women as capable, complex 
and inspirational. 
Anita Sarkeesian, Feminist Frequency
JAVASCRIPT REFERENCE 
http://learnxinyminutes.com/docs/javascript/ 
http://www.codecademy.com/glossary/javascript 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide 
TUTORIALS 
http://www.codecademy.com/tracks/javascript 
https://www.khanacademy.org/computing/cs
PROCESSINGJS REFERENCE 
http://processingjs.org/reference/
Contact: 
https://www.facebook.com/princessdesignnet 
https://twitter.com/princessdesign

Más contenido relacionado

La actualidad más candente

The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184Mahmoud Samir Fayed
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
 
Gdc09 Minipong
Gdc09 MinipongGdc09 Minipong
Gdc09 MinipongSusan Gold
 
How fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practiceHow fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practiceTobias Pfeiffer
 
Communities - Perl edition (RioJS)
Communities - Perl edition (RioJS)Communities - Perl edition (RioJS)
Communities - Perl edition (RioJS)garux
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveEleanor McHugh
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swiftChiwon Song
 
ECMAScript 6 new features
ECMAScript 6 new featuresECMAScript 6 new features
ECMAScript 6 new featuresGephenSG
 
Go Containers
Go ContainersGo Containers
Go Containersjgrahamc
 
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)Shift Conference
 
Concurrent Application Development using Scala
Concurrent Application Development using ScalaConcurrent Application Development using Scala
Concurrent Application Development using ScalaSiarhiej Siemianchuk
 
The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210Mahmoud Samir Fayed
 
Javascript - The basics
Javascript - The basicsJavascript - The basics
Javascript - The basicsBruno Paulino
 
Snickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media EncodingSnickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media EncodingFlávio Ribeiro
 
Elixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII SorocabaElixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII SorocabaFabio Akita
 

La actualidad más candente (20)

The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88The Ring programming language version 1.3 book - Part 36 of 88
The Ring programming language version 1.3 book - Part 36 of 88
 
The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184The Ring programming language version 1.5.3 book - Part 46 of 184
The Ring programming language version 1.5.3 book - Part 46 of 184
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
 
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicitElixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
 
Gdc09 Minipong
Gdc09 MinipongGdc09 Minipong
Gdc09 Minipong
 
dplyr
dplyrdplyr
dplyr
 
How fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practiceHow fast ist it really? Benchmarking in practice
How fast ist it really? Benchmarking in practice
 
Communities - Perl edition (RioJS)
Communities - Perl edition (RioJS)Communities - Perl edition (RioJS)
Communities - Perl edition (RioJS)
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's Perspective
 
20191116 custom operators in swift
20191116 custom operators in swift20191116 custom operators in swift
20191116 custom operators in swift
 
ECMAScript 6 new features
ECMAScript 6 new featuresECMAScript 6 new features
ECMAScript 6 new features
 
Go Containers
Go ContainersGo Containers
Go Containers
 
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)
A, B, C. 1, 2, 3. Iterables you and me - Willian Martins (ebay)
 
Concurrent Application Development using Scala
Concurrent Application Development using ScalaConcurrent Application Development using Scala
Concurrent Application Development using Scala
 
The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210
 
New
NewNew
New
 
Javascript - The basics
Javascript - The basicsJavascript - The basics
Javascript - The basics
 
Snickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media EncodingSnickers: Open Source HTTP API for Media Encoding
Snickers: Open Source HTTP API for Media Encoding
 
Elixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII SorocabaElixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
Elixir - Tolerância a Falhas para Adultos - Secot VIII Sorocaba
 

Similar a [EN] Ada Lovelace Day 2014 - Tampon run

SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parserkamaelian
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212Mahmoud Samir Fayed
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to CodingFabio506452
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
An Intro To ES6
An Intro To ES6An Intro To ES6
An Intro To ES6FITC
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Paulo Morgado
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick touraztack
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupBadoo Development
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeLaurence Svekis ✔
 
Implementing Software Machines in C and Go
Implementing Software Machines in C and GoImplementing Software Machines in C and Go
Implementing Software Machines in C and GoEleanor McHugh
 

Similar a [EN] Ada Lovelace Day 2014 - Tampon run (20)

Music as data
Music as dataMusic as data
Music as data
 
SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parser
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Basics
BasicsBasics
Basics
 
Pygame presentation
Pygame presentationPygame presentation
Pygame presentation
 
Introduction to Groovy
Introduction to GroovyIntroduction to Groovy
Introduction to Groovy
 
An Intro To ES6
An Intro To ES6An Intro To ES6
An Intro To ES6
 
Groovy
GroovyGroovy
Groovy
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick tour
 
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang MeetupДоклад Антона Поварова "Go in Badoo" с Golang Meetup
Доклад Антона Поварова "Go in Badoo" с Golang Meetup
 
Scala 2 + 2 > 4
Scala 2 + 2 > 4Scala 2 + 2 > 4
Scala 2 + 2 > 4
 
Java script
Java scriptJava script
Java script
 
ES6, WTF?
ES6, WTF?ES6, WTF?
ES6, WTF?
 
Sbaw090623
Sbaw090623Sbaw090623
Sbaw090623
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
 
Implementing Software Machines in C and Go
Implementing Software Machines in C and GoImplementing Software Machines in C and Go
Implementing Software Machines in C and Go
 

Más de Maja Kraljič

MozFest London 2019 - Feminist internet and feminist principles of the internet
MozFest London 2019  - Feminist internet and feminist principles of the internetMozFest London 2019  - Feminist internet and feminist principles of the internet
MozFest London 2019 - Feminist internet and feminist principles of the internetMaja Kraljič
 
Safer Online Communication
Safer Online CommunicationSafer Online Communication
Safer Online CommunicationMaja Kraljič
 
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018Maja Kraljič
 
Tech workshops at Lesbian-Feminist University
Tech workshops at Lesbian-Feminist UniversityTech workshops at Lesbian-Feminist University
Tech workshops at Lesbian-Feminist UniversityMaja Kraljič
 
Ubuntu 18.04 Bionic Beaver Installation Party
Ubuntu 18.04 Bionic Beaver Installation PartyUbuntu 18.04 Bionic Beaver Installation Party
Ubuntu 18.04 Bionic Beaver Installation PartyMaja Kraljič
 
Prižiganje lučk z Arduinom
Prižiganje lučk z ArduinomPrižiganje lučk z Arduinom
Prižiganje lučk z ArduinomMaja Kraljič
 
Ada Lovelace Day 2017
Ada Lovelace Day 2017Ada Lovelace Day 2017
Ada Lovelace Day 2017Maja Kraljič
 
Get to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuGet to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuMaja Kraljič
 
Ada Lovelace Day 2015 - Privacy in the Age of Surveillance
Ada Lovelace Day 2015 - Privacy in the Age of SurveillanceAda Lovelace Day 2015 - Privacy in the Age of Surveillance
Ada Lovelace Day 2015 - Privacy in the Age of SurveillanceMaja Kraljič
 
Master Blender Shortcuts
Master Blender ShortcutsMaster Blender Shortcuts
Master Blender ShortcutsMaja Kraljič
 
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnoveMaja Kraljič
 

Más de Maja Kraljič (11)

MozFest London 2019 - Feminist internet and feminist principles of the internet
MozFest London 2019  - Feminist internet and feminist principles of the internetMozFest London 2019  - Feminist internet and feminist principles of the internet
MozFest London 2019 - Feminist internet and feminist principles of the internet
 
Safer Online Communication
Safer Online CommunicationSafer Online Communication
Safer Online Communication
 
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018
Feminist Principles of the Internet - Lesbians Who Tech London Summit 2018
 
Tech workshops at Lesbian-Feminist University
Tech workshops at Lesbian-Feminist UniversityTech workshops at Lesbian-Feminist University
Tech workshops at Lesbian-Feminist University
 
Ubuntu 18.04 Bionic Beaver Installation Party
Ubuntu 18.04 Bionic Beaver Installation PartyUbuntu 18.04 Bionic Beaver Installation Party
Ubuntu 18.04 Bionic Beaver Installation Party
 
Prižiganje lučk z Arduinom
Prižiganje lučk z ArduinomPrižiganje lučk z Arduinom
Prižiganje lučk z Arduinom
 
Ada Lovelace Day 2017
Ada Lovelace Day 2017Ada Lovelace Day 2017
Ada Lovelace Day 2017
 
Get to know linux - First steps with Ubuntu
Get to know linux - First steps with UbuntuGet to know linux - First steps with Ubuntu
Get to know linux - First steps with Ubuntu
 
Ada Lovelace Day 2015 - Privacy in the Age of Surveillance
Ada Lovelace Day 2015 - Privacy in the Age of SurveillanceAda Lovelace Day 2015 - Privacy in the Age of Surveillance
Ada Lovelace Day 2015 - Privacy in the Age of Surveillance
 
Master Blender Shortcuts
Master Blender ShortcutsMaster Blender Shortcuts
Master Blender Shortcuts
 
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove
[SI] Kako prijeti WordPress za roge? - Delavnica Wordpress osnove
 

Último

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Último (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

[EN] Ada Lovelace Day 2014 - Tampon run

  • 1. LFU - 12. October 2014 - Ljubljana - KCQ
  • 2. Ada Lovelace L. F. Menabrea: Sketch of The Analytical Engine Invented by Charles Babbage Note G
  • 3.
  • 4. Have the courage to try. You can make amazing things happen. Megan Smith, U.S. CTO, former VP of Google[x] Photo: Taylor Hill/FilmMagic for
  • 5.
  • 6.
  • 7.
  • 8. Source Code Original: https://github.com/andrea-3000/TAMPON-RUN Workshop Copy: https://github.com/princessdesign/TAMPON-RUN
  • 9. Building Blocks ● HTML ● CSS ● JavaScript ○ Processing.js http://processingjs.org/ ○ Buzz a Javascript HTML5 Audio library http://buzz.jaysalvat.com/ ● Images, music
  • 11. Navigation with Keys ● RIGHT: 39 // forward ● LEFT: 37 // back ● M: 77 // mute ● SHIFT: 16 // begin ● SPACE: 32 // throw tampon ● UP: 38 // jump ● P: 80 // pause ● S: 83 // restart
  • 12. Music ● beethovenSound ● jumpSound ● tamponSound ● gameOverSound ● ouchSound ● shootSound
  • 13. Let’s make our own game...
  • 14. Play the game for the next 5 minutes and make a list of things you would like to change.
  • 15. ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ ● ____________ TODO
  • 16. DOABLE TODAY ● ____________ ● ____________ ● ____________ ● ____________ ● ____________
  • 17. What can we ‘easily’ change? ● Skip intro and go directly to the game ● Navigation keys ● Initial number of tampons ● Number of tampons in the pack ● Color of tampons ● Avatar of the enemy ● Animations ● Background color ● Ground color ● Cloud color ● Image of the lamppost ● Change lamppost into another object ● The height of the jump ● Larger canvas with the game ● Change Intro Images (Translate) ● Change sounds ● ...
  • 19.
  • 20.
  • 22. <html> <head> <title>Tampon Run!</title> <style type="text/css"> /* CSS CODE for STYLE */ </style> <script src="lib/processing-1.4.1.min.js"></script> <script src="lib/buzz.min.js" type="text/javascript"></script> <script type="text/processing" data-processing-target="creators"> // JAVASCRIPT CODE (creators canvas) </script> <script type="text/processing" data-processing-target="mycanvas"> /* JAVASCRIPT CODE FOR THE GAME (mycanvas canvas) */ </script> </head> <body> <canvas id="creators"></canvas> <canvas id="mycanvas"></canvas> </body> </html>
  • 23. for loop for(var count=0; count<10; count++){ console.log(count); }JavaScript Basics
  • 25.
  • 26. Comments for loop // Hi, my name is comment for(var count=0; count<10; count++){ console.log(count); /* } I am comment too. I can take more space. */
  • 27. for test.html loop <html> for(var count=0; count<10; count++){ console.log(count); } <head> <script> console.log("JavaScript"); </script> </head> <body> </body> </html>
  • 29. Numbers for loop 14 1+1 5-2 32*3 829/3 5%4 for(var count=0; count<10; count++){ console.log(count); }
  • 30. Strings "Ada" "Lovelace" "Ada".length "Lovelace".length for loop for(var count=0; count<10; count++){ console.log(count); }
  • 31.
  • 32. Boolean for loop true false 1<2 for(var count=0; count<10; count++){ console.log(count); }
  • 33. Variables for loop var score = 0; // number score; console.log(score); for(var count=0; count<10; count++){ console.log(count); } var muted = false; // boolean var feedback = "I feel awesome";
  • 34. Arrays for loop var lampList = []; for(var count=0; count<10; count++){ var console.tampons log(= ["count); red", "green", "blue"]; var } first = tampons[0]; console.log(first); console.log(tampons[0]);
  • 35.
  • 36. Functions for loop confirm("I feel awesome!"); for(var count=0; count<10; count++){ console.log(count); prompt("What is your name?"); } console.log("What is your name?");
  • 37. Functions for loop var sayHello = function(name) { for(var count=0; count<10; count++){ console.log(count); } console.log("Hello" + " " + name); }; sayHello("Maja");
  • 38. Functions / Methods for loop void pauseSound(soundToPlay) { for(var count=0; count<10; count++){ console.log(count); } soundToPlay.pause() }
  • 39.
  • 40. if sentence for loop var x = 1; if ( x == 1) { for(var count=0; count<10; count++){ console.log(count); } console.log("x equals 1"); }
  • 41.
  • 42. if sentence for loop var x = 4; if ( x !== 1) { console.log("x doesn’t equal 1"); } for(var count=0; count<10; count++){ console.log(count); }
  • 43. if for else loop var key = "left"; for(var count=0; count<10; count++){ if (key == "up" ){ console.log(count); } console.log("Key is up."); } else { console.log("Some key."); }
  • 44.
  • 45.
  • 46. if for & loop else if & else var key = "left"; for(var count=0; count<10; count++){ if (key == "right" ) { console.log(count); } console.log("Key is right."); } else if (key == "up" ){ console.log("Key is up."); } else { console.log("Some key."); }
  • 47.
  • 48. for loop for(var count=0; count<100; count++){ console.log(count); }
  • 49. for loop towns = ["LJ", "MB", "KR", "NM", "KP", "GO", "KR"]; for(var i=0; i<towns.length; i++){ document.write(towns[i]); document.write("<br />") }
  • 50. Classes and objects Animation GameState Lamppost LampFactory Cloud CloudFactory Gun Ammo BuildingFactory EnemyFactory DuaneReade Building Player Enemy Tampon
  • 51. class Tampon { var xTamp; var yTamp; var tampSpeed; var randFR; Animation tampPic; var h; var w; Tampon() { xTamp = 750; yTamp = 250; tampSpeed = -2; randFR = Math.floor((Math.random() * 20) + 8); tampPic = new Animation("tampz", 2, randFR); h = tampPic.getHeight(); w = tampPic.getWidth(); } void showTamp() { tampPic.display(xTamp, yTamp); } void moveTamp() { xTamp = xTamp + tampSpeed; } void releaseTamp() { yTamp = yTamp + tampSpeed; } } class DuaneReade { var tamponList; DuaneReade() { tamponList = []; } void animate() { var willItBlend = Math.floor((Math.random() * 500) + 1); if (willItBlend == 50) { tamponList.push(new Tampon()); } showTamponList(); moveTamponList(); removeTampon(); reloadTampon(); } // MORE CODE... }
  • 52. Methods play(soundToPlay) pauseSound(SoundToPlay) setup() draw() keyPressed() keyReleased()
  • 53. Remember what you wanted to change in the game?
  • 54. What can we ‘easily’ change? ● Skip intro and go directly to the game ● Navigation keys ● Initial number of tampons ● Number of tampons in the pack ● Color of tampons ● Avatar of the enemy ● Animations ● Background color ● Ground color ● Cloud color ● Image of the lamppost ● Change lamppost into another object ● The height of the jump ● Larger canvas with the game ● Change Intro Images (Translate) ● Change sounds ● ...
  • 55. Skip intro HINT: If you are on the first page (0: home) press SHIFT (key 16) and go to the game page (3: game play) if (keyCode == 16 && state.page==0){ state.page = 1; // change to 3 Why is sound not playing?
  • 56. Change navigation keys if (keyCode == 77) if (keyCode == 39) if (keyCode == 16) if (keyCode == 83) if (keyCode == 38) SPACE: 32 // throw tampon RIGHT: 39 // forward LEFT: 37 // back M: 77 // mute SHIFT: 16 // begin UP: 38 // jump P: 80 // pause S: 83 // restart TASK: Change the code so that you will be able to play the game with one hand!
  • 57. Change the number of initial tampons HINT: find where the number is defined and change it //player variables var tampon = 10; //50 TASK: What happens if we restart the game (S)? Fix it! HINT: Find where the conditions are end screen (4) and key S (83).
  • 58. Change the number of tampons in the pack HINT: Find where the number is defined and change it tampon = tampon + 5 // 50
  • 59. Change intro images statementOne = loadImage("res/statementOne0000.png"); statementTwo = loadImage("res/statementTwo0000.png"); statementThree = loadImage("res/statementThree0000.png"); statementFour = loadImage("res/statementFour0000.png"); statementFive = loadImage("res/statementFive0000.png"); instructOne = loadImage("res/learn0000.png"); pausePage = loadImage("res/pause0000.png");
  • 60. Color of tampons TASK: Open images in image editor and change the color. ● ammo…png 4x ● attack…png 2x
  • 61. New enemy enemies = new EnemyFactory("eWalk", 1); /* change to swat and play the game */ eWalk swat TASK: Now try to build your own.
  • 62. Animations Animation title; title = new Animation("title", 2, 20); Animation girlIntro; girlIntro = new Animation("walk",2,5);
  • 63. Background coloor void startGame() { background(100); /* background(255,255,0); //yellow (red, green and blue 0-255) color yellow = color(255,252, 25); color red = color(178,18,18); color orange = color(255,83, 13); color blue = color(9, 113, 178); color pink = color(255, 182, 193); */
  • 64. Ground color void showBuilding() { fill(0); // color name or number(s) /* background(255,255,0); //yellow (red, green and blue 0-255) color yellow = color(255,252, 25); color red = color(178,18,18); color orange = color(255,83, 13); color blue = color(9, 113, 178); color pink = color(255, 182, 193); */
  • 65. Change the cloud color void showCloud() { fill(255); fill(0); // black or // (0,0,0) (red, green and blue 0-255)
  • 66. Change the cloud color Gray clouds (uncomment c and add c to fill()) c = Math.floor((Math.random() * 255) + 1); } void showCloud() { fill(c);
  • 67. Change the cloud color Color clouds r = Math.floor((Math.random() * 255) + 1); g = Math.floor((Math.random() * 255) + 1); b = Math.floor((Math.random() * 255) + 1); } void showCloud() { fill(r,g,b);
  • 68. Image of lamppost TASK: Open the image lamppost0000.png in Image editor and change it.
  • 69. Height of the jump jumpHeight = 200; /* jumpHeight = 100; // higher jumpHeight = 300; // lower */
  • 70. Larger game canvas var CANVAS_HEIGHT = 500; // 700 var CANVAS_WIDTH = 700; // 1200
  • 71. Change sounds var jumpSound = new buzz.sound("res/sound/jumpSound", {formats: ["ogg", "mp3"]}); var tamponSound = new buzz.sound("res/sound/tamponSound", {formats: ["ogg", "mp3"]}); var gameOverSound = new buzz.sound("res/sound/gameOverSound", {formats: ["ogg", "mp3"]}); var beethovenSound = new buzz.sound("res/sound/beethovenSound", {formats: ["ogg", "mp3"]}); var ouchSound = new buzz.sound("res/sound/ouchSound", {formats: ["ogg", "mp3"]}); var shootSound = new buzz.sound("res/sound/shootSound", {formats: ["ogg", "mp3"]});
  • 72. You can leave behind the old regressive sexist representations and instead create interactive experiences that portray women as capable, complex and inspirational. Anita Sarkeesian, Feminist Frequency
  • 73. JAVASCRIPT REFERENCE http://learnxinyminutes.com/docs/javascript/ http://www.codecademy.com/glossary/javascript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide TUTORIALS http://www.codecademy.com/tracks/javascript https://www.khanacademy.org/computing/cs