Name | rpg-e JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-09-08 00:56:53 |
maintainer | None |
docs_url | None |
author | Ethan Illingsworth |
requires_python | <4.0,>=3.11 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# RPG-Engine
RPG-Engine (RPG-E) is a simple python module to make rpg like boards with npcs, interactable objects, and more to come.
## Table of Contents
* [Install](#install)
* [Quick Start](#quick-start)
* [Docs](#docs)
* [Contribute](#contribute)
## Install
To install you can use pip
```
pip3 install rpg-e
```
## Quick Start
After you install RPG-E from pip and have setup your project you can import what you need from the ```rpg_e.game``` Module.
```py
from rpg_e.game import Game, Color, Point
```
Before you can start building your game you first need to setup the ```Game``` object.
Note: all of these properties have defaults, you are not required to set them unless you want to change the default.
```py
from rpg_e.game import Game, Color, Point
game = Game()
# width is how long the game board will be
# Default: 100
game.width = 100
# height is how tall the game board will be
# Default: 100
game.height = 100
# view_distance is how far the player can see in either direction,
# Default: 9
game.view_distance = 9
# PLAYER.color can be used to change the color of the player
# Default: Color.BLUE
game.PLAYER.color = Color.BLUE
# PLAYER.position can be used to change the default position of the player
# Default: Point(0, 0)
game.PLAYER.position = Point(0, 0)
```
After you set all the ```Game```'s settings to your liking, you can run the ```setup()``` function which will start the game-loop.
```py
from rpg_e.game import Game, Color, Point
game = Game()
# This will start the main loop
game.setup()
```
## Docs
This is where you can figure out how to do almost anything with RPG-E.
### Tile
The `Tile` is any object that is in your game, a player, water, path, any object that can be drawn on screen.
The `Tile` has a variety of diffrent properties listed here:
`char` is the charcter that will be displayed in the game world. Default: `█`.
`color` is the color the `Tile` will be displayed as in the game world. Default: `Color.WHITE`.
### Player
The `Player` is a slightly modified version of the `Tile`, The `Player` will have all the properties listed [here](#tile)
Here are the `Player`'s unique properties:
`position` is the point at where the `Player` is placed in the game world. Default: `Point(0,0)`.
### HUD
To start modifying the hud, you must first get a `game` setup, if you havent done so already see [Quick Start](#quick-start).
After you have setup your game you can add hud elements with `add_hud_element()`.
```py
from rpg_e.game import Game, Color, Point
game = Game()
def move_player_left():
# this would move the player
return
# add_hud_element takes in 3 paramters
# key: str - What the user will type to execute the function
# desc: str - Describe what function does to player
# function: function - Code to execute when player types in key
game.add_hud_element("a", "Move Left", move_player_left)
game.setup()
```
## Contribute
Pull requests and Issues are more than welcome, whether it's as simple updating and refining the [Documentation](#docs) or fixing bugs and adding new features.
Raw data
{
"_id": null,
"home_page": null,
"name": "rpg-e",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Ethan Illingsworth",
"author_email": "illingsworth.ethan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/82/0e/eb35e77cd27c205c5596a1cf7393563f5b6aa8b3bfbd25d3554213032c49/rpg_e-1.0.0.tar.gz",
"platform": null,
"description": "# RPG-Engine\nRPG-Engine (RPG-E) is a simple python module to make rpg like boards with npcs, interactable objects, and more to come.\n\n## Table of Contents\n* [Install](#install)\n* [Quick Start](#quick-start)\n* [Docs](#docs)\n* [Contribute](#contribute)\n\n\n\n\n## Install\nTo install you can use pip\n\n```\npip3 install rpg-e\n```\n\n## Quick Start\nAfter you install RPG-E from pip and have setup your project you can import what you need from the ```rpg_e.game``` Module.\n\n```py\nfrom rpg_e.game import Game, Color, Point\n```\n\nBefore you can start building your game you first need to setup the ```Game``` object.\n\nNote: all of these properties have defaults, you are not required to set them unless you want to change the default.\n\n```py\nfrom rpg_e.game import Game, Color, Point\n\ngame = Game()\n\n# width is how long the game board will be\n# Default: 100\ngame.width = 100 \n\n# height is how tall the game board will be\n# Default: 100\ngame.height = 100\n\n# view_distance is how far the player can see in either direction,\n# Default: 9\ngame.view_distance = 9\n\n# PLAYER.color can be used to change the color of the player\n# Default: Color.BLUE\ngame.PLAYER.color = Color.BLUE\n\n# PLAYER.position can be used to change the default position of the player\n# Default: Point(0, 0)\ngame.PLAYER.position = Point(0, 0)\n```\n\nAfter you set all the ```Game```'s settings to your liking, you can run the ```setup()``` function which will start the game-loop.\n\n```py\nfrom rpg_e.game import Game, Color, Point\n\ngame = Game()\n\n# This will start the main loop\ngame.setup()\n```\n\n## Docs\nThis is where you can figure out how to do almost anything with RPG-E.\n\n### Tile\nThe `Tile` is any object that is in your game, a player, water, path, any object that can be drawn on screen.\n\nThe `Tile` has a variety of diffrent properties listed here:\n\n`char` is the charcter that will be displayed in the game world. Default: `\u2588`.\n\n`color` is the color the `Tile` will be displayed as in the game world. Default: `Color.WHITE`.\n\n### Player\nThe `Player` is a slightly modified version of the `Tile`, The `Player` will have all the properties listed [here](#tile)\n\nHere are the `Player`'s unique properties:\n\n`position` is the point at where the `Player` is placed in the game world. Default: `Point(0,0)`.\n\n### HUD\nTo start modifying the hud, you must first get a `game` setup, if you havent done so already see [Quick Start](#quick-start). \n\nAfter you have setup your game you can add hud elements with `add_hud_element()`.\n\n```py\nfrom rpg_e.game import Game, Color, Point\n\ngame = Game()\n\ndef move_player_left():\n # this would move the player\n return\n\n# add_hud_element takes in 3 paramters \n\n# key: str - What the user will type to execute the function\n\n# desc: str - Describe what function does to player\n\n# function: function - Code to execute when player types in key\n\ngame.add_hud_element(\"a\", \"Move Left\", move_player_left)\n\ngame.setup()\n```\n\n\n\n## Contribute\nPull requests and Issues are more than welcome, whether it's as simple updating and refining the [Documentation](#docs) or fixing bugs and adding new features.",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "1.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2abd8bc8dac49530e1de060f1cef7e5e4a5deee6868bcce3101aa440db5be3cf",
"md5": "e4e145fd309837a617106a58d6a87a7c",
"sha256": "3300541ef555569357d55d61ef491640b7364d3ad68dfaec40e61cd7e3b74976"
},
"downloads": -1,
"filename": "rpg_e-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4e145fd309837a617106a58d6a87a7c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 3401,
"upload_time": "2024-09-08T00:56:51",
"upload_time_iso_8601": "2024-09-08T00:56:51.681394Z",
"url": "https://files.pythonhosted.org/packages/2a/bd/8bc8dac49530e1de060f1cef7e5e4a5deee6868bcce3101aa440db5be3cf/rpg_e-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "820eeb35e77cd27c205c5596a1cf7393563f5b6aa8b3bfbd25d3554213032c49",
"md5": "91ee4c9c08916817c3a032d866d7404f",
"sha256": "997c30f3d43365977ab456e68207a89d515743213097d02ae3bafcb6728fb821"
},
"downloads": -1,
"filename": "rpg_e-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "91ee4c9c08916817c3a032d866d7404f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 2739,
"upload_time": "2024-09-08T00:56:53",
"upload_time_iso_8601": "2024-09-08T00:56:53.174254Z",
"url": "https://files.pythonhosted.org/packages/82/0e/eb35e77cd27c205c5596a1cf7393563f5b6aa8b3bfbd25d3554213032c49/rpg_e-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-08 00:56:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "rpg-e"
}