Skip to content

Commit a4b17e5

Browse files
Adam first
1 parent dbb1633 commit a4b17e5

37 files changed

+883
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
float [] xs;
2+
float [] ys;
3+
float [] rs;
4+
PImage bild;
5+
6+
boolean grej_klickat = false;
7+
int sekund_naer_klickat = 1000000;
8+
boolean grej2_klickat = false;
9+
boolean grej3_klickat = false;
10+
11+
void setup()
12+
{
13+
background(0);
14+
size(600, 320);
15+
xs = new float[256];
16+
ys = new float[256];
17+
rs = new float[256];
18+
for (int i=0; i<256; ++i)
19+
{
20+
xs[i] = 160;
21+
ys[i] = 100;
22+
rs[i] = 160;
23+
}
24+
}
25+
26+
27+
void draw()
28+
{
29+
for (int i=0; i<256; ++i)
30+
{
31+
xs[i] += random(-4, 4);
32+
ys[i] += random(-4, 4);
33+
rs[i] += random(-4, 4);
34+
fill(rs[i]+10, 0, 0);
35+
stroke(rs[i]+10, 0, 0);
36+
ellipse(xs[i], ys[i], 10, 10);
37+
}
38+
stroke(0);
39+
fill(255);
40+
textSize(60);
41+
text("E", 40, height / 2);
42+
text("R", 80, height / 2);
43+
text("R", 120, height / 2);
44+
text("O", 160, height / 2);
45+
text("R", 200, height / 2);
46+
47+
text("6", 260, height / 2);
48+
text("6", 290, height / 2);
49+
text("6", 320, height / 2);
50+
51+
textSize(20);
52+
text("By: ShiftBlock", 80, 180);
53+
54+
textSize(11);
55+
text("version_1.0.0", 5, 315);
56+
{
57+
rect(410, 20, 180, 80, 18);
58+
rect(410, 110, 180, 80, 18);
59+
rect(410, 200, 180, 80, 18);
60+
fill(0, 75, 0);
61+
rect(230, 217, 130, 70, 108);
62+
fill(255);
63+
triangle (240, 260, 270, 250, 240, 235);
64+
65+
textSize(40);
66+
text("PLAY", 270, 265);
67+
68+
PImage bild;
69+
{
70+
// size(20, 20);
71+
bild = loadImage("Meny.jpg");
72+
image(bild, 555, 5);
73+
}
74+
if (mousePressed == true && mouseX > 410 && mouseY > 20 && mouseY < 280)
75+
{
76+
grej_klickat = true;
77+
save("window.tif");
78+
sekund_naer_klickat = millis();
79+
} else
80+
{
81+
; // nothing
82+
}
83+
if (grej_klickat == true && sekund_naer_klickat + 3000 < millis())
84+
{
85+
grej_klickat = false;
86+
background(0);
87+
bild = loadImage("window.tif");
88+
}
89+
if (grej_klickat == true)
90+
{
91+
textSize(40);
92+
93+
rect(width / 2 - 200, height / 2 - 100, 400, 200);
94+
fill(0);
95+
text("COmIng so0n", 200, 170);
96+
}
97+
98+
99+
if (mousePressed == true && mouseX > 230 && mouseY > 217 && mouseY < 280)
100+
{
101+
grej_klickat = true;
102+
save("window.tif2");
103+
//save(230, 217, 130, 70, 108);
104+
}
105+
else
106+
{
107+
//load();
108+
}
109+
if (grej_klickat == true)
110+
{
111+
grej_klickat = false;
112+
background(0);
113+
}
114+
if (grej_klickat == true);
115+
}
116+
}
Loading
Binary file not shown.

activities/20240518_slutpresentation/second/README.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,26 @@ Tider är bara riklinjer, ofta slutar vi tidigare.
1919

2020
## Presentationsschema
2121

22-
Vem |Ålder||Team |Vad
23-
----------------------|-----|-------|----------------
24-
[READY] Enrico | 10 |Blic Legends |Solar system
25-
[?] Niko | |Void/ |Superpong
26-
[READY] The Dependers | The Dependers|Dependent (Herman & Leonid)
27-
28-
- Föraldrarlag: Mohamed
22+
Vem |Ålder|Team |Vad
23+
-----------------------|-----|-------------|----------------
24+
[READY] Adam |9 |. |Adam (first, because father)
25+
[READY] Dawood |9 |Blic Legends |Bouncing balls
26+
[READY] Daniel |10 |. |Cirkel (Processing + Arduino)
27+
[READY] Enrico |10 |Blic Legends |Solar system
28+
[READY] Shushanty |10 |Blic Legends |Circles
29+
[READY] Huda |11 |Blic Legends |How Glamrock Freddy died
30+
[READY] Kevin |11 |. |Fysikmotor
31+
[READY] Malek |12 |Void/ |Menu_ERROR_666
32+
[READY] Niko |12 |Void/ |Superpong
33+
[READY] The Dependers |13 |The Dependers|Dependent
34+
35+
- Föraldrarlag: ?Alvin, Felix, Mohamed
2936
- På semester: Ebbe
3037

31-
När |Besökare | Elever
32-
-----|-----------------------------------|-----------------------
33-
[ABSENT] Ebbe | |DefH |[absent]
34-
[ABSENT] Luca | |DefH |Ball Blast
35-
[ABSENT] Frode | |DefH |Mysterietprojekt
36-
[ABSENT] Huda | |Blic Legends |Candy
37-
[ABSENT] Dawood | |Blic Legends |?
38+
När |Besökare |Ålder |Team | Elever
39+
-----|----------------|--------|---------|-----------------------
40+
[?] Luca | |DefH |Ball Blast
41+
[?] Frode | |DefH |Mysterietprojekt
3842

