An experiment building a Roguelike with libtcod and Python
Refactor MovePlayerAction into a few different Action subclasses. Move direction to a parent MoveAction, and create three new subclasses of MoveAction: - BumpAction: perform the test that an action can be performed in the given direction - WalkAction, take a step in the given direction - MeleeAction, attack another Entity in the given direction Add an ActionResult class that communicates the result of performing an Action. - ActionResult.succeeded indicates whether the action succeeded. - ActionResult.done indicates if the action is fully complete or requires followup. - ActionResult.alternate specifies the follow-up action to perform. Convert all the key handling actions to BumpActions. In the Engine's event handler method, loop until an action is completed, performing specified alternate actions until the result object indicates the action is done. |
||
---|---|---|
.vscode | ||
fonts | ||
roguebasin | ||
.gitignore | ||
01_fixed_size_console.py | ||
02_dynamically_sized_console.py | ||
bsp_visualizer.py | ||
Makefile | ||
README.md | ||
requirements.txt | ||
tcod.code-workspace |
Going Rogue
An experiment building a Roguelike with libtcod and Python
libtcod
is a library that provides a bunch of useful routines for building
Roguelikes. There are C++ and Python interfaces.
There are Python docs.
I also found a "make a Roguelike with libtcod
" tutorial on Rogue Basin.