From dd37c2f62f29c0cf320dc5a5cba6cb4ec5c1206c Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Sun, 10 Jan 2021 11:54:49 +0100 Subject: [PATCH 1/4] Renamed the title's ascii art file. --- squirrelbattle/display/menudisplay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/squirrelbattle/display/menudisplay.py b/squirrelbattle/display/menudisplay.py index 64d69b7..024ba1c 100644 --- a/squirrelbattle/display/menudisplay.py +++ b/squirrelbattle/display/menudisplay.py @@ -105,7 +105,8 @@ class MainMenuDisplay(Display): super().__init__(*args) self.menu = menu - with open(ResourceManager.get_asset_path("ascii_art.txt"), "r") as file: + with open(ResourceManager.get_asset_path("ascii_art-title.txt"), "r")\ + as file: self.title = file.read().split("\n") self.pad = self.newpad(max(self.rows, len(self.title) + 30), From 5eb769930154263d9060d98bef2b4553d882c52a Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Sun, 10 Jan 2021 12:35:50 +0100 Subject: [PATCH 2/4] Rearranged the display class files, related to issue #56. --- .../{ascii_art.txt => ascii_art-title.txt} | 0 squirrelbattle/display/creditsdisplay.py | 97 ---------------- squirrelbattle/display/display.py | 26 +++++ squirrelbattle/display/display_manager.py | 13 +-- .../{statsdisplay.py => gamedisplay.py} | 108 +++++++++++++++++- squirrelbattle/display/logsdisplay.py | 31 ----- squirrelbattle/display/mapdisplay.py | 87 -------------- squirrelbattle/display/menudisplay.py | 88 ++++++++++++++ squirrelbattle/display/messagedisplay.py | 32 ------ 9 files changed, 226 insertions(+), 256 deletions(-) rename squirrelbattle/assets/{ascii_art.txt => ascii_art-title.txt} (100%) delete mode 100644 squirrelbattle/display/creditsdisplay.py rename squirrelbattle/display/{statsdisplay.py => gamedisplay.py} (55%) delete mode 100644 squirrelbattle/display/logsdisplay.py delete mode 100644 squirrelbattle/display/mapdisplay.py delete mode 100644 squirrelbattle/display/messagedisplay.py diff --git a/squirrelbattle/assets/ascii_art.txt b/squirrelbattle/assets/ascii_art-title.txt similarity index 100% rename from squirrelbattle/assets/ascii_art.txt rename to squirrelbattle/assets/ascii_art-title.txt diff --git a/squirrelbattle/display/creditsdisplay.py b/squirrelbattle/display/creditsdisplay.py deleted file mode 100644 index e005c5b..0000000 --- a/squirrelbattle/display/creditsdisplay.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse -# SPDX-License-Identifier: GPL-3.0-or-later - -import curses - -from ..display.display import Box, Display -from ..game import Game -from ..resources import ResourceManager -from ..translations import gettext as _ - - -class CreditsDisplay(Display): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.box = Box(*args, **kwargs) - self.pad = self.newpad(1, 1) - self.ascii_art_displayed = False - - def update(self, game: Game) -> None: - return - - def display(self) -> None: - self.box.refresh(self.y, self.x, self.height, self.width) - self.box.display() - self.pad.erase() - - messages = [ - _("Credits"), - "", - "Squirrel Battle", - "", - _("Developers:"), - "Yohann \"ÿnérant\" D'ANELLO", - "Mathilde \"eichhornchen\" DÉPRÉS", - "Nicolas \"nicomarg\" MARGULIES", - "Charles \"charsle\" PEYRAT", - "", - _("Translators:"), - "Hugo \"ifugao\" JACOB (español)", - ] - - for i, msg in enumerate(messages): - self.addstr(self.pad, i + (self.height - len(messages)) // 2, - (self.width - len(msg)) // 2, msg, - bold=(i == 0), italic=(":" in msg)) - - if self.ascii_art_displayed: - self.display_ascii_art() - - self.refresh_pad(self.pad, 0, 0, self.y + 1, self.x + 1, - self.height + self.y - 2, - self.width + self.x - 2) - - def display_ascii_art(self) -> None: - with open(ResourceManager.get_asset_path("ascii-art-ecureuil.txt"))\ - as f: - ascii_art = f.read().split("\n") - - height, width = len(ascii_art), len(ascii_art[0]) - y_offset, x_offset = (self.height - height) // 2,\ - (self.width - width) // 2 - - for i, line in enumerate(ascii_art): - for j, c in enumerate(line): - bg_color = curses.COLOR_WHITE - fg_color = curses.COLOR_BLACK - bold = False - if c == ' ': - bg_color = curses.COLOR_BLACK - elif c == '━' or c == '┃' or c == '⋀': - bold = True - fg_color = curses.COLOR_WHITE - bg_color = curses.COLOR_BLACK - elif c == '|': - bold = True # c = '┃' - fg_color = (100, 700, 1000) - bg_color = curses.COLOR_BLACK - elif c == '▓': - fg_color = (700, 300, 0) - elif c == '▒': - fg_color = (700, 300, 0) - bg_color = curses.COLOR_BLACK - elif c == '░': - fg_color = (350, 150, 0) - elif c == '█': - fg_color = (0, 0, 0) - bg_color = curses.COLOR_BLACK - elif c == '▬': - c = '█' - fg_color = (1000, 1000, 1000) - bg_color = curses.COLOR_BLACK - self.addstr(self.pad, y_offset + i, x_offset + j, c, - fg_color, bg_color, bold=bold) - - def handle_click(self, y: int, x: int, attr: int, game: Game) -> None: - if self.pad.inch(y - 1, x - 1) != ord(" "): - self.ascii_art_displayed = True diff --git a/squirrelbattle/display/display.py b/squirrelbattle/display/display.py index 9b6e97c..3bf06c5 100644 --- a/squirrelbattle/display/display.py +++ b/squirrelbattle/display/display.py @@ -290,3 +290,29 @@ class Box(Display): self.refresh_pad(self.pad, 0, 0, self.y, self.x, self.y + self.height - 1, self.x + self.width - 1) + + +class MessageDisplay(Display): + """ + A class to handle the display of popup messages. + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.box = Box(fg_border_color=curses.COLOR_RED, *args, **kwargs) + self.message = "" + self.pad = self.newpad(1, 1) + + def update(self, game: Game) -> None: + self.message = game.message + + def display(self) -> None: + self.box.refresh(self.y - 1, self.x - 2, + self.height + 2, self.width + 4) + self.box.display() + self.pad.erase() + self.addstr(self.pad, 0, 0, self.message, bold=True) + self.refresh_pad(self.pad, 0, 0, self.y, self.x, + self.height + self.y - 1, + self.width + self.x - 1) diff --git a/squirrelbattle/display/display_manager.py b/squirrelbattle/display/display_manager.py index 81cba4f..897617a 100644 --- a/squirrelbattle/display/display_manager.py +++ b/squirrelbattle/display/display_manager.py @@ -4,14 +4,11 @@ import curses from typing import Any, List -from .creditsdisplay import CreditsDisplay -from .display import Display, HorizontalSplit, VerticalSplit -from .logsdisplay import LogsDisplay -from .mapdisplay import MapDisplay -from .menudisplay import ChestInventoryDisplay, MainMenuDisplay, \ - PlayerInventoryDisplay, SettingsMenuDisplay, StoreInventoryDisplay -from .messagedisplay import MessageDisplay -from .statsdisplay import StatsDisplay +from .display import Display, HorizontalSplit, MessageDisplay, VerticalSplit +from .gamedisplay import LogsDisplay, MapDisplay, StatsDisplay +from .menudisplay import ChestInventoryDisplay, CreditsDisplay, \ + MainMenuDisplay, PlayerInventoryDisplay, \ + SettingsMenuDisplay, StoreInventoryDisplay from .texturepack import TexturePack from ..enums import DisplayActions from ..game import Game, GameMode diff --git a/squirrelbattle/display/statsdisplay.py b/squirrelbattle/display/gamedisplay.py similarity index 55% rename from squirrelbattle/display/statsdisplay.py rename to squirrelbattle/display/gamedisplay.py index b80fa7b..5efaf56 100644 --- a/squirrelbattle/display/statsdisplay.py +++ b/squirrelbattle/display/gamedisplay.py @@ -7,10 +7,116 @@ from .display import Display from ..entities.items import Monocle from ..entities.player import Player from ..game import Game -from ..interfaces import FightingEntity +from ..interfaces import FightingEntity, Logs, Map from ..translations import gettext as _ +class LogsDisplay(Display): + """ + A class to handle the display of the logs. + """ + + logs: Logs + + def __init__(self, *args) -> None: + super().__init__(*args) + self.pad = self.newpad(self.rows, self.cols) + + def update(self, game: Game) -> None: + self.logs = game.logs + + def display(self) -> None: + messages = self.logs.messages[-self.height:] + messages = messages[::-1] + self.pad.erase() + for i in range(min(self.height, len(messages))): + self.addstr(self.pad, self.height - i - 1, self.x, + messages[i][:self.width]) + self.refresh_pad(self.pad, 0, 0, self.y, self.x, + self.y + self.height - 1, self.x + self.width - 1) + + +class MapDisplay(Display): + """ + A class to handle the display of the map. + """ + + map: Map + + def __init__(self, *args): + super().__init__(*args) + + def update(self, game: Game) -> None: + self.map = game.map + self.pad = self.newpad(self.map.height, + self.pack.tile_width * self.map.width + 1) + + def update_pad(self) -> None: + for j in range(len(self.map.tiles)): + for i in range(len(self.map.tiles[j])): + if not self.map.seen_tiles[j][i]: + continue + fg, bg = self.map.tiles[j][i].visible_color(self.pack) if \ + self.map.visibility[j][i] else \ + self.map.tiles[j][i].hidden_color(self.pack) + self.addstr(self.pad, j, self.pack.tile_width * i, + self.map.tiles[j][i].char(self.pack), fg, bg) + for e in self.map.entities: + if self.map.visibility[e.y][e.x]: + self.addstr(self.pad, e.y, self.pack.tile_width * e.x, + self.pack[e.name.upper()], + self.pack.entity_fg_color, + self.pack.entity_bg_color) + + # Display Path map for debug purposes + # from squirrelbattle.entities.player import Player + # players = [ p for p in self.map.entities if isinstance(p,Player) ] + # player = players[0] if len(players) > 0 else None + # if player: + # for x in range(self.map.width): + # for y in range(self.map.height): + # if (y,x) in player.paths: + # deltay, deltax = (y - player.paths[(y, x)][0], + # x - player.paths[(y, x)][1]) + # if (deltay, deltax) == (-1, 0): + # character = '↓' + # elif (deltay, deltax) == (1, 0): + # character = '↑' + # elif (deltay, deltax) == (0, -1): + # character = '→' + # else: + # character = '←' + # self.addstr(self.pad, y, self.pack.tile_width * x, + # character, self.pack.tile_fg_color, + # self.pack.tile_bg_color) + + def display(self) -> None: + y, x = self.map.currenty, self.pack.tile_width * self.map.currentx + deltay, deltax = (self.height // 2) + 1, (self.width // 2) + 1 + pminrow, pmincol = y - deltay, x - deltax + sminrow, smincol = max(-pminrow, 0), max(-pmincol, 0) + deltay, deltax = self.height - deltay, self.width - deltax + smaxrow = self.map.height - (y + deltay) + self.height - 1 + smaxrow = min(smaxrow, self.height - 1) + smaxcol = self.pack.tile_width * self.map.width - \ + (x + deltax) + self.width - 1 + + # Wrap perfectly the map according to the width of the tiles + pmincol = self.pack.tile_width * (pmincol // self.pack.tile_width) + smincol = self.pack.tile_width * (smincol // self.pack.tile_width) + smaxcol = self.pack.tile_width \ + * (smaxcol // self.pack.tile_width + 1) - 1 + + smaxcol = min(smaxcol, self.width - 1) + pminrow = max(0, min(self.map.height, pminrow)) + pmincol = max(0, min(self.pack.tile_width * self.map.width, pmincol)) + + self.pad.erase() + self.update_pad() + self.refresh_pad(self.pad, pminrow, pmincol, sminrow, smincol, smaxrow, + smaxcol) + + class StatsDisplay(Display): """ A class to handle the display of the stats of the player. diff --git a/squirrelbattle/display/logsdisplay.py b/squirrelbattle/display/logsdisplay.py deleted file mode 100644 index 1c323af..0000000 --- a/squirrelbattle/display/logsdisplay.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse -# SPDX-License-Identifier: GPL-3.0-or-later - -from squirrelbattle.display.display import Display -from squirrelbattle.game import Game -from squirrelbattle.interfaces import Logs - - -class LogsDisplay(Display): - """ - A class to handle the display of the logs. - """ - - logs: Logs - - def __init__(self, *args) -> None: - super().__init__(*args) - self.pad = self.newpad(self.rows, self.cols) - - def update(self, game: Game) -> None: - self.logs = game.logs - - def display(self) -> None: - messages = self.logs.messages[-self.height:] - messages = messages[::-1] - self.pad.erase() - for i in range(min(self.height, len(messages))): - self.addstr(self.pad, self.height - i - 1, self.x, - messages[i][:self.width]) - self.refresh_pad(self.pad, 0, 0, self.y, self.x, - self.y + self.height - 1, self.x + self.width - 1) diff --git a/squirrelbattle/display/mapdisplay.py b/squirrelbattle/display/mapdisplay.py deleted file mode 100644 index 80e6ada..0000000 --- a/squirrelbattle/display/mapdisplay.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse -# SPDX-License-Identifier: GPL-3.0-or-later - -from .display import Display -from ..game import Game -from ..interfaces import Map - - -class MapDisplay(Display): - """ - A class to handle the display of the map. - """ - - map: Map - - def __init__(self, *args): - super().__init__(*args) - - def update(self, game: Game) -> None: - self.map = game.map - self.pad = self.newpad(self.map.height, - self.pack.tile_width * self.map.width + 1) - - def update_pad(self) -> None: - for j in range(len(self.map.tiles)): - for i in range(len(self.map.tiles[j])): - if not self.map.seen_tiles[j][i]: - continue - fg, bg = self.map.tiles[j][i].visible_color(self.pack) if \ - self.map.visibility[j][i] else \ - self.map.tiles[j][i].hidden_color(self.pack) - self.addstr(self.pad, j, self.pack.tile_width * i, - self.map.tiles[j][i].char(self.pack), fg, bg) - for e in self.map.entities: - if self.map.visibility[e.y][e.x]: - self.addstr(self.pad, e.y, self.pack.tile_width * e.x, - self.pack[e.name.upper()], - self.pack.entity_fg_color, - self.pack.entity_bg_color) - - # Display Path map for debug purposes - # from squirrelbattle.entities.player import Player - # players = [ p for p in self.map.entities if isinstance(p,Player) ] - # player = players[0] if len(players) > 0 else None - # if player: - # for x in range(self.map.width): - # for y in range(self.map.height): - # if (y,x) in player.paths: - # deltay, deltax = (y - player.paths[(y, x)][0], - # x - player.paths[(y, x)][1]) - # if (deltay, deltax) == (-1, 0): - # character = '↓' - # elif (deltay, deltax) == (1, 0): - # character = '↑' - # elif (deltay, deltax) == (0, -1): - # character = '→' - # else: - # character = '←' - # self.addstr(self.pad, y, self.pack.tile_width * x, - # character, self.pack.tile_fg_color, - # self.pack.tile_bg_color) - - def display(self) -> None: - y, x = self.map.currenty, self.pack.tile_width * self.map.currentx - deltay, deltax = (self.height // 2) + 1, (self.width // 2) + 1 - pminrow, pmincol = y - deltay, x - deltax - sminrow, smincol = max(-pminrow, 0), max(-pmincol, 0) - deltay, deltax = self.height - deltay, self.width - deltax - smaxrow = self.map.height - (y + deltay) + self.height - 1 - smaxrow = min(smaxrow, self.height - 1) - smaxcol = self.pack.tile_width * self.map.width - \ - (x + deltax) + self.width - 1 - - # Wrap perfectly the map according to the width of the tiles - pmincol = self.pack.tile_width * (pmincol // self.pack.tile_width) - smincol = self.pack.tile_width * (smincol // self.pack.tile_width) - smaxcol = self.pack.tile_width \ - * (smaxcol // self.pack.tile_width + 1) - 1 - - smaxcol = min(smaxcol, self.width - 1) - pminrow = max(0, min(self.map.height, pminrow)) - pmincol = max(0, min(self.pack.tile_width * self.map.width, pmincol)) - - self.pad.erase() - self.update_pad() - self.refresh_pad(self.pad, pminrow, pmincol, sminrow, smincol, smaxrow, - smaxcol) diff --git a/squirrelbattle/display/menudisplay.py b/squirrelbattle/display/menudisplay.py index a502b63..54acaed 100644 --- a/squirrelbattle/display/menudisplay.py +++ b/squirrelbattle/display/menudisplay.py @@ -282,3 +282,91 @@ class ChestInventoryDisplay(MenuDisplay): self.menu.position = max(0, min(len(self.menu.values) - 1, y - 2)) game.is_in_chest_menu = True game.handle_key_pressed(KeyValues.ENTER) + + +class CreditsDisplay(Display): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.box = Box(*args, **kwargs) + self.pad = self.newpad(1, 1) + self.ascii_art_displayed = False + + def update(self, game: Game) -> None: + return + + def display(self) -> None: + self.box.refresh(self.y, self.x, self.height, self.width) + self.box.display() + self.pad.erase() + + messages = [ + _("Credits"), + "", + "Squirrel Battle", + "", + _("Developers:"), + "Yohann \"ÿnérant\" D'ANELLO", + "Mathilde \"eichhornchen\" DÉPRÉS", + "Nicolas \"nicomarg\" MARGULIES", + "Charles \"charsle\" PEYRAT", + "", + _("Translators:"), + "Hugo \"ifugao\" JACOB (español)", + ] + + for i, msg in enumerate(messages): + self.addstr(self.pad, i + (self.height - len(messages)) // 2, + (self.width - len(msg)) // 2, msg, + bold=(i == 0), italic=(":" in msg)) + + if self.ascii_art_displayed: + self.display_ascii_art() + + self.refresh_pad(self.pad, 0, 0, self.y + 1, self.x + 1, + self.height + self.y - 2, + self.width + self.x - 2) + + def display_ascii_art(self) -> None: + with open(ResourceManager.get_asset_path("ascii-art-ecureuil.txt"))\ + as f: + ascii_art = f.read().split("\n") + + height, width = len(ascii_art), len(ascii_art[0]) + y_offset, x_offset = (self.height - height) // 2,\ + (self.width - width) // 2 + + for i, line in enumerate(ascii_art): + for j, c in enumerate(line): + bg_color = curses.COLOR_WHITE + fg_color = curses.COLOR_BLACK + bold = False + if c == ' ': + bg_color = curses.COLOR_BLACK + elif c == '━' or c == '┃' or c == '⋀': + bold = True + fg_color = curses.COLOR_WHITE + bg_color = curses.COLOR_BLACK + elif c == '|': + bold = True # c = '┃' + fg_color = (100, 700, 1000) + bg_color = curses.COLOR_BLACK + elif c == '▓': + fg_color = (700, 300, 0) + elif c == '▒': + fg_color = (700, 300, 0) + bg_color = curses.COLOR_BLACK + elif c == '░': + fg_color = (350, 150, 0) + elif c == '█': + fg_color = (0, 0, 0) + bg_color = curses.COLOR_BLACK + elif c == '▬': + c = '█' + fg_color = (1000, 1000, 1000) + bg_color = curses.COLOR_BLACK + self.addstr(self.pad, y_offset + i, x_offset + j, c, + fg_color, bg_color, bold=bold) + + def handle_click(self, y: int, x: int, attr: int, game: Game) -> None: + if self.pad.inch(y - 1, x - 1) != ord(" "): + self.ascii_art_displayed = True diff --git a/squirrelbattle/display/messagedisplay.py b/squirrelbattle/display/messagedisplay.py deleted file mode 100644 index 2b1ec30..0000000 --- a/squirrelbattle/display/messagedisplay.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse -# SPDX-License-Identifier: GPL-3.0-or-later -import curses - -from squirrelbattle.display.display import Box, Display -from squirrelbattle.game import Game - - -class MessageDisplay(Display): - """ - A class to handle the display of popup messages. - """ - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.box = Box(fg_border_color=curses.COLOR_RED, *args, **kwargs) - self.message = "" - self.pad = self.newpad(1, 1) - - def update(self, game: Game) -> None: - self.message = game.message - - def display(self) -> None: - self.box.refresh(self.y - 1, self.x - 2, - self.height + 2, self.width + 4) - self.box.display() - self.pad.erase() - self.addstr(self.pad, 0, 0, self.message, bold=True) - self.refresh_pad(self.pad, 0, 0, self.y, self.x, - self.height + self.y - 1, - self.width + self.x - 1) From 951623089373ede620c26aaae20adcbbaf311afc Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Sun, 10 Jan 2021 15:38:39 +0100 Subject: [PATCH 3/4] We now have a useful Readme with a getting started manual. --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6898db..36482de 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,60 @@ # Squirrel Battle -Attention aux couteaux des écureuils ! +Squirrel Battle is an infinite rogue-like game with randomly generated levels, in which the player controls a squirrel in its quest down in a dungeon, using diverse items to defeat monsters, and trying not to die. + +##Installation + +####Via PyPI : +``` pip install --user squirrel-battle +``` to install + +``` pip install --user --upgrade squirrel-battle +``` to upgrade + +####Via ArchLinux package : +Download one of these two packages on the AUR : + +* python-squirrel-battle +* python-squirrel-battle-git + +####Via Debian package : +Available on our git repository, has a dependency on fonts-noto-color-emoji (to be found in the official Debian repositories). + +Run ``` + dpkg -i python3-squirrelbattle_3.14.1_all.deb +``` after downloading + +In all cases, execute via command line : ```squirrel-battle``` + +##For first-time players + +The game is played in a terminal only, preferably one that supports color, markdown and emojis, but it can be played with only grey levels and relatively classic unicode characters. + +Upon starting, the game will display the main menu. To navigate in menus, use zqsd or the keyboard arrows. To validate one of the options, use the Enter key. Mouse click is also supported in most menus, **but not in game**. + +The game in itself can have two types of display : using ascii and simple unicode characters, or using emojis. To activate emoji mode, go to the settings menu and select the squirrel texture pack. Emojis will not work if the terminal does not support them, so do tests before to ensure the terminal can display them. + +The game is translated (almost entirely) in English, French, German and Spanish. To change the language, go to the settings menu. + +Controls in-game are pretty basic : use zqsd or the keyboard arrows to move. To hit an ennemy, simply go in its direction if it is in an adjacent tile. + +There are several special control keys. They can be changed in the settings menu. + +* To close a store menu or go back to the main menu, use Space +* To open/close the inventory, use i +* To use an object in the inventory, use u +* To equip an object in the inventory, use e +* To use a long range weapon after it has been equipped, use l and then select the direction to shoot in +* To drop an object from the inventory, use r (to pick up an object, simply go on its tile, its automatic) +* To talk to certains entities (or open a chest), use t and then select the direction of the entity +* To wait a turn (rather than moving), use w +* To use a ladder, use < + +And that is all you need to get started! You can now start your adventure and don't worry, floors are randomly generated, so it won't always be the same boring level. ## Documentation -La documentation du projet est présente sur [squirrel-battle.readthedocs.io](https://squirrel-battle.readthedocs.io). +The documentation for the project cen be found at [squirrel-battle.readthedocs.io](https://squirrel-battle.readthedocs.io). It is unfortunately only written in French. + +Anyone interested in understanding how the code works can find a few explanations in the documentation. From 97ecd13c778abfb610013ef037f98b86a9fe8639 Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Sun, 10 Jan 2021 15:45:26 +0100 Subject: [PATCH 4/4] Readme got even better ! --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36482de..4c1356c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The game is translated (almost entirely) in English, French, German and Spanish. Controls in-game are pretty basic : use zqsd or the keyboard arrows to move. To hit an ennemy, simply go in its direction if it is in an adjacent tile. -There are several special control keys. They can be changed in the settings menu. +There are several special control keys, they can be changed in the settings menu : * To close a store menu or go back to the main menu, use Space * To open/close the inventory, use i @@ -59,6 +59,8 @@ There are several special control keys. They can be changed in the settings menu * To wait a turn (rather than moving), use w * To use a ladder, use < +The dungeon consists in empty tiles (you can not go there), walls (which you can not cross) and floor ( :) ). Entities that move are usually monsters, but if you see a trumpet (or a '/'), do not kill it ! It is a familiar that will help you defeat monsters. Entities that do not move are either entities to which you can talk, like merchants and ... chests for some reason, or objects. Differentiating the two is not difficult, trying to go on the same tile as a living entity (or a chest) is impossible. Objects have pretty clear names, so it should not be too difficult determining what they do (if you still don't know, you can either read the docs, or test for yourself (beware of surprises though)) + And that is all you need to get started! You can now start your adventure and don't worry, floors are randomly generated, so it won't always be the same boring level. ## Documentation