Skip to content
Himank Deka edited this page Mar 27, 2024 · 12 revisions

Welcome to PyTextGame

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.

Documentation

  1. The Playground class in pytextgame.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 as importData], and play used for starting the game [Parameters: player 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 of Room class in any dimension, and set whether the target platform is Windows.

  2. The pytextgame.io module contains 2 methods for taking input - optionList: shows a list of options and inputs a choice [Parameters: option_list], and getch` used for taking a charecter as input.

  3. The Room class in the pytextgame.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...

Current status

The library is currently under development. It is undergoing continuous updates. The full release will be available in PyPi and GitHub in a few weeks. Currently the v0.1 release that is uploaded here is live on PyPi. Please download the stable release given in the Releases or using pip as the master branch is currently unstable.

Message to Contributors

Thank you to all the contributors for their priceless efforts to make this software better. Contributions are not currently accepted.

By Himank Deka [@dev-hd11]

Clone this wiki locally