gf2:projekte:2024:minecraft:2d1gruppe1

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
gf2:projekte:2024:minecraft:2d1gruppe1 [2025/04/06 16:48] – Fussball bischofbergeregf2:projekte:2024:minecraft:2d1gruppe1 [2025/04/06 17:32] (aktuell) – [Fertiger Code] bischofbergere
Zeile 14: Zeile 14:
 <color #ffaec9> <color #ffaec9>
 </color> </color>
-===== Grössen: ===== 
  
  
Zeile 23: Zeile 22:
  
    
-**Weisser Beton**//(Grundlage)//,  +  Green Carpet (Spielfeld
-**Red Stone** //(Tribüne)//  +  Brick Stairs (Tribüne) 
-** Eis **  +  White Carpet (Spielfeldlinien) 
-** Zaun **+  Oakfence (Zaun) 
 +  Birch Door (Türe) 
 +  White Concrete + Cobweb (Tore) 
 +  Villager (Zuschauer) 
 +  Armadillo (Fussball) 
 +  Shroomlight (Lichter) 
 +  Ice (Eis unter dem Feld) 
  
  
Zeile 38: Zeile 44:
   * Licht   * Licht
   * Spieler (in Bewegung)   * Spieler (in Bewegung)
-  * Ball (in Bewegung+  * Ball (in Bewegung)
   * Anzeigetafel   * Anzeigetafel
  
Zeile 51: Zeile 57:
   * Beleuchtung im Stadion    * Beleuchtung im Stadion 
   * Zaun    * Zaun 
-  * Ball +  * Schriftzug vor dem Stadion
  
 ===== Zu erledigen: ===== ===== Zu erledigen: =====
    
 **Skizze des Fussballplatzes**//(zur Vorstellung)//, **Material für die jeweiligen Elemente festlegen**, **Einzelne Elemente programmieren**//(in kleinen Schritten)// **Skizze des Fussballplatzes**//(zur Vorstellung)//, **Material für die jeweiligen Elemente festlegen**, **Einzelne Elemente programmieren**//(in kleinen Schritten)//
-<color #ffaec9>-->Elemente sind:...,</color> **Programmcode kommentieren/erklären**, **Dokumentation auf dem Wiki aktualisieren**, **Planung auf dem Scrumboard erweitern**+<color #ffaec9>-->Elemente sind: FussballplatzTribüne, Dach, Schriftzug, Ball, Spieler, Tore, Lichter</color> **Programmcode kommentieren/erklären**, **Dokumentation auf dem Wiki aktualisieren**, **Planung auf dem Scrumboard erweitern**
  
  
Zeile 63: Zeile 69:
  
  
-==== Fussballfeld (Boden) ====+==== Fussballfeld (Boden und Tribüne) ====
  
 <code python> <code python>
Zeile 72: Zeile 78:
     blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)     blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)
     blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut     blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut
-    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE)+    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE) #Eis wird unter das Fussballfeld platziert
     for i in range(radius):     for i in range(radius):
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut          blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut 
Zeile 78: Zeile 84:
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)
-        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE)+        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE) #Weite der Tribüne wird definiert
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
Zeile 89: Zeile 95:
  
  
-====Villiger auf dem Feld====+ ==== Villiger auf dem Feld ==== 
 +  
    
 <code python> <code python>
Zeile 160: Zeile 168:
  
 </code> </code>
-===== Bewegender Ball =====+ 
 + 
 +===== Fussball =====
  
 <code python> <code python>
  
