Skip to content

Commit 27547ec

Browse files
author
richelbilderbeek
committed
Update
1 parent ae07c89 commit 27547ec

38 files changed

+9079
-27
lines changed

activities/20231209_slutpresentation/README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ Dahlia |8 |P |Vacker regenb...
3939
Angela |9 |A |Neopixel
4040
Enrico |9 |P |Random röd
4141
Gordii |9 |A |Blink
42+
Shushanti |9 |P |Färger
4243
Xiuchang |9 |P |Random
4344
Fredrik |? |B |Wackamole
44-
Sannan |? |B |Fedora Hat
4545
Daniel |10 |P |Grässmatta Quest
46-
Vide |11 |B |?
46+
Sannan |10 |B |Igndominus
47+
Vide |11 |B |Rabbit hat
4748
Teo |12 |P |Pizza
4849
WALL-E 38 |? |ABP |WALL-E 38
4950
Team Smile.exe.co TM |11 |B |Battle Island
@@ -69,3 +70,14 @@ Mahdiya |? |P |-
6970

7071
* WALL-E 38: David L, Emil, Vidar
7172
* Team Smile.exe.co TM: Daniel H, David H, Felix
73+
74+
## Notes for next time
75+
76+
* About 0.9 pizza per student
77+
* Strong preference for margarita
78+
* Vesuvio was second, Hawaii third
79+
80+
81+
82+
83+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Binary file not shown.

activities/20231209_slutpresentation/daniel/sketch_231118f/sketch_231118f.pde

+42-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
float [][] position;
2+
import ddf.minim.*;
3+
Minim minim;
4+
AudioPlayer player;
25
PImage bild;
6+
PImage bild2;
37
float x = 0;
48
float x5 = -50;
59
float y5 = -50;
@@ -8,8 +12,8 @@ float copies = 200;
812
float size = 50;
913
float speedX = 0;
1014
float speedY = 0;
11-
float enemyX = 0;
12-
float enemyY = 0;
15+
float spelplanX = 0;
16+
float spelplanY = 0;
1317
float enemySpeedX = 1;
1418
float enemySpeedY = 1;
1519
float eyeX = x;
@@ -19,6 +23,10 @@ float eY = 0;
1923
boolean[] keys;
2024
void setup()
2125
{
26+
minim = new Minim(this);
27+
player= minim.loadFile("t.mp3");
28+
bild2 = loadImage("mus.png");
29+
noCursor();
2230
fullScreen();
2331
x = width / 2 - 25;
2432
y = height / 2 - 25;
@@ -40,29 +48,29 @@ void setup()
4048
}
4149
void draw()
4250
{
43-
if (enemyX > 0) enemyX-= 100;
44-
if (enemyX + width / 10 < 0) enemyX = enemyX + 100;
45-
if (enemyY > 0) enemyY-= 100;
46-
if (enemyY + width / 10 < 0) enemyY = enemyY + 100;
51+
player.play();
52+
if (spelplanX > 0) spelplanX-= 100;
53+
if (spelplanX + width / 10 < 0) spelplanX += 100;
54+
if (spelplanY > 0) spelplanY-= 100;
55+
if (spelplanY + width / 10 < 0) spelplanY += 100;
4756
if (eX < x + 25) eX = eX + 1;
4857
if (eX > x + 25) eX = eX - 1;
4958
if (eY > y + 25) eY -= 1;
5059
if (eY < y + 25) eY += 1;
5160
fill(0, 180, 0);
5261
if (dist(eX, eY, x + 25 , y + 25) < 50) exit();
5362
stroke(0, 255, 0);
54-
rect(enemyX, enemyY, width / 2 * 2, width / 2 * 2);
5563
fill(255, 255, 255);
56-
64+
5765
fill(255, 0, 0);
58-
image(bild, enemyX, enemyY);
66+
image(bild, spelplanX, spelplanY);
5967
ellipse(eX, eY, 50, 50);
6068
for (int i = 0; i > 200; ++i)
6169
{
62-
ellipse(enemyX, enemyY, 100, 100);
63-
enemyX += 100;
70+
ellipse(spelplanX, spelplanY, 100, 100);
71+
spelplanX += 100;
6472
}
65-
73+
player.play();
6674
fill(0, 0, 0);
6775
rect(x, y, size , size);
6876
fill(255, 0, 0);
@@ -79,14 +87,14 @@ void draw()
7987

8088
position[i][2]=0;
8189
}
90+
image(bild2, mouseX, mouseY);
8291
k();
8392
}
8493
void makeRect(float X, float Y, float Width, float Height){
8594
int i=0;
8695
for(i=0;i<position.length-1&&(position[i][2]==1);i++){
8796
}
88-
position[i][0]=X;
89-
position[i][1]=Y;
97+
position[i][0]=X;
9098
position[i][2]=1;
9199
position[i][3]=Width;
92100
position[i][4]=Height;
@@ -109,35 +117,47 @@ void k()
109117
if (keys[38])
110118
{
111119
y5 += 3;
112-
enemyY = enemyY + 3;
120+
spelplanY = spelplanY + 3;
113121
eyeY = height / 2 - 10;
114122
eyeX = width / 2;
115123
eY += 2;
116-
if (dist(x5, y5, x + 75 , y + 75) < 50) enemyY -= 3;
124+
if (dist(x5 + 100, y5 + 100, x + 50 , y + 50) < 125){
125+
spelplanY -= 3;
126+
y5 -=3;
127+
}
117128
}
118129
if (keys[40])
119130
{
120-
enemyY = enemyY - 3;
131+
spelplanY = spelplanY - 3;
121132
eyeY = height / 2 + 10;
122133
eyeX = width / 2;
123134
eY -= 2;
124135
y5 -= 3;
125-
if (dist(x5, y5, x + 75 , y + 75) < 50) enemyY += 3;
136+
if (dist(x5 + 100, y5 + 100, x + 50 , y + 50) < 125){
137+
spelplanY += 3;
138+
y5 += 3;
139+
}
126140
}
127141
if (keys[37])
128142
{
129143
x5 += 3;
130-
enemyX = enemyX + 3;
144+
spelplanX = spelplanX + 3;
131145
eyeX = width / 2 - 10;
132146
eyeY = height / 2;
133147
eX += 2;
134-
if (dist(x5, y5, x + 75 , y + 75) < 50) enemyX -= 3;
148+
if (dist(x5 + 100, y5 + 100, x + 50 , y + 50) < 125){
149+
spelplanX -= 3;
150+
x5 -= 3;
151+
}
135152
}
136153
if (keys[39])
137154
{
138155
x5 -= 3;
139-
if (dist(x5, y5, x + 75 , y + 75) < 50) enemyX += 3;
140-
enemyX = enemyX - 3;
156+
if (dist(x5 + 100, y5 + 100, x + 50 , y + 50) < 125){
157+
spelplanX += 3;
158+
x5 += 3;
159+
}
160+
spelplanX = spelplanX - 3;
141161
eyeX = width / 2 + 10;
142162
eyeY = height / 2;
143163
eX -= 2;
Loading
Loading

activities/20231209_slutpresentation/daniel/sketch_231118f_old/data/grass.svg

+1
Loading

0 commit comments

Comments
 (0)