Spellbound RPG.
A top-down RPG written in raw Java — no engine, no shortcuts. Features a spell-casting combat system, tile-based collision detection, and enemies that actually chase you using dynamic pathfinding.
How enemies find you.
Spellbound's enemies use A* pathfinding to navigate around walls and reach the player efficiently. Click anywhere on the grid below to place a wall tile, then hit "Find Path" to watch A* expand the grid and trace the shortest route in real time.
Click or drag to paint walls. Green is the enemy start node, indigo marks the player goal, and the search uses an A* heuristic.
A game loop built from the ground up.
Spellbound runs on a classic Java game architecture: a fixed-timestep update loop handles simulation, while rendering happens in its own pass so motion stays readable even when several systems are changing at once. The world itself is stored as a tile map, which keeps the level format simple while making it straightforward to render terrain, query collisions, and attach gameplay logic to specific cells.
Enemy movement is driven by a grid-based A* routine that recalculates routes as the player changes position. In practice, that means every enemy is constantly solving a small navigation problem instead of moving directly toward the player and getting stuck on walls. Once more than one enemy is active, the real challenge becomes keeping those recalculations efficient enough that combat still feels responsive.
Collision handling ties the whole game together. The player uses AABB collision against the tile map to stay grounded in the level geometry, spell projectiles need to interact cleanly with both walls and enemy hitboxes, and knockback has to resolve without tunneling or jittering. Getting those pieces to agree with one another was what made the game feel solid rather than merely functional.
Screenshots.