-running = True # solange dies auf True ist, läuft der Game-Loop 
-  
-def stopGame(): # wenn "stop" in den Chat geschrieben wird, running auf False setzen 
-    global running 
-    running = False 
-  
-player.on_chat("stop", stopGame) 
-  
-x = 716 
-frame = 0 
-  
-while running: 
-    frame += 1 
-    if (frame % 50 == 0):  # immer nach 50 Frames 
-        for i in range(70): 
-            blocks.place(DIAMOND_BLOCK, world(x+1+i,-60,0))  # Block an neuer Position bauen 
-            blocks.place(AIR, world(x+i, -60, 0))   # Block löschen 
-        for i in range(70): 
-             blocks.place(DIAMOND_BLOCK, world(x-1-i,-60,0))  # Block an neuer Position bauen 
-             blocks.place(AIR, world(x-i, -60, 0)) 
-running = True # solange dies auf True ist, läuft der Game-Loop 
-  
-</code> 
-===== Fussball ===== 
-</code python> 
 for i in range (1): for i in range (1):
         mobs.spawn(ARMADILLO, world(x+25, y, z+15))         mobs.spawn(ARMADILLO, world(x+25, y, z+15))
-</code> +         
-=====Fussballplatz (Elin) =====+         
 +         
 +</code>   
 +=====Fussballplatz (Boden) =====
  
 <code python> <code python>
Zeile 257: Zeile 245:
     blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)     blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)
     blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut     blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut
-    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE)+    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE) #Eis wird unter Fussballfeld gebaut
     for i in range(radius):     for i in range(radius):
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut          blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut 
Zeile 263: Zeile 251:
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)
-        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE)+        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE) #weite der Tribüne wird definiert
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)         blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
Zeile 298: Zeile 286:
     blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)     blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)
     blocks.fill(COBWEB, world(x+17, y, z+4), world(x+23, y+3, z+4),FillOperation.REPLACE)     blocks.fill(COBWEB, world(x+17, y, z+4), world(x+23, y+3, z+4),FillOperation.REPLACE)
-    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE) #tor links+    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE) #Tor links
     blocks.fill(WHITE_CONCRETE, world(x+16, y, z+66), world(x+16, y+4, z+66),FillOperation.REPLACE)     blocks.fill(WHITE_CONCRETE, world(x+16, y, z+66), world(x+16, y+4, z+66),FillOperation.REPLACE)
     blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE)     blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE)
     blocks.fill(COBWEB, world(x+17, y, z+66), world(x+23, y+3, z+66),FillOperation.REPLACE)     blocks.fill(COBWEB, world(x+17, y, z+66), world(x+23, y+3, z+66),FillOperation.REPLACE)
-    blocks.fill(OAK_FENCE, world(x+2, y, z+3), world(x+2, y, z+67), FillOperation.REPLACE)  # Rechts+    blocks.fill(OAK_FENCE, world(x+2, y, z+3), world(x+2, y, z+67), FillOperation.REPLACE)  # Rechts Zäune werden gebaut
     blocks.fill(OAK_FENCE, world(x+38, y, z+3), world(x+38, y, z+67), FillOperation.REPLACE) # Links     blocks.fill(OAK_FENCE, world(x+38, y, z+3), world(x+38, y, z+67), FillOperation.REPLACE) # Links
     blocks.fill(OAK_FENCE, world(x+3, y, z+2), world(x+37, y, z+2), FillOperation.REPLACE)   # Hinten     blocks.fill(OAK_FENCE, world(x+3, y, z+2), world(x+37, y, z+2), FillOperation.REPLACE)   # Hinten
Zeile 310: Zeile 298:
     blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x-5, y+9, z+71), FillOperation.REPLACE)   # Links, längere Beleuchtung     blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x-5, y+9, z+71), FillOperation.REPLACE)   # Links, längere Beleuchtung
     blocks.fill(SHROOMLIGHT, world(x+45, y+9, z-3), world(x+45, y+9, z+71), FillOperation.REPLACE) # Rechts, längere Beleuchtung     blocks.fill(SHROOMLIGHT, world(x+45, y+9, z-3), world(x+45, y+9, z+71), FillOperation.REPLACE) # Rechts, längere Beleuchtung
