- What is project about?
- How navigate through website
- Brief look at files
- Setup
- Things to improve
- Some things I'm proud about
Magic Journey is simple role-play game made for Harvard CS50Web course as capstone. Website was made with Django and JavaScript.
As not logged in you could see only top navbar and project title. To start playing you have to register/login.
After register/login you could see button under title "Start your journey!". It creates your character. Now click "Return to journey!" (you will see this button everytime you log in to website) and you now can play! You have story in middle, your character card on right and action buttons on bottom.
After clicking your name next to "Start" button you could see you character card, when you can spend your skills points, your current equipment and items, that you can equip. Every player starts with his wand only, but you can buy items on Diagon Alley.
There you can find answers to your questions about game.
Contain piece of code too large to write in views.py or these one I use multiple times.
Some simple htmls for main site, register, login and userpage. I think userpage it's quite nice, put much work to implement skills points and equip/unequip.
This is where my fight with CSS and JS took place. JS files have been split to modules. In overwiew each module should contain functions from another place in game or another game system.
For Magic Journey I've created 6 models: Player - created for each user. Containt all skills and equipment. Wand, Robe, Book - equipment classes. Wands and robes have own statistics, books have charms. Charms - could be learned by player, have various effects. Creature - beasts player fight against.
Text files with stories that appears while playing.
Folder with FAQ file.
Open your terminal and write:
git clone https://github.com/dylodylo/magic-journey.git
cd magic-journey
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Then create file .env in finalproject
directory and write secret key in it.
cd finalproject
nano .env
SECRET_KEY='YourSecretKey'
After that go back root folder.
cd ..
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
-
Registration - I've tried to implement account activation by email and password reset, but still can't do that.
-
Deploy - I've tried deploy website to Heroku, but can't deal with static files.
-
My fight with JavaScript has ended with success. Files are quite in order and could be reused if I ever would like to expand game or create fight or skills system for another game.
-
Website look isn't the best, but legible and tidy.
-
Ended CS50web course.
-
I've made my own Harry Potter based game! :)