-
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
Playgroundclass inpytextgame.coreis the main class. It is used for managing your game. It has 3 functions -importDataused to import the saved game state [Parameters:msg: boolused for hiding or showing logs],saveDataused for saving game state [Parameters:datadictionary containing game information,msg:boolsame asimportData], andplayused for starting the game [Parameters:playerhttps://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 ofRoomclass in any dimension, and set whether the target platform is Windows. -
The
pytextgame.iomodule contains 2 methods for taking input -optionList: shows a list of options and inputs a choice [Parameters:option_list], andgetchused for taking a character as input. -
The
Roomclass in thepytextgame.components.roomsis 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