LambdaMUD--Anthony Greb #131
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adventure Project Week
This week you'll be implementing a frontend interface for a multi-user
dungeon (MUD) game called LambdaMUD. The backend is partially written
but needs to be completed.
Using API requests, clients are able to create, read, update and delete
data on remote servers but what if the server needs to initiate a
request to the client? Say, to alert them that another player has
entered their room or that they have received a chat message. This is
where WebSockets come in.
WebSocket is a computer communications protocol, providing full-duplex
communication channels over a single TCP connection. You will be using
the Pusher service to handle the WebSocket connections for your project.
You can read more about them here.
You are to treat this week as if you are working at a company and the
instructor is your client. The project managers will be your main
support throughout the week.
The main objective of this week is to develop the MVP feature set listed
below using any other technologies you have learned here at Lambda
School. There are design files in this repository you should use as a
creative guide.
Git Commits
This will let your project manager know where you are and if you need
help. This also allows the client to get progress reports from the
company in a real world setting.
Trello Set Up:
backlog,To Do,In Progress, andDoneTo Dolist with the MVP features listed belowbackloglist with all the extra features listed belowhttps://trello.com/b/62H8aKgt/lambdamud-anthony-greb
MVP Features:
Client
saycommand to say things that other people in the room will see (server implementation incomplete)p-channel-<uuid>broadcastevents and display the messages to the playerServer
saywhich broadcasts a message to other players in the current roomGeneral
Upon your first commit, please submit a Pull Request and add both the
Trello Set Up and MVP Features Task lists to your first Pull
Request comment:
Once you have completed the Minimum Viable Product requirements,
direct message your project manager for approval. If approved, you may
continue working on the Extra Features.
Once your MVP has been approved, you have been given a feature list that
the client would love to have completed. Your goal would be to finish
MVP as soon as you can and get working the list of features.
Extra Features:
shoutcommand that broadcasts a message to every playerwhispercommand that sends a private message to a single playerDirections
Set up a Pusher account
Set up your local server
Set up your virtual environment
pipenv --threepipenv installpipenv shellAdd your secret credentials
.envin the root directory of your projectRun database migrations
./manage.py makemigrations./manage.py migrateAdd rooms to your database
./manage.py shellutil/create_world.pyinto the Python interpreterRun the server
./manage.py runserverTest API commands
Registration
curl -X POST -H "Content-Type: application/json" -d '{"username":"testuser", "password1":"testpassword", "password2":"testpassword"}' localhost:8000/api/registration/{"key":"6b7b9d0f33bd76e75b0a52433f268d3037e42e66"}Login
curl -X POST -H "Content-Type: application/json" -d '{"username":"testuser", "password":"testpassword"}' localhost:8000/api/login/{"key":"6b7b9d0f33bd76e75b0a52433f268d3037e42e66"}Initialize
curl -X GET -H 'Authorization: Token 6b7b9d0f33bd76e75b0a52433f268d3037e42e66' localhost:8000/api/adv/init/{"uuid": "c3ee7f04-5137-427e-8591-7fcf0557dd7b", "name": "testuser", "title": "Outside Cave Entrance", "description": "North of you, the cave mount beckons", "players": []}Move
curl -X POST -H 'Authorization: Token 6b7b9d0f33bd76e75b0a52433f268d3037e42e66' -H "Content-Type: application/json" -d '{"direction":"n"}' localhost:8000/api/adv/move/{"name": "testuser", "title": "Foyer", "description": "Dim light filters in from the south. Dusty\npassages run north and east.", "players": [], "error_msg": ""}<name> has walked north.<name> has entered from the south.Say (NOT YET IMPLEMENTED)
curl -X POST -H 'Authorization: Token 6b7b9d0f33bd76e75b0a52433f268d3037e42e66' -H "Content-Type: application/json" -d '{"message":"Hello, world!"}' localhost:8000/api/adv/say/<name> says "Hello, world!"Deploy server to Heroku
heroku config:set KEY=VALUEheroku run python manage.py shell)Client Frontend
initrequest upon loading game view to receive the player's starting location and uniqueidp-channel-<uuid>and bind tobroadcasteventsbroadcastmessages by displaying them to the player@Dilstom