A work-in-progress tile-based roguelike game for R.

Visit the documentation website or read more in the inaugural blogpost. See the issues for future plans or to suggest improvements.

You can install {r.oguelike} from GitHub via {remotes} (packages {crayon} and {keypress} are also installed):

if (!require(remotes)) install.packages("remotes")
install_github("matt-dray/r.oguelike")

You could also launch an instance of RStudio in the browser, thanks to Binder, with {r.oguelike} preinstalled.

Use start_game() to begin. You can adjust the default parameters; see ?start_game or visit the documentation website for details.

r.oguelike::start_game(
iterations = 3,
n_row = 15,
n_col = 20,
n_rooms = 4,
max_turns = 25
)

The console will clear and you’ll see a map, with an inventory bar, status message and prompt for input. Output will appear in colour with the argument colour = TRUE (the default).

# # # # # # # # # # # # # # # # # # # #
# # # # # # # . . . . . . . . # # # # #
# # # # # # # # . . . . $. . # # # # # # # # # # # # # . # # . . . . # # # # # # . # # # # # # # # # . . . # # # # # # # . . # # # # # # # # . . . # # # # # # # . . . # # # # # # # . . . . . # . # # # . . # # # # # # # . . . . . . . . # # # . . # # # # # # # # . . . . . . # # # # . @ . . . # # . # # # # . . . . . # # # . . . . . . . . . . . . . . . . # # # # . . . . . . . . . E . . . . . . # # # # . . a . . . . . . . . . . . . # # # # # # . . . . # # . # # # # . # # # # # # # # # # # # # # # # # # # # # # # # # # T: 25 | HP: 10 |$: 0 | a: 0
Press W, A, S or D then Enter to move, 1 to eat apple, 0 to exit
Input:

The dungeon map (# for walls and . for floor tiles) and placement of objects (@ is the player, E is an enemy, $ is gold and a is an apple) are randomised. See the accompanying blogpost for more about how these dungeons are generated. You can move the player character (@) with your arrow keys instead of the W, A, S or D keys if you’re using a terminal that supports the {keypress} package (RStudio doesn’t). After pressing s then Enter (or the down arrow key, if supported), the player character moves one space down and the status message updates. # # # # # # # # # # # # # # # # # # # # # # # # # # # . . . . . . . . # # # # # # # # # # # # # . . . .$ . . # # # # #
# # # # # # # # . # # . . . . # # # # #
# . # # # # # # # # # . . . # # # # # #
# . . # # # # # # # # . . . # # # # # #
# . . . # # # # # # # . . . . . # . # #
# . . # # # # # # # . . . . . . . . # #
# . . # # # # # # # # . . . . . . # # #
# . . . . . # # . # # # # . . . . . # #
# . @ . . . . . . . . . . . . . . # # #
# . . . . . . . . E . . . . . . . # # #
# . . a . . . . . . . . . . . . # # # #
# # . . . . # # . # # # # . # # # # # #
# # # # # # # # # # # # # # # # # # # #
T: 24 | HP: 10 | $: 0 | a: 0 Moved down Input: Collect the gold ($). Auto-battle the randomly-moving enemy (E). Collect an apple (a) for your inventory, then eat it with a keypress input of 1. You’ll die if you run out of HP or if you reach the maximum number of turns allowed (T). You can quit the game with 0.

## Code of Conduct

Please note that the {r.oguelike} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.