A python RPG written without the use of external libraries (except audio, which is disabled by default).
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
levels
res
.gitattributes
.gitignore
AI.py
Audio.py
Chest.py
CollisionMgr.py
Combat.py
DrawMgr.py
Driver.py
GUIMgr.py
Interactables.py
Inventory.py
Keyboard.py
LevelMgr.py
Player.py
README.md

README.md

PyRPG

A python RPG written without the use of external libraries (except audio, which is disabled by default).

To enable audio using pyaudio:

  1. Download and use the installer for pyaudio. Google it.
  2. In Driver.py, change self.musicEnabled = False to self.musicEnabled = True
  3. In Player.py, uncomment the line #import pyaudio

And voila. Delicious music and stunning sound effects.


How does the scripting language work?

Here is an annotated template, taken from the included map leftofstart.

Each type of object starts with a specific character:

Warp: |

Event (message popup on hitting e at that tile): *

Monsters: _

Chests: +

Doors: {

#Examples

Warps:

|onescreen2|onescreen2|start|onescreen2|

(Should be read like this: north|south|east|west.

This means if the player hits the north wall of this level,

onescreen2 will load automatically, and the player will appear

on the opposite side of the screen.)

Events:

*4,3,5,Message to be displayed

(Should be read like this:

#x,y/tilenumber/message

The tile 5 by default is set to the sign image, so you may not

want to change it.)

Monsters:

x,y/(H)ostile or (F)riendly/(D)amageable or (ND)/name/health/attack dmg/speed/image/collideable -T or F

_20,6/H/D/Enemy1/5/2/2/1/T

_15,20/H/D/Enemy2/10/2/2/1/T

Chests:

x,y/item

+1,9/crowbar

Doors

{4,10/hands

#MUST BE A SPACE AT THE BOTTOM OF THE LEVEL FILE