Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
8039dae
starter code n shiii
Oct 6, 2020
7b5764d
yeah
Oct 6, 2020
0525d3c
added prelim login & signUp implementation
jdang4 Oct 7, 2020
9f1c391
fixed small typo
jdang4 Oct 7, 2020
4df31c8
Update server.js
jdang4 Oct 7, 2020
b699a0b
Started working on login front-end
Oct 7, 2020
d18a3c6
basic front-end for login page
Oct 7, 2020
c03dbc7
login page done
Oct 7, 2020
08a400c
small changes in the home screen
Oct 7, 2020
2741c50
no spell check
Oct 7, 2020
be78a7f
got login/signup to work, need to take a look at TODO
jdang4 Oct 7, 2020
01f8c0a
Merge branch 'master' of https://github.com/WebwareClassProject/final…
jdang4 Oct 7, 2020
d684510
Added some stubs
Oct 7, 2020
8c95927
slight refactor to make things better
Oct 7, 2020
785d9bd
managed to get a failure message to be sent back when using passport …
jdang4 Oct 7, 2020
261ed87
fixed some issues with auth. Simplified it a bit. Not perfect
Oct 7, 2020
33bae52
solved merge conflict
Oct 7, 2020
b6fe353
Merge pull request #1 from WebwareClassProject/stubs
ieroshenko Oct 7, 2020
280a945
ensure client can connect to ably back-end
Oct 8, 2020
4a83826
added prelim code to verify movement
jdang4 Oct 8, 2020
b9295dc
UI renders the board, players and explosions correctly
Oct 8, 2020
43f8628
be able to register the key inputs
jdang4 Oct 8, 2020
3deeafe
merged with master
Oct 8, 2020
e67dedb
added a comment
Oct 8, 2020
ad17b25
starting work on moveEveryPlayer and canMove to determine walls, coin…
clay-ol Oct 8, 2020
15b78f3
resolved merge conflict from ui-render to master
jdang4 Oct 8, 2020
d4a3c3e
got rid of duplicate directions
jdang4 Oct 8, 2020
d72548b
merged in changes (nothing substantial, mostly comments)
clay-ol Oct 8, 2020
a76b8ab
resolved merge conflict, moveEveryPlayer() commented out
clay-ol Oct 8, 2020
41f4373
updated subscribeToPlayerInput to accurately move based on key press
clay-ol Oct 8, 2020
a32c1b7
added score display
Oct 8, 2020
30c2420
deleted join leeave updates
Oct 8, 2020
0291e4e
merge conflicts fixed
Oct 8, 2020
df4a5a6
Merge pull request #2 from WebwareClassProject/display-score
ieroshenko Oct 8, 2020
dafd68a
updated game server logic to continually move player once key is pres…
clay-ol Oct 9, 2020
05a7c5e
resolved merge with updated server game logic
clay-ol Oct 9, 2020
c6f80eb
fixed errant unresolved merge due to not saving file...
clay-ol Oct 9, 2020
2671565
Added board array
adriannaStaszewska Oct 9, 2020
dc9d081
Updating board
adriannaStaszewska Oct 9, 2020
4a07977
displaying walls and coins. UI side for updating coins on the front e…
Oct 10, 2020
db83ab6
solved ein merge conflict
Oct 10, 2020
0afec8f
Merge pull request #3 from WebwareClassProject/display-border
ieroshenko Oct 10, 2020
49e9050
merged with master
Oct 10, 2020
828eceb
Merge pull request #4 from WebwareClassProject/ui-render
ieroshenko Oct 10, 2020
cd4aa18
taking notes on moveEveryPlayer()
clay-ol Oct 10, 2020
86580c1
Merge branch 'master' of https://github.com/WebwareClassProject/final…
clay-ol Oct 10, 2020
feeab2d
displaying the board now
Oct 10, 2020
78339ff
fixed wall array
clay-ol Oct 10, 2020
38e39c4
have some working implementation on handling collision
jdang4 Oct 10, 2020
38541c7
clientside detection of walls is now implemented, spawn location is c…
clay-ol Oct 10, 2020
e1072ab
Collecting coins
adriannaStaszewska Oct 10, 2020
fd4de02
cleaned up the implementaion to make it easier to read
jdang4 Oct 11, 2020
8636f4d
updated
jdang4 Oct 11, 2020
13fbf8d
resolved bug
jdang4 Oct 11, 2020
9c12a16
resolved error when making a collision of more than 2 users
jdang4 Oct 11, 2020
7104054
fixed bug where player would move twice on keyboard input - there was…
clay-ol Oct 11, 2020
46f99a6
made the update
Oct 11, 2020
3246da5
Merge branch 'master' into ui-coins
Oct 11, 2020
61c185a
hmmm
Oct 11, 2020
544bbf9
coin collection is done on ui
Oct 11, 2020
8b9b51e
Merge pull request #5 from WebwareClassProject/ui-coins
ieroshenko Oct 11, 2020
1888174
updated player spawning logic to spawn players in the four corners of…
clay-ol Oct 11, 2020
cd9aecd
resolved merge conflict in handlePlayerEntered - startGaameDataTicker…
clay-ol Oct 11, 2020
24a78c8
initializing coins differently
Oct 11, 2020
d348801
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 11, 2020
b93f1a3
UI ready for new coin format
Oct 11, 2020
9e84281
coin collection works
Oct 12, 2020
3f99c95
implemented game to end if all or 1 player is left in game
jdang4 Oct 12, 2020
e982674
merged dead-players branch with master
jdang4 Oct 12, 2020
e189c57
resolved bug when 2 players try to enter in game
jdang4 Oct 12, 2020
1dec3fe
Saving scores to db
adriannaStaszewska Oct 12, 2020
5275e03
changed a line to play with multiple players
Oct 12, 2020
fb888e2
styles + leaderboard + game over redirect + sized down avatars
Oct 12, 2020
80bba31
handle game room is full
Oct 12, 2020
8b364f4
Merge pull request #6 from WebwareClassProject/ui-shit
ieroshenko Oct 12, 2020
d9bde14
changed color
Oct 13, 2020
26acd5b
commented out some stuff
Oct 13, 2020
5cd8385
changed base server url
Oct 13, 2020
4893795
fixed animations
Oct 13, 2020
4022462
Logging score fixed
adriannaStaszewska Oct 13, 2020
1c3fa3e
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 13, 2020
e81743d
implemented game to end when all coins were obtained
jdang4 Oct 13, 2020
7b71db3
Merge branch 'master' of https://github.com/WebwareClassProject/final…
jdang4 Oct 13, 2020
580cb41
fixed the logging
Oct 13, 2020
2053973
bug
Oct 13, 2020
c28de10
reseting positions
Oct 13, 2020
414aa3e
test
Oct 13, 2020
416ca79
possible fix
Oct 13, 2020
14e9603
possible fix
Oct 13, 2020
16152f2
Trigger Heroku deploy after enabling collectstatic
Oct 13, 2020
9f53f4d
please
Oct 13, 2020
d7cda7d
fix?
Oct 13, 2020
81d01e5
monster stubs
Oct 13, 2020
f1d4458
fixed issue of all players dying upon a 2 player collision
jdang4 Oct 13, 2020
5730b60
resolved merge conflict
jdang4 Oct 13, 2020
119bac8
changed monster position to be scaled according to grid
Oct 13, 2020
014fc2d
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 13, 2020
930f098
monster is displayed on UI
Oct 13, 2020
0dedec5
changed ui monster coordinates to be exact ones
Oct 13, 2020
9fd03fc
Monster movement
adriannaStaszewska Oct 13, 2020
21c148c
Merge branch 'master' of https://github.com/WebwareClassProject/final…
adriannaStaszewska Oct 13, 2020
7ae3bb2
Stupid monster movement
adriannaStaszewska Oct 13, 2020
2bc27cb
Monsters kill players
adriannaStaszewska Oct 13, 2020
7f166c8
added basic music playing functionality
clay-ol Oct 13, 2020
6d92332
resolved small merge conflict from script.js
clay-ol Oct 13, 2020
b802c4f
adjusted to handle monsters
jdang4 Oct 13, 2020
919d50a
Merge branch 'master' of https://github.com/WebwareClassProject/final…
jdang4 Oct 13, 2020
bcf0f79
added more monsters
Oct 13, 2020
11ed01a
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 13, 2020
5bc2f47
fixed my bug :)
jdang4 Oct 13, 2020
23f7527
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 13, 2020
4944bbf
players will now not move upon spawning
clay-ol Oct 13, 2020
d025d40
wtf
Oct 13, 2020
eaf9e21
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 13, 2020
6593158
log in description text
Oct 13, 2020
e504af3
some redesign or what not for buttons
Oct 13, 2020
f716579
updated readme
clay-ol Oct 13, 2020
99f6244
Merge branch 'master' of https://github.com/WebwareClassProject/final…
clay-ol Oct 13, 2020
c364367
updated readme formatting
clay-ol Oct 13, 2020
8582e5d
still fixing bullet points...
clay-ol Oct 13, 2020
1907fad
changed monster avatar color to red
Oct 14, 2020
46b2ccf
Merge branch 'master' of https://github.com/WebwareClassProject/final…
Oct 14, 2020
b1193c4
monster is almost done
Oct 14, 2020
eb07087
seems to be working
Oct 14, 2020
2df0dc0
got rid of a log statement
Oct 14, 2020
614b1a7
Merge pull request #7 from WebwareClassProject/boss
ieroshenko Oct 14, 2020
52fe25a
yeah boy
Oct 14, 2020
b4866e8
resetting the state
Oct 14, 2020
52abe72
trying to block players
Oct 14, 2020
db075d9
double to tripple
Oct 14, 2020
b9b3985
should be fine
Oct 14, 2020
ce6a85e
read me update
Oct 14, 2020
ebba78e
unsubscribing from player when he leaves
Oct 14, 2020
6508d19
may be fix
Oct 14, 2020
8342d54
cleared some logs
Oct 14, 2020
a3d2ff2
tried to fix
Oct 14, 2020
a53f52e
possible fix
Oct 14, 2020
dae022c
may be
Oct 14, 2020
cfd8a1b
checking inrange fix
clay-ol Oct 14, 2020
fe61c8d
changed monster kill interaction
Oct 14, 2020
801698c
may be/
Oct 14, 2020
1470f07
I think it fixed it. After every monsters move also check if he kills…
Oct 14, 2020
d8ea0f9
changed html title
Oct 15, 2020
0eaf813
changed save player score
Oct 15, 2020
5a9b601
quick fix
Oct 15, 2020
06072a8
please work
Oct 15, 2020
1daec36
Merge pull request #8 from WebwareClassProject/monster-kill
ieroshenko Oct 15, 2020
8d27fab
added video link to readme
clay-ol Oct 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config.env
node_modules
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/final-project.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 27 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,33 @@
# cs4241-FinalProject
# Team Members: Jonathan Dang, Ivan Eroshenko, Clay Oshiro-Leavitt, Adrianna Staszewska

For your final project, you'll implement a course project that exhibits your mastery of the course materials.
This project should provide an opportunity to be creative and to pursue individual research and learning.
1. We created an exciting multimedia experience - Pacpeople. This web application is a modern take on the hit classic - Pacman. This time, there are multiple players and takes place on a larger game board. With up to four human players and 5 monsters, the game can become quite intense and challenging.

## General description
Game Link: https://pac-people.herokuapp.com

Your project should consist of a complete Web application, exhibiting facets of the three main sections of the course material:

- Static Web page content and design. You should have a project that is accessible, easily navigable, and features significant content.
- Dynamic behavior implemented with JavaScript (TypeScript is also allowed if your group wants to explore it).
- Server-side programming *using Node.js*. Typically this will take the form of some sort of persistent data, authentication, and possibly server-side computation. Ideally it will also include support for realtime commmunication as discussed below.
- Groups are *highly encouraged* to consider including some type of realtime communication technology in their projects (chat, networked multiplayer games, collaborative coding/editing, video/audio via WebRTC etc.) We'll be discussing many of these technologies in class next week.
- A video (less than five minutes) where each group member explains some aspect of the project. An easy way to produce this video is for you all the groups members to join a Zoom call that is recorded; each member can share their screen when they discuss the project or one member can "drive" the interface while other members narrate (this second option will probably work better.) The video should be posted on YouTube or some other accessible video hosting service.

## Project ideation

Excellent projects serve someone/some group; for this assignment you need to define your users and stakeholders. I encourage you to identify projects that will have impact, either artistically, politically, or in terms of productivity. Consider creating something useful for a cause or hobby you care about.

## Logistics

### Team size
Students are will work in teams of 3-5 students for the project; teams of two can be approved with the permission of the instructor. Working in teams will allow you to build a good project in a limited amount of time.

### Deliverables

__Proposal:__
Provide an outline of your project direction and the names of the team members.
The outline should have enough detail so that staff can determine if it meets the minimum expectations, or if it goes too far to be reasonable by the deadline.
This file must be named proposal.md so we can find it.
Submit a PR to turn it in by Monday, 11:59 PM

There are no other scheduled checkpoints for your project.

#### Turning in Your Outline / Project

**NOTE: code is due before the project presentation day due to the end of term / grading schedule constraints**
Submit a second PR on the final project repo to turn in your app and code.

Deploy your app, in the form of a webpage, to Glitch/Heroku/Digital Ocean or some other service.
Folks on the same team do not need to post the same webpage, but must instead clearly state who is on the team in their proposal.

The README for your second pull request doesn’t need to be a formal report, but it should contain:

1. A brief description of what you created, and a link to the project itself.
2. Any additional instructions that might be needed to fully use your project (login information etc.)
2. Additional instructions: you can play as a single person, however it is preferable to play with 1-3 other players. You can open up multiple browser windows to test the multiplayer aspect. If two players run into each other they will die.
3. An outline of the technologies you used and how you used them.
4. What challenges you faced in completing the project.
5. What each group member was responsible for designing / developing.
6. A link to your project video.

Think of 1,3, and 4 in particular in a similar vein to the design / tech achievements for A1—A4… make a case for why what you did was challenging and why your implementation deserves a grade of 100%.

## FAQs
4. While working, we quickly discovered the limitations of Ably’s free services. We continually exceeded Ably’s message rates and limits, resulting in several of our accounts being suspended while testing. We also ran into issues with the maximum message size that is allowable over Ably. This required some rework of our message design to fit within the allowable message size.
5. Team Workload:
- Jonathan Dang
- Handled logic of players colliding with one another
- Handled the detection of when game ended
- Helped out with player movement logic
- Clay Oshiro-Leavitt
- Wall detection and move validation logic
- Player spawn location logic
- Player movement logic
- Integration and composition of game music
- Ivan Eroshenko
- Implemented UI
- Helped to give a head start on project implementation
- Implemented the boss with A*

- Adrianna Staszewska
- Coin collection by players
- Updating user’s scores in the database
- Movement of monsters

6. Here is the link to our project demonstration video.
https://youtu.be/Lpv8TB81V8g

- **Can I use XYZ framework?** You can use any web-based frameworks or tools available, but for your server programming you need to use node.js. Your client-side language should be either JavaScript or TypeScript.
23 changes: 23 additions & 0 deletions config/db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const mongoose = require("mongoose")

const connectDb = async(mongoUri) => {
try {
const conn = await mongoose.connect(mongoUri, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
});


console.log(`MongoDB Connected: ${conn.connection.host}`)


} catch (e) {
console.log(e);
process.exit(1);
}
}



module.exports = connectDb
Empty file added config/passport.js
Empty file.
16 changes: 16 additions & 0 deletions middleware/auth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
ensureAuth: function (req, res, next) {
if (!req.user) {
res.redirect("/login");
} else {
next();
}
},
ensureGuest: function (req, res, next) {
if (req.user) {
res.redirect("/");
} else {
return next();
}
}
}
Loading