📄 README.txt — Break Wall (By JP)

🎮 Project Title
Break Wall
By JP

🧠 Description
Break Wall is a mini breakout-style game built using a Wemos D1 Mini (ESP8266) and a 1.3-inch SH1106 I²C OLED display.
A bouncing ball breaks bricks at the top of the screen while you move the paddle using two buttons.
The game runs smoothly on a tiny OLED with retro pixel graphics, and shows a boot splash logo before gameplay.

⚙️ Hardware Used
Component | Description | Pins / Notes
-----------|--------------|--------------
Wemos D1 Mini (ESP8266) | Main microcontroller board | 3.3 V logic
1.3″ Blue OLED (SH1106 I²C 4-pin) | 128×64 Monochrome Display | I²C address 0x3C (default)
Button 1 – LEFT | Moves paddle left | D5 (GPIO14) → GND (via push button)
Button 2 – RIGHT | Moves paddle right | D6 (GPIO12) → GND (via push button)
Power | 3.3 V from D1 Mini to OLED VCC | VCC → 3V3, GND → GND
I²C Lines | Data communication | SCL → D1 (GPIO5), SDA → D2 (GPIO4)

🔌 Wiring Summary
OLED VCC → D1 Mini 3V3
OLED GND → D1 Mini G
OLED SCL → D1 Mini D1 (GPIO5)
OLED SDA → D1 Mini D2 (GPIO4)
Button-Left  : D5 → Button → GND
Button-Right : D6 → Button → GND
(No resistors required, INPUT_PULLUP is used in code.)

💾 Software / Libraries
Install via Arduino Library Manager:
1. Adafruit GFX Library
2. Adafruit SH110X Library (for SH1106 OLED support)
Board: Wemos D1 Mini / ESP8266
Port: Select COM port of your D1 Mini

🧩 Game Features
• Boot splash image (from imag2.cpp bitmap)
• Title text overlay – “Break Wall By JP”
• “Press any button to start” prompt
• Smooth ball movement & brick collisions
• Slow speed + level progression
• Score & lives display on top HUD

🖼️ Bitmap Information
Bitmap generated using image2cpp converter (Adafruit GFX compatible, 1-bit monochrome).
Name: myBitmapUntitled_1[]
Declared directly inside the .ino file as:
const uint8_t PROGMEM myBitmapUntitled_1[] = { ... };
#define IMG_WIDTH   <your image width>
#define IMG_HEIGHT  <your image height>

🧠 Code Flow Summary
1. Boot Sequence → logo → “Break Wall By JP” → start prompt
2. Game Initialization → sets paddle, ball, speed
3. Main Loop → reads buttons, updates physics, draws everything
4. Game Over → shows score, returns to boot

⚡ Default Gameplay Parameters
Parameter | Default | Description
-----------|----------|-------------
Paddle Speed | 1.8 px/frame | Smooth movement
Ball Speed X/Y | 0.9 / 1.2 | Slow bounce
Bricks Rows × Cols | 4 × 10 | 40 bricks per level
Levels | ∞ | Difficulty increases gradually
Lives | 3 | Then Game Over

🧑‍💻 How to Upload
1. Open Breakout_RetroBrick.ino in Arduino IDE
2. Paste your bitmap bytes from imag2.cpp
3. Verify → Upload to Wemos D1 Mini
4. OLED displays boot logo + Break Wall By JP → then the game starts 🎮

🧰 Tools Used
• Arduino IDE
• Adafruit GFX + SH110X Libraries
• image2cpp (Bitmap converter)
• Wemos D1 Mini (ESP8266)
• 1.3″ SH1106 OLED Display
• 2× Push Buttons

👤 Credits
Code & Design: Prasad (JP)
Game Name: Break Wall
Platform: Wemos D1 Mini + SH1106 OLED
