-
Notifications
You must be signed in to change notification settings - Fork 1
Home
PyTextGame is a text-based game development library which can be used to make console-based games. This package is available both on GitHub and on PyPi.
-
The
Playground
class inpytextgame.core
is the main class. It is used for managing your game. It has 3 functions -importData
used to import the saved game state [Parameters:msg: bool
used for hiding or showing logs],saveData
used for saving game state [Parameters:data
dictionary containing game information,msg:bool
same asimportData
], andplay
used for starting the game [Parameters:player
https://github.com/dev-hd11/pytextgame/wiki/Home/_history instance of the Player class. while initializing you need to provide it - the path to the JSON file used for storing data, the map of the game which is a list containing the objects ofRoom
class in any dimension, and set whether the target platform is Windows. -
The
pytextgame.io
module contains 2 methods for taking input -optionList
: shows a list of options and inputs a choice [Parameters:option_list
], andgetch
used for taking a character as input. -
The
Room
class in thepytextgame.components.rooms
is used for creating a room. A 'room' is a particular environment for a stage or a scene of your game.
Documentation will be continued...
The latest stable version, v1 is available on PyPi.
We reccommend to download using pip
.
- By Himank Deka.
Copyright ©️ 2023 Himank Deka