Sebastián Valdés

Category: Tools & Educational Games

Languages: C++20 & Python 3 (Scripting)

Project Date: Apr. 2025 – July 2025

Studio: Steel Minions

Team:

  • Daniel Turner
  • Sebastián Valdés Sánchez

⚔️🖥️ Battle Coder 🎮

A 2D vectorial game and scripting app to teach programming.

Written in C++ 20 and powered by embedded Python 3 scripting, Battle Coder turns first-year computing lessons into fast-paced coding duels. Students tackle level-based challenges by writing Python that directly manipulates game objects and logic.

Thanks to Pybind11, key C++ classes, functions and entities are surfaced to Python, delivering a smooth bridge between native gameplay and user scripts. Progression, scores and content drops are delivered via Firebase (JSON), giving lecturers live oversight and automated grading.

Our goal: an engaging educational tool that motivates learning through gameplay, scoring, and automated code tests.

Features

🐍🖥️

Embedded Python Scripting

Players write and execute Python code that manipulates game objects and mechanics in real time.
🧩🎯

Interactive Coding Challenges

Fun, competitive puzzles designed to teach core programming concepts.
☁️📊

Firebase Backend & Progress Management

Remote storage for levels, student progress and leaderboards, all in JSON.
👩‍🏫📝

Lecturer Controls

Content release, automated exercises and detailed analytics to monitor and motivate learners.
🖼️📋

Raylib User Interface

Custom raylib-based UI for login, registration and scoreboard display, keeping the experience smooth and consistent.

My Role in this Project

🐍🖥️

Python Scripting

Designed and built the scripting core system that lets students write, “compile” and run Python code in-game, handling parsing, execution and game-side callbacks.
🔗🧩

Pybind11 Integration

Exposed essential C++ functions, methods and game objects to Python via Pybind11, enabling seamless interaction between native code and scripts.
🖥️⌨️

Script Editor UI

Built an in-game ImGui editor with save, compile, run and stop controls. Includes a status indicator:


🔴 Error 🟡 IDLE 🟢 Running


⚠️💡⏳

Error Handling & User Feedback

Implemented real-time error detection with highlighting and feedback. Added safeguards to prevent hangs and crashes like infinite loops (while, for) during script execution.

📐✏️

Vector Shape Editor

Built an in-game editor inspired by GeoGebra, allowing users to ➕ add, ❌ remove, and 👆 drag points to build custom vector shapes used alongside default game figures.

Gallery

Main Menu

Battle Coder Main Menu

Running Program

Battle Coder running a Python program

My Vector Figure Editor

Vector Figure Editor tool

Identifiers & Keywords

List of Identifiers, Keywords, Members and Sub-Members

Error Feedback & Highlighting

Error feedback and highlighting in the script editor

Vector Shape Editor

All vector shapes in the shape editor