S.P.A.R.K Version 1.0
Overview
S.P.A.R.K is a light weight 2d Retro Ascii RPG Game Engine. It is build on the standard library hence no PIP install is required.
The purpose of the engine is educational. I consider it an extension of my 15 mini python games tutorial series, it acts like a playground where you can apply what you have learnt into your own mini adventures
S.P.A.R.K. provides the core systems needed to build a traditional ASCII RPG, including:
Player and enemy logic, Turn‑based combat, Map navigation, ASCII animations, Title screen and UI, Basic sound support, Weapons, armour, stats, leveling system, inventory system and events ( To create quests and storyline )
The types of RPG games you can make are akin to those created with the Bitsy game engine or the Fighting Fantasy gamebook series
Getting Started
Requirements Python 3.10+
Windows recommended (for sound playback). I would suggest using pygame if you want sound playback for the other operating systems.
I have created an example game with a simple fetch quest titled 'S.P.A.R.K ( Spoon Quest Example )'. It provides a good case study on how you would 'code a quest' into the engine. You can use it as a basis for your own game but if you want to work on a blank slate use the S.P.A.R.K Game Engine (Blank Canvas)
Project Structure
│ animations.py
│ armour.py
│ battle.py
│ enemy.py
│ events.py
│ game.py
│ instructions.py
│ maps.py
│ player.py
│ sound.py
│ title_screen.py
│ weapon.py
│
└───music
background.wav
How the Engine Works
Game Loop (game.py) Controls the main flow of the game: Title screen, Player input, Movement, Combat, Events, Rendering
Combat System (battle.py) Handles: Attack rolls, Damage calculation, Weapon effects, Armour mitigation
Player & Enemies player.py defines the player character and enemy.py defines enemy types and behaviour
Maps (maps.py) Manages: Tile layout, Movement rules, Collision detection
Animations (animations.py) Provides ASCII transitions and visual effects.
Sound (sound.py) Plays .wav files on Windows.
Creating Your Own Content
You can easily extend S.P.A.R.K. by adding:
-
New weapons (weapon.py)
-
New armour (armour.py)
-
New enemy types (enemy.py)
-
New events (events.py)
-
New maps (maps.py)
-
New animations (animations.py)
The codebase is intentionally simple so you can modify it freely.
License
MIT License — free to use, modify, and distribute.
Misc
Provided a milestones folder for those who are interested in how the Engine was built from the foundation.
Aside from 'The Spoon Quest' example, here are example of games that can built on this Engine:
Both were built as stand alone games many years ago and I refactor their code to build S.P.A.R.K
The biggest difference is for S.P.A.R.K, I used msvcrt library for instant key press whilst for the below games you will need to 'press enter' after every command.
https://github.com/Ninedeadeyes/Grimlore-Land-of-the-Heretic-Hand
https://github.com/Ninedeadeyes/Dungeon-of-the-Black-Dragon
Demonstration / Guide Video below