3943
## Pictures
4044

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
float x= -50;
2+
float zig= 1;
3+
void setup ()
4+
{size(400, 100);
5+
background(3, 3, 3);
6+
}
7+
void draw()
8+
{
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
void setup()
2+
{
3+
size(256,256);
4+
}
5+
6+
void draw()
7+
{
8+
fill(mouseX, mouseY, mouseX, mouseY);
9+
ellipse(mouseX, mouseY, 50, 50);
10+
fill(mouseY, mouseX, 255);
11+
}
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
2+
3+
import processing.sound.*;
4+
SoundFile file;
5+
6+
7+
8+
//rec =70 sec dawood//
9+
10+
float [] x;
11+
float [] y;
12+
float [] xd;
13+
float []yd;
14+
String p="easy mode";
15+
String m="hard mode";
16+
int b=255;
17+
int g=50;
18+
int r =0;
19+
int q=30;
20+
int o=0;
21+
int t =0;
22+
int points=0;
23+
int numbb=30;
24+
void setup() {
25+
size(500, 500);
26+
frameRate(40);
27+
file=new SoundFile(this,"were.mp3");
28+
file.play();
29+
//
30+
x=new float [numbb];
31+
xd=new float [numbb];
32+
yd=new float [numbb];
33+
y=new float [numbb];
34+
for (int i=0; i<numbb; i++) {
35+
x[i]=random(10, 490);
36+
y[i]=random(10, 490);
37+
yd[i]=random(-3, 3);
38+
xd[i]=random(-3, 3);
39+
}
40+
}
41+
42+
void draw() {
43+
background(0);
44+
stroke(0, 255, 0);
45+
strokeWeight(4);
46+
text(t, width/2, 23);
47+
t++;
48+
ellipse(width/2+5+10-3-1-1,height-50-10-5,30,30);
49+
for (int i=0; i<numbb; i++) {
50+
fill(r, g, b);
51+
ellipse(x[i], y[i], q, q);
52+
x[i]=x[i]+xd[i];
53+
y[i]=y[i]+yd[i];
54+
if (x[i]>width-10||x[i]<10) {
55+
xd[i]=-xd[i];
56+
}
57+
if (y[i]>width-10||y[i]<10) {
58+
yd[i]=-yd[i];
59+
}
60+
}
61+
62+
textSize(32);
63+
text(o, width/2, height-20);
64+
fill(0, 50, 255);
65+
text("Points:"+points, 0, 50);
66+
textSize(12);
67+
text(" for easy mode click", 1, 90);
68+
textSize(24);
69+
text(" E", 114, 90);
70+
textSize(12);
71+
text("for hard mode click", 140, 90);
72+
textSize(24);
73+
text(" H", 250, 90);
74+
textSize(12);
75+
text("for normal mode click", 279, 90);
76+
textSize(24);
77+
text("M", 410, 90);
78+
textSize(12);
79+
text("and for super hard click", 1, 110);
80+
textSize(24);
81+
text("U", 145, 110);
82+
83+
if (numbb==0) {
84+
textSize(32);
85+
fill(r, g, b);
86+
text("Game Over!", width/2, height/2);
87+
}
88+
}
89+
90+
91+
92+
void mousePressed() {
93+
if (numbb==0) {
94+
textSize(32);
95+
fill(r, g, b);
96+
text("Game Over!", width/2, height/2);
97+
98+
}
99+
for (int i=0; i<numbb; i++) {
100+
float dist =sqrt(x[i]-mouseX)*(x[i]-mouseX)+(y[i]-mouseY)*(y[i]-mouseY);
101+
if (dist<q||dist==q/2+9) {
102+
file=new SoundFile(this,"mouse.mp3");
103+
file.play();
104+
numbb--;
105+
y[i]=-100;
106+
x[i]=-100;
107+
int speedb=abs(int(xd[i]+xd[i]));
108+
int timeb=int((20000.0/millis())*10);
109+
points =points+speedb+timeb;
110+
file=new SoundFile(this,"were.mp3");
111+
file.play();
112+
113+
o++;
114+
break;
115+
}
116+
}
117+
if (numbb==0) {
118+
textSize(32);
119+
fill(r, g, b);
120+
text("Game Over!", width/2, height/2);
121+
file=new SoundFile(this,"somes.mp3");
122+
file.play();
123+
124+
}
125+
126+
127+
}
128+
129+
130+
void keyPressed() {
131+
if (keyPressed) {
132+
if (key =='h') {
133+
b=255;
134+
g=50;
135+
r =0;
136+
if (numbb==0) {
137+
138+
textSize(32);
139+
fill(r, g, b);
140+
text("Game Over!", width/2, height/2);
141+
}
142+
frameRate(100+100+100+900+900+90+90+9000+9000+900);
143+
144+
}
145+
q=25;
146+
strokeWeight(8);
147+
}
148+
if (key=='e') {
149+
q=40;
150+
b=255;
151+
g=50;
152+
r =0;
153+
154+
frameRate(35);
155+
if (numbb==0) {
156+
textSize(32);
157+
fill(r, g, b);
158+
text("Game Over!", width/2, height/2);
159+
}
160+
}
161+
if (key=='m') {
162+
q=30;
163+
b=255;
164+
g=50;
165+
r =0;
166+
167+
if (numbb==0) {
168+
169+
textSize(32);
170+
fill(r, g, b);
171+
text("Game Over!", width/2, height/2);
172+
}
173+
frameRate(70);
174+
}
175+
if (key=='u') {
176+
if (numbb==0) {
177+
textSize(32);
178+
fill(r, g, b);
179+
text("Game Over!", width/2, height/2);
180+
}
181+
frameRate(900 +90);
182+
q=23;
183+
r=0;
184+
b=10;
185+
g=20;
186+
187+
}
188+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[LocalizedFileNames]
2+
Sleep Away.mp3=@%systemroot%\system32\SampleRes.dll,-118
Binary file not shown.
Loading
Loading

0 commit comments

Comments
 (0)