Skip to main content
Game / Java + TS

Tank battle game with custom AI scripting language

Tank battle game featuring a custom domain-specific scripting language for programming AI tank behavior. Originally Python, rewritten in Java (JavaFX), now being ported to TypeScript/React/Canvas with a genetic algorithm that evolves tank strategies. Full game engine with custom interpreted language.

Links Coming Soon
Tech Stack
Java 17JavaFXTypeScriptReactHTML5 CanvasRecursive Descent ParserGenetic Algorithm
Key Features

01

Custom DSL with lexer, recursive descent parser, and runtime interpreter

02

Tank customization: armor, chassis, engine, weapons, scanners

03

Multiple projectile types: missiles, mines with configurable behaviors

04

Procedural arena generation with varied terrain

05

Genetic algorithm evolves tank AI strategies across generations

06

Replay recording system for post-battle analysis

Architecture

Game engine runs at 50 FPS with sprite-based 2D rendering. DSL source code is lexed into tokens, parsed into AST via recursive descent (supports conditionals, loops, functions), then interpreted at runtime to drive tank decisions each tick. Java version uses JavaFX for rendering. TypeScript port uses HTML5 Canvas with React UI wrapper. GA breeds strategy parameters by evaluating combat performance.

Screenshot / Demo Coming Soon