Inizio refactoring del layout delle cartelle del progetto in vista della conclusione.

Layout delle cartelle quasi definitivo
This commit is contained in:
2026-04-02 02:42:09 +02:00
parent 1586ea9209
commit 305950f571
19 changed files with 139 additions and 12 deletions
+98
View File
@@ -0,0 +1,98 @@
Struttura della cartella del progetto: (temporanea e mmodificabile)
```text
.
├── assets/
│ ├── media/
│ │ ├── img/
│ │ │ ├── titolo.png
│ │ │ └── fase2/
│ │ │ ├── contenitori/
│ │ │ │ ├── alluminio.jpeg
│ │ │ │ ├── carta.jpeg
│ │ │ │ ├── indifferenziata.jpeg
│ │ │ │ ├── plastica.jpeg
│ │ │ │ ├── umido.jpeg
│ │ │ │ └── vetro.jpeg
│ │ │ └── rifiuti/
│ │ │ ├── bicchiereEbottiglia.webp
│ │ │ ├── bottiglie.webp
│ │ │ ├── bucciaBanana.png
│ │ │ ├── giornale.png
│ │ │ ├── lattina.png
│ │ │ ├── marmellata.png
│ │ │ ├── mozziconiSigaretta.png
│ │ │ ├── pannolino.png
│ │ │ ├── sacchettoPlastica.png
│ │ │ ├── scatolaCartone.png
│ │ │ ├── scatolaTonno.webp
│ │ │ └── torsoloMela.webp
│ │ └── video/
│ │ └── background.mp4
│ ├── models/
│ │ ├── rifiuto.glb
│ │ └── tree.glb
│ └── texture/
│ └── rifiuto/
│ ├── Trash_AlbedoTransparency.png
│ ├── Trash_Ambient_Occlusion.png
│ ├── Trash_MetallicSmoothness.png
│ ├── Trash_Normal.png
│ └── Trash_Roughness.png
├── css/
│ ├── classifica.css
│ ├── fase1.css
│ ├── fase2.css
│ ├── istruzioniFase2.css
│ └── risultatiFinali.css
├── js/
│ ├── fase1.js
│ └── fase2.js
├── materiale/
│ ├── idea gioco.drawio
│ ├── idea gioco.png
│ ├── ideaRisultato.jpeg
│ ├── progetto.txt
│ ├── schermata iniziale.png
│ ├── STRUTTURA.md
│ └── TODO.txt
├── pages/
│ ├── classifica.php
│ ├── fase1.html
│ ├── fase2.html
│ ├── istruzioniFase2.html
│ └── risultatiFinali.html
├── php/
│ ├── db.php
│ ├── save_score.php
│ └── leaderboard_utils.php
├── .gitignore
├── db_iniziale.sql
├── index.php
└── README.md
```
Workflow del gioco:
```
Inizio -> 60s per raccogliere i rifiuti -> Salvataggio del punteggio in localStorage -> Schermata intermedia -> <punteggio>*5s per separare i rifiuti -> Invio dati della partita al database (nome squadra, rifiuti raccolti nella fase 1, rifiuti separati correttamente nella fase 2, punteggio finale, data della partita) -> caricamento schermata finale con classifica ridotta (posizione, squadra, punteggio) e pulsanti per giocare ancora, impostazioni e la classifica completa (classifica.php) con tutti i dati e tutte le partite giocate (classifica ridotta: solo le prime 5/10 partite)
```
Indirizzamento pagine in index.php
```
index.php?p=xxx
index.php?p=start -> include 'fase1.html' (schermata iniziale + prima fase)
index.php?p=mid -> include 'istruzioniFase2.html' (istruzioni per la seconda fase con pulsante per iniziare)
index.php?p=sep -> include 'fase2.html' (separazione dei rifiuti + reindirizzamento a schermata finale)
index.php?p=end -> include 'risultatiFinali.html' (schermata finale + record assoluto (nome squadra, punteggio finale, data) + classifica ridotta + pulsante 'gioca ancora' (-> index.php?p=start) + pulsante per classifica completa (-> _blank::index.php?p=leaderboard))
index.php?p=leaderboard -> classifica globale dei risultati con visualizzazione completa dei dati
```
Array associativo con indirizzamenti da parametri get
```php
$route = [
'start' => 'fase1.html',
'mid' => 'istruzioniFase2.html',
'sep' => 'fase2.html',
'end' => 'risultatiFinali.html',
'leaderboard' => 'classifica.php'
]
```
+1
View File
@@ -0,0 +1 @@
TODO:
+58
View File
@@ -0,0 +1,58 @@
<mxfile host="simonez-cloud.ddns.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36" version="29.5.2">
<diagram name="Page-1" id="i5RDAsyKeYJ5rP6QEPLP">
<mxGraphModel dx="1026" dy="507" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="hKNONnDbWQ7ccftNSymI-2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="" vertex="1">
<mxGeometry height="440" width="680" x="80" y="40" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-5" parent="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="" vertex="1">
<mxGeometry height="370" width="440" x="190" y="70" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-3" parent="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="" vertex="1">
<mxGeometry height="340" width="400" x="220" y="80" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-4" parent="1" style="ellipse;whiteSpace=wrap;html=1;fillColor=#AEBEAD;strokeColor=#567441;" value="" vertex="1">
<mxGeometry height="90" width="134" x="400" y="190" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-6" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="N° rifiuti" vertex="1">
<mxGeometry height="50" width="90" x="80" y="40" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-7" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="tempo" vertex="1">
<mxGeometry height="50" width="70" x="690" y="40" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-8" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;" value="" vertex="1">
<mxGeometry height="440" width="680" x="80" y="600" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-9" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="plastica" vertex="1">
<mxGeometry height="110" width="110" x="100" y="810" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-10" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="umido" vertex="1">
<mxGeometry height="110" width="110" x="230" y="810" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-11" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="indifferenziata" vertex="1">
<mxGeometry height="110" width="110" x="365" y="810" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-12" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="vetro" vertex="1">
<mxGeometry height="110" width="110" x="500" y="810" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-13" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="carta" vertex="1">
<mxGeometry height="110" width="110" x="630" y="810" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-14" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="aulliminio" vertex="1">
<mxGeometry height="80" width="80" x="115" y="940" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-15" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="tempo" vertex="1">
<mxGeometry height="30" width="60" x="390" y="610" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-16" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="immagine rifiuto" vertex="1">
<mxGeometry height="120" width="120" x="360" y="650" as="geometry" />
</mxCell>
<mxCell id="hKNONnDbWQ7ccftNSymI-17" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="punteggio" vertex="1">
<mxGeometry height="30" width="60" x="90" y="610" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

+8
View File
@@ -0,0 +1,8 @@
Nome gioco: Pulisci il mondo
posizioni: 20 posizioni predefinite scelte random
tempo 1° fase: 1m
tempo 2° fase: 5s * punteggio
schermata iniziale: click + controlli + bckg trailer (loop video) + titolo
schermata intermedia: istruzioni
schermata finale: punteggio finale + record + classifica(?)
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB