The ESP32 Dino Game AndiBond Project v.3.2.1 represents the pinnacle of the «Dino Run» evolution. If version 2.1.1 was about the «Golden-Heart» mechanics, the Cloud-Born version marks a quantum leap into the IoT ecosystem. Your ESP32 is no longer just a standalone console; it is now a connected device that synchronizes global high scores in real-time via Google Sheets.
🛠 Technical Breakthrough: What’s New?
In this iteration, we have integrated technologies typically found in professional IoT industrial solutions:
💾 Code Breakdown & Explanations. ESP32 Dino Game
Below is the core logic of the v3.2.1 firmware.
#include <WiFi.h>
#include <HTTPClient.h>
#include <Preferences.h> // Library for permanent flash storage
#include <Adafruit_SSD1306.h>
// --- NETWORK & CLOUD SETTINGS ---
const char* ssid = "Wokwi-GUEST";
const char* scriptID = "YOUR_SCRIPT_ID"; // Google Apps Script Deployment ID
// --- CLOUD SYNC FUNCTION ---
void sendDataToGoogle(int finalScore) {
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
// Construct the URL with parameters: Nickname, Device ID, and Score
String url = "https://script.google.com/macros/s/" + String(scriptID) + "/exec";
url += "?nick=" + playerName + "&id=" + deviceID + "&score=" + String(finalScore);
http.begin(url.c_str());
// Crucial for Google Scripts as they use redirects
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
int httpCode = http.GET(); // Send the data via GET request
if (httpCode > 0) {
Serial.println("Cloud Sync: Success");
}
http.end();
}
}Key Logic Explained:
👾 Gameplay Innovation: Boss Mode
In version 3.2.1, the game is no longer an endless run. Every 100 points, the Boss Mode activates:
Wokwi Simulation: Testing without hardware.
Before picking up a soldering iron, I recommend testing everything in the online simulator.
Try the Game in your Browser:
📊 Global Leaderboard. ESP32 Dino Game
All results are automatically pushed to the Google Spreadsheet. This allows for real-time competitions between different physical devices located anywhere in the world.
Conclusion
ESP32 Dino Game transforms a simple hobby project into a comprehensive IoT learning platform. You master WiFi stacks, HTTP protocols, permanent memory management, and complex UI/UX logic—all using a single button.
Support the AndiBond Project
Creating high-quality guides, finding working solutions, and debugging code takes a lot of time. All my projects remain open-source and free so that everyone can enter the world of electronics with the lowest possible barrier to entry.
If this tutorial saved you time or helped you launch your first game on ESP32, you can support the blog’s development. Your support helps me buy new sensors, displays, and controllers for future reviews.
Every donation is fuel for new articles and videos. Thank you for being with me!


Один комментарий