- +    blocks.place(OAK_FENCE, world(x+2, y, z+2))    # # Eckzäune (4 Ecken extra absichern) Hinten rechts
-    # Eckzäune (4 Ecken extra absichern) +
-    blocks.place(OAK_FENCE, world(x+2, y, z+2))    # Hinten rechts+
     blocks.place(OAK_FENCE, world(x+2, y, z+68))   # Vorne rechts     blocks.place(OAK_FENCE, world(x+2, y, z+68))   # Vorne rechts
     blocks.place(OAK_FENCE, world(x+38, y, z+2))   # Hinten links     blocks.place(OAK_FENCE, world(x+38, y, z+2))   # Hinten links
Zeile 320: Zeile 306:
 def mobspawn(x,y,z): def mobspawn(x,y,z):
     for i in range(100):     for i in range(100):
-        mobs.spawn(VILLAGER, world(x+0, y, z+0)), world(x+100, y, Z+1)+        mobs.spawn(VILLAGER, world(x+0, y, z+0)), world(x+100, y, Z+1) #Villigar spawned
     for i in range(100):     for i in range(100):
         mobs.spawn(VILLAGER, world(x, y, z+50)), world(x+100, y, Z+1)         mobs.spawn(VILLAGER, world(x, y, z+50)), world(x+100, y, Z+1)
Zeile 326: Zeile 312:
         mobs.spawn(VILLAGER, world(x, y, z+100)), world(x+100, y, Z+1)         mobs.spawn(VILLAGER, world(x, y, z+100)), world(x+100, y, Z+1)
     for i in range (1):     for i in range (1):
-        mobs.spawn(ARMADILLO, world(x+25, y, z+15))+        mobs.spawn(ARMADILLO, world(x+25, y, z+15)) #"Fussball wird gespawnt"
 def stadiondach(x, y, z, length, width, height, material): #stadiondach ort wird definiert def stadiondach(x, y, z, length, width, height, material): #stadiondach ort wird definiert
     for i in range(radius):     for i in range(radius):
Zeile 347: Zeile 333:
 ===== Fazit ===== ===== Fazit =====
 Idee: Im Nachhinein denken wir, dass uns die Arbeit einfacher gefallen wäre, wenn wir ein anderes Element als ein Fussballstadion gewählt hätten. Beispielsweise wenn wir ein Dorf gemacht hätten, hätten wir mit weniger Komplexität verschiedene Häuser bauen können da wir die Grundstruktur eines Codes für ein Haus hätten beibehalten können und nur leichte Veränderungen hätten vornehmen können und so trotzdem ein Vielfältiges Endprodukt erhalten. Idee: Im Nachhinein denken wir, dass uns die Arbeit einfacher gefallen wäre, wenn wir ein anderes Element als ein Fussballstadion gewählt hätten. Beispielsweise wenn wir ein Dorf gemacht hätten, hätten wir mit weniger Komplexität verschiedene Häuser bauen können da wir die Grundstruktur eines Codes für ein Haus hätten beibehalten können und nur leichte Veränderungen hätten vornehmen können und so trotzdem ein Vielfältiges Endprodukt erhalten.
-Zudem hätten wir als erstes prüfen können, wie wir die einzelnen Elemente umsetzen können. Da wir beim Tor sowie auch beim Ball improvisieren mussten da es kein passendes Element gab. Das Tor haben wir also mit Spinnennetz gebaut und den Ball mit Wolle was wiederum für die interaktion ein Problem für uns darstellte.+Zudem hätten wir als erstes prüfen können, wie wir die einzelnen Elemente umsetzen können. Da wir beim Tor sowie auch beim Ball improvisieren mussten da es kein passendes Element gab. Das Tor haben wir also mit Spinnennetz gebaut und den Ball mit einem Tier das auf Eis rutscht was wiederum für die Interaktion ein Problem für uns darstellte.
  
  
  • gf2/projekte/2024/minecraft/2d1gruppe1.1743950933.txt.gz
  • Zuletzt geändert: 2025/04/06 16:48
  • von bischofbergere