Skip to content

Aberystywh Uni final year Major Project (and onward) Multi-User Dungeon

License

Notifications You must be signed in to change notification settings

TheDarrenJoseph/AberWebMUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AberWebMUD

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.

Build info, references, and licenses

Created with Python 3.6.0 and JavaScript ES6 and packaged with:

Other technologies used:

Check the requirements.txt for dependancy version details Check the LICENSE file for the project's license

js-happiness-style python-pylint-style

Main Example Screenshot

Building the project

Frontend

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:

  1. Change terminal directory to server/js-files
  2. Run npm install to resolve project dependancies
  3. Run npm run build or just gulp 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

Running JavaScript client tests (QUnit/Karma Runner)

  1. Test code entrypoint is server/js-files/test/main.js this is bundled into server/static/tests.js with npm/gulp/rollup.
  2. (Main) Run 'npm run test' to build the src/test code and execute Karma Runner testing
  3. (Optional) Client tests are also available once the server is running at 'localhost:5000/test'

Backend / Running the server

  1. You first need to satisfy python's dependencies
  2. Change your terminal directory to the server folder
  3. Create a fresh Python local venv called locenv with python -m venv locenv, then activate it using: source locenv/bin/activate
  4. In this venv shell run 'sudo pip install -r requirements.txt' in the AberWebMUD project root folder
  5. Run main.py in Python with python main.py
  6. visit 'localhost:5000' in a browser

Running Python server tests (unittest)

  1. Change directory to 'server'
  2. Activate the venv using: source locenv/bin/activate
  3. Run: 'python tests/main.py'

Postgres vs SQLite

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).

About

Aberystywh Uni final year Major Project (and onward) Multi-User Dungeon

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages