AberWebMUD is a university (Aberystwyth) final year Major Project. Designed to be a MUD (themes and gameplay to be decided) thats main focus is to be easy to play and available online without the need for special clients.
Created with Python 3.6.0 and JavaScript ES6 and packaged with:
- Pixi.js v4.3.5 and 4.3.4 (MIT License)
- SocketIO 1.4.5 (MIT License)
- jQuery 3.1.1 (MIT License)
- QUnit 2.2.1 (JS Foundation License)
- "Zelda-like tilesets and sprites" by ArMM1998 (CC0 1.0)
Other technologies used:
- Flask 0.12 (BSD License)
- Flask-SocketIO 2.8.3 (MIT License)
- PostgreSQL
- SQLite
- PonyORM 0.7.1 (Apache License V2.0)
- "Leshy SpriteSheet Tool - Online Sprite Sheet, Texture Atlas Packer"
Check the requirements.txt for dependancy version details Check the LICENSE file for the project's license
The frontend code is built using ES6 Classes, with npm for dependancies and task execution. gulp.js is the main build tool in combination will rollup.js for source bundling.
To build the frontent client without testing:
- Change terminal directory to
server/js-files
- Run
npm install
to resolve project dependancies - Run
npm run build
or justgulp
to bundle the source code.
Building will create the following:
- static/main.js -- Main Client code bundle (served up as part of the main application webpage from Flask)
- static/tests.js -- Test Code, QUnit tests used by Karma or can be ran manually using the /test route
- *.js.map files -- Source Maps for the client/test code to facilitate debugging in-browser.
Once this is built it will be served by the Python server (Flask) through the HTML pages in server/templates/*.html
- Test code entrypoint is
server/js-files/test/main.js
this is bundled intoserver/static/tests.js
with npm/gulp/rollup. - (Main) Run 'npm run test' to build the src/test code and execute Karma Runner testing
- (Optional) Client tests are also available once the server is running at 'localhost:5000/test'
- You first need to satisfy python's dependencies
- Change your terminal directory to the
server
folder - Create a fresh Python local venv called locenv with
python -m venv locenv
, then activate it using:source locenv/bin/activate
- In this venv shell run 'sudo pip install -r requirements.txt' in the
AberWebMUD
project root folder - Run main.py in Python with
python main.py
- visit 'localhost:5000' in a browser
- Change directory to 'server'
- Activate the venv using:
source locenv/bin/activate
- Run: 'python tests/main.py'
The project currently uses an SQLite DB in-memory in order to run locally for development and demonstration. The project can also be run with a PostgreSQL database for a scalable DB platform if deployed (adjusted in database.py), if so you must ensure the PostgreSQL database service is running (database.py should detail what is expected).