description | A roguelike I started working on, currently not very far along, not yet named |
owner | dcmenche@gmail.com |
last change | Sun, 30 Apr 2017 23:41:41 +0000 (30 16:41 -0700) |
URL | git://repo.or.cz/menche_rl.git |
| https://repo.or.cz/menche_rl.git |
push URL | ssh://repo.or.cz/menche_rl.git |
| https://repo.or.cz/menche_rl.git (learn more) |
bundle info | menche_rl.git downloadable bundles |
content tags
|
|
README
Description
This is a roguelike or roguelite for which I haven't come up with a name yet.
It is currently very unfinished; my plans are for it to eventually be an open
world game with a fully destructable, infinite (or large enough to feel
infinite), two-dimensional but multi-layered, procedurally generated map. Like
roguelikes, it is viewed from the top down, is in ASCII (for now), and time that
progresses in discrete steps. Permadeath: maybe, probably, I might do a "story
mode" with permadeath and a "survival mode" without.
Overview
An overview of the (planned) inner workings (for my benefit as much as anyone
else's):
Code is (tentatively) separated into the interface, game logic, and game state.
Initialization:
main.c calls interface_init() to set up ncurses
main.c allocates game state (map, player position, still figuring out
what this will look like)
Interface Step:
main.c calls interface_step()
interface.c refreshes the screen
interface.c processes input from the player
interface.c eventually returns a command
Game Step:
if the command was to quit, clean up and exit
otherwise, main.c calls game_step() with the command
game.c performs the specified action, adjusting the
game state as necessary.
MAYBE information about success/failure/effects of requested action
is communicated back to the interface; might just leave it
until the screen refresh next step
game state is saved to disk, ideally asynchronously (might not do that yet)
main.c calls interface_step() again
Cleanup:
main.c frees any memory that was allocated
main.c calls interface_exit() to clean up ncurses and restore the
terminal screen