Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-138105 | A vulnerability has been found in ssssssss-team magic-api 2.2.2. The affected element is an unknown function of the file /magic/web/datasource/jdbc/test of the component Datasource JDBC Test Endpoint. Such manipulation of the argument driverClassName leads to code injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not respoCVSS 6.9CVE-2026-138104 | A flaw has been found in ssssssss-team magic-api up to 2.2.2. Impacted is the function push of the file magic-api/src/main/java/org/ssssssss/magicapi/core/web/MagicWorkbenchController.java of the component Workbench Push Interface. This manipulation of the argument magic-push-target causes server-side request forgery. The attack can be initiated remotely. The exploit has been published and may be used. The project was informed of the problem early through anCVSS 6.9CVE-2026-138103 | A vulnerability was detected in ssssssss-team magic-api up to 2.2.2. This issue affects the function saveFile of the file MagicResourceController.java of the component magic-api-core resource save API. The manipulation results in code injection. It is possible to launch the attack remotely. The exploit is now public and may be used. The project was informed of the problem early through an issue report but has not responded yet.CVSS 9.4CVE-2026-138102 | A security vulnerability has been detected in D-Link DIR-620S 4.0.2. This vulnerability affects unknown code of the file /usr/sbin/anweb of the component Diagnostic Handler. The manipulation of the argument I leads to os command injection. It is possible to initiate the attack remotely. The exploit has been disclosed publicly and may be used.CVSS 5.3CVE-2026-138101 | A weakness has been identified in MassGen up to 0.1.97. This affects the function _generate_subagent_yaml_config of the file massgen/subagent/manager.py of the component Subagent Delegation System. Executing a manipulation can lead to improper authorization. The attack may be performed from remote. The exploit has been made available to the public and could be used for attacks. The project was informed of the problem early through an issue report but has notCVSS 6.9CVE-2026-138100 | A security flaw has been discovered in MassGen up to 0.1.97. Affected by this issue is the function __init__ of the file massgen/filesystem_manager/_filesystem_manager.py. Performing a manipulation results in protection mechanism failure. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.CVSS 8.7CVE-2026-138099 | A vulnerability was identified in Tenda AC10U 1.18.6. Affected by this vulnerability is the function readUsb of the component ATE Service. Such manipulation leads to out-of-bounds write. The attack can be executed remotely. The exploit is publicly available and might be used.CVSS 6.9CVE-2026-138098 | A vulnerability was determined in weison-tech yii2-cms up to 1.0.2. Affected is an unknown function of the file protected/core/config/common.php of the component RBAC Authorization. This manipulation causes improper authorization. Remote exploitation of the attack is possible.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

ESP32 OLED Mini Shooter Game: Full Beginner Tutorial

Want to turn a small ESP32 board into a mini arcade game you can actually play? This ESP32 OLED Mini Shooter Game uses a 128x64 OLED display and two push…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 7 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

Want to turn a small ESP32 board into a mini arcade game you can actually play? This ESP32 OLED Mini Shooter Game uses a 128x64 OLED display and two push buttons to create a simple shooter experience. The player moves left and right, bullets fire upward, and enemies fall from the top of the screen. It is a small project, but it already feels like a real handheld game once the display starts updating.



This build is a great next step after basic OLED and button tutorials. Instead of only printing text or drawing one shape, the code manages several moving objects at the same time. It tracks the player, bullets, enemies, collisions, and game-over state.



The screen is divided into a simple grid. The 128x64 OLED becomes a 16x8 playfield, where each tile is 8x8 pixels. This makes object movement easier to understand because the player, enemies, and bullets move by grid position instead of raw pixel math.



Why build it?



This project teaches interactive programming on real hardware. The ESP32 reads button input, updates game objects, checks collisions, and draws the next frame on the OLED. That is much more active than a normal sensor display project.



It also teaches timing without blocking the whole game flow. The code uses millis() to control when bullets and enemies update, so they can move at different speeds. This is useful because many embedded projects need timed actions without stopping everything else.



What you'll learn





  • ESP32 OLED display control - drawing text, squares, circles, and game objects on an SSD1306 screen.


  • Custom I2C pins - using Wire.begin(5, 19) so the OLED uses GPIO5 for SDA and GPIO19 for SCL.


  • Button input handling - reading two push buttons for left and right movement.


  • Debounce logic - preventing one press from being counted many times.


  • Grid-based game design - turning a 128x64 screen into a simple 16x8 game map.


  • Game object arrays - storing multiple bullets and enemies with active/inactive states.


  • Timer-based updates - using millis() to move bullets and enemies at controlled intervals.


  • Collision checking - detecting when a bullet and enemy share the same grid position.


  • Difficulty scaling - making enemies faster by slowly reducing their update interval.


  • Game-over handling - stopping the game loop and showing a final screen.



What you'll need





The buttons use the ESP32's internal pull-up resistors - each button connects from its GPIO pin to GND, so you do not need extra external resistors.



Wiring connections



OLED to ESP32:




  • VCC to 3.3V

  • GND to GND

  • SDA to GPIO 5

  • SCL to GPIO 19



Left button: one leg to GPIO 4, the other to GND.



Right button: one leg to GPIO 22, the other to GND.



Library setup



In the Arduino IDE: Sketch → Include Library → Manage Libraries, search for Adafruit SSD1306 and install it. The IDE may also ask for Adafruit GFX Library - install both. The built-in Wire library handles I2C and is already included.



After installing the libraries, select the correct ESP32 board and port, then open the Serial Monitor at 115200 baud to check startup messages.



The sketch



Paste the full sketch below into the Arduino IDE and upload. The game starts immediately on the OLED.



#include <Adafruit_SSD1306.h>
#include <Wire.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

class DebounceButton {
public:
unsigned long buttonLastAction;
unsigned long debounceMS;
bool isAcceptingChanges;
int targetPin;

DebounceButton(int pin, unsigned long debounceMS) {
this->targetPin = pin;
this->buttonLastAction = millis();
this->debounceMS = debounceMS;
this->isAcceptingChanges = true;
pinMode(pin, INPUT_PULLUP);
}

bool CheckPress() {
bool btnValue = digitalRead(targetPin);
if (btnValue == LOW &&
(millis() - buttonLastAction) > debounceMS &&
isAcceptingChanges) {
buttonLastAction = millis();
isAcceptingChanges = false;
return true;
}
if (btnValue == HIGH &&
!isAcceptingChanges &&
(millis() - buttonLastAction) > debounceMS) {
isAcceptingChanges = true;
}
return false;
}
};

DebounceButton BTL(4, 200);
DebounceButton BTR(22, 200);

const int MAX_BULLETS = 5;
const int MAX_ENEMIES = 4;
const int GRID_W = 16;
const int GRID_H = 8;

unsigned long BULLET_INTERVAL = 750;
unsigned long ENEMY_INTERVAL = 1500;

class Bullet { public: uint8_t bx, by; bool active; Bullet(){bx=0; by=0; active=false;} };
class Enemy { public: uint8_t ex, ey; bool active; Enemy(){ex=0; ey=0; active=false;} };

Bullet playersBullets[MAX_BULLETS];
Enemy enemies[MAX_ENEMIES];

int px = 4;
int py = 6;
unsigned long lastBulletTick = 0;
unsigned long lastEnemyTick = 0;
bool gameOver = false;

void spawnBullet() {
for (int i = 0; i < MAX_BULLETS; i++) {
if (!playersBullets[i].active) {
playersBullets[i].bx = px;
playersBullets[i].by = py - 1;
playersBullets[i].active = true;
return;
}
}
}

void updateBullets() {
for (int i = 0; i < MAX_BULLETS; i++) {
if (!playersBullets[i].active) continue;
if (playersBullets[i].by == 0) playersBullets[i].active = false;
else playersBullets[i].by--;
}
}

void drawBullets() {
for (int i = 0; i < MAX_BULLETS; i++) {
if (playersBullets[i].active) {
display.fillRect(playersBullets[i].bx*8+2, playersBullets[i].by*8, 4, 6, WHITE);
}
}
}

void spawnEnemy() {
for (int i = 0; i < MAX_ENEMIES; i++) {
if (!enemies[i].active) {
enemies[i].ex = random(0, GRID_W);
enemies[i].ey = 0;
enemies[i].active = true;
return;
}
}
}

void updateEnemies() {
for (int i = 0; i < MAX_ENEMIES; i++) {
if (!enemies[i].active) continue;
enemies[i].ey++;
if (enemies[i].ey >= GRID_H) { gameOver = true; return; }
}
}

void drawEnemies() {
for (int i = 0; i < MAX_ENEMIES; i++) {
if (enemies[i].active) {
display.drawCircle(enemies[i].ex*8+4, enemies[i].ey*8+4, 3, WHITE);
}
}
}

void checkCollisions() {
for (int i = 0; i < MAX_ENEMIES; i++) {
if (!enemies[i].active) continue;
for (int b = 0; b < MAX_BULLETS; b++) {
if (!playersBullets[b].active) continue;
if (playersBullets[b].bx == enemies[i].ex && playersBullets[b].by == enemies[i].ey) {
enemies[i].active = false;
playersBullets[b].active = false;
}
}
}
}

void setup() {
Serial.begin(115200);
Wire.begin(5, 19);
randomSeed(analogRead(0));
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("ERR LOADING LCD SCREEN");
}
display.clearDisplay();
display.display();
}

void loop() {
if (gameOver) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(28, 28);
display.println("GAME OVER");
display.display();
return;
}

unsigned long now = millis();
bool leftButton = BTL.CheckPress();
bool rightButton = BTR.CheckPress();

if (rightButton) px++;
else if (leftButton) px--;
if (px > GRID_W - 1) px = GRID_W - 1;
if (px < 0) px = 0;

if (now - lastBulletTick >= BULLET_INTERVAL) {
lastBulletTick = now;
spawnBullet();
updateBullets();
}

if (now - lastEnemyTick >= ENEMY_INTERVAL) {
lastEnemyTick = now;
spawnEnemy();
updateEnemies();
if (ENEMY_INTERVAL > 300) ENEMY_INTERVAL -= 5;
}

checkCollisions();

display.clearDisplay();
display.fillRect(px*8, py*8, 8, 8, WHITE);
drawBullets();
drawEnemies();
display.display();
}


How it works



The game screen is treated as a grid instead of raw pixels - 16 columns by 8 rows, each cell 8x8 pixels. The player position is stored as px and py, then drawn as an 8x8 filled square.



The buttons control only the player's horizontal movement. Pressing the right button increases px; pressing the left button decreases it. The code limits the value so the player cannot move outside the screen.



The DebounceButton class waits a short time before accepting another change, so a mechanical button bounce does not register as multiple presses.



Bullets and enemies each live in fixed-size arrays. When a slot becomes inactive, it can be reused for the next bullet or enemy. Enemies spawn at random columns on the top row and move downward. If any enemy reaches the bottom of the grid, the game changes to game-over state.



Collisions are checked by comparing grid positions: if a bullet and enemy share the same x and y, both become inactive. The game gets harder over time by reducing ENEMY_INTERVAL, but never below 300 ms - which keeps it playable.



Extensions





  • Score counter - increment on each hit, render on the OLED.


  • Restart button - one button click after game-over resets everything without the ESP32 reset button.


  • Buzzer feedback - short beep for fire, different tone for hit, lower tone for game over.


  • 3D-printed case - mount the ESP32, OLED, and buttons in a small enclosure for a portable mini console.



The full tutorial with Fritzing diagram and demo video lives on our learn site: ESP32 OLED Mini Shooter Game.






Originally published on blog.circuit.rocks.






arduino #arduinoprojects #electronics #embedded #circuitrocks

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Dyskusja społeczności i komentarze

🌐 Dołącz do głównego czatu

Rozpocznij dyskusję w strumieniu transmisji Social Chat lub prześlij wyżej wkład ekspercki przez formularz uzupełnień.

Cyber Threat Intelligence i Kryminalistyka

Navigator ATT&CK · Radar IoC i Graf

CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Community Rating &amp; Social Proof
⭐ Ocena czytelników
–
Ø / 5.0
Brak recenzji czytelników
Czy ten artykuł był pomocny?
0
Dodaj swoją ocenę
Ocena szczegółowa (opcjonalnie)
Treść i jakość
Źródło i wiarygodność
Aktualność
Security Briefing Bezpłatnie · Wypisanie 1 kliknięciem

Intelligence Digest - bezpłatnie

Codziennie najważniejsze wiadomości bezpieczeństwa · można pobrać w każdej chwili

Powiązany klaster opowieści i źródła (wektor AI)

6 Cluster
25 źródeł
ForgeOS Booted on a Real Server: Linux Kernel Below, Only Our Own Code Above
DEV Community 1 godzinę temu
24 kolejnych źródeł
VulDB Updates2 godziny temuCVE-2026-72239 | Linux Kernel sev x86/virt/sev/sev.c wbinvd_on_all_cpus state issue (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72240 | Linux Kernel up to 7.1.4 mfd sm501_register_device memory leak (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72241 | Linux Kernel up to 7.1.4 uleds strchr buffer overflow (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72244 | Linux Kernel up to 6.12.100/6.18.41/7.1.4/7.2-rc2 gpu-buddy allocation of resources (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72243 | Linux Kernel up to 7.2-rc2 selinux socket_sendmsg permission (Nessus ID 364200 / WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72245 | Linux Kernel up to 7.1.4 host1x host1x_device_parse_dt release of resource (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72246 | Linux Kernel flowtable input validation (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72247 | Linux Kernel up to 7.2-rc3 nf_conncount __nf_conncount_add dir comparison (WID-SEC-2026-2852) VulDB Updates2 godziny temuCVE-2026-72248 | Linux Kernel up to 7.1.4/7.2-rc2 flowtable nft_flow_dst_release buffer overflow (WID-SEC-2026-2852) LinuxAndUbuntu2 godziny temuLinux AutoFDO Benchmark: Clang Kernel Optimization FOSS Linux2 godziny temuNFS2ROOT: Pre-Auth Flaw in the Linux NFS Server VulDB Updates3 godziny temuCVE-2022-31607 | NVIDIA GPU Display Driver on Linux Kernel Mode Layer nvidia.ko input validation (EUVD-2022-53059 / Nessus ID 339047) VulDB Updates4 godziny temuCVE-2026-72227 | Linux Kernel up to 6.12.96/6.18.39/7.1.4/7.2-rc2 batman-adv out-of-bounds (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72228 | Linux Kernel up to 7.2-rc2 batman-adv skb_split memory leak (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72229 | Linux Kernel up to 7.2-rc2 batman-adv register_netdevice memory leak (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72231 | Linux Kernel up to 7.2-rc2 batman-adv batadv_send_tt_request allocation of resources (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72230 | Linux Kernel up to 7.2-rc2 batman-adv batadv_frag_send_packet memory leak (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72232 | Linux Kernel up to 7.2-rc2 batman-adv batadv_interface_tx out-of-bounds (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72234 | Linux Kernel up to 7.2-rc1 batman-adv batadv_get_vid use after free (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72233 | Linux Kernel up to 7.2-rc1 batman-adv batadv_bla_is_backbone_gw use after free (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72236 | Linux Kernel up to 7.2-rc3 s390/perf_cpum_cf __hw_perf_event_init config array index (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72235 | Linux Kernel up to 7.2-rc1 batman-adv batadv_interface_rx use after free (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72237 | Linux Kernel up to 7.2-rc2 BRS /x86/amd/brs amd_brs_match_plm information disclosure (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72238 | Linux Kernel up to 7.2-rc3 x86 boot early_serial_init integer overflow (WID-SEC-2026-2852)
14 źródeł
Cyber Monday Australia laptop deals for 2026: score up to 52% off Lenovo, Apple, Dell, HP and more
Latest from TechRadar 21 minut temu
13 kolejnych źródeł
Latest from TechRadar49 minut temuAmazon Australia Cyber Monday deals CNET58 minut temuThis Pocket Battery Recharges Your Phone 4 Times, and it’s Only $38 for Cyber Monday Latest from TechRadar1 godzinę temuFirebat's M1 is a cracking Ryzen AI 9 HX 470 mini PC for AI workloads — and it's packing OCuLink, 32GB of RAM, and a 1TB SSD for $1020 this Cyber Monday Latest from TechRadar1 godzinę temuThe Lenovo IdeaCentre Tower Copilot+ PC with Core Ultra 7 CPU isn't discounted for Cyber Monday — and it's still the desktop computer I'd buy for work for $1049 WIRED1 godzinę temuThe 8 Best Black Friday Deals on Expert-Tested Laptops (2026): Up to $470 Off The Verge1 godzinę temuQobuz is my streaming service of choice and it’s on sale during Cyber Monday CNET12 dni temuThis Paramount Plus Cyber Monday Deal Gets You Ad-Free Viewing for Only $3 Per Month CNET2 godziny temuCyber Monday Meta Quest 3S Deal Knocks $53 Off and Gets You $50 Free Amazon Credit WIRED5 godzin temuThe 31+ Very Best Amazon Black Friday Deals (2026): Up to 50% Off The Verge2 godziny temuThese early Cyber Monday gaming laptop deals offer the most GPU for the least money Latest from TechRadar3 godziny temuGrab a TP-Link dual-band Wi-Fi 6 router with 1.5Gbps for $44 this Cyber Monday CNET4 godziny temuUpgrade Your Emergency Preparedness Kit With Black Friday and Cyber Monday Deals on Power Stations, Flashlights, Solar and More AppleInsider News4 godziny temuAirPods Max 2 plunge to best $399 price with $150 Cyber Monday discount
Podobne wkłady
🔍 Verwandte News

Auch interessante Nachrichten ESP32 OLED Mini Shooter Game: Full Beginner Tutorial

Thematisch verwandte Begriffe: ESP32, OLED, Mini, Shooter · 6 Treffer

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Uwagi Komentarze są ładowane..
Rysunek do aktualizacji
Widżety i tematy
Ładowanie widżetów…
Następny wpis