Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/khuong #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
49 changes: 24 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CoderSchool FTW - * Nam, the Monster Hunter *
# CoderSchool FTW - _ Nam, the Monster Hunter _

Created with love by: Charles Lee
This is a simple Canvas-based game that requires a solid understanding of the principles of JavaScript programming to customize.

This is a simple Canvas-based game that requires a solid understanding of the principles of JavaScript programming to customize.

## Video Walkthrough

@@ -12,39 +12,38 @@ Here's a walkthrough of implemented user stories.

## Code Reviews

This code was reviewed by @username and @otherusername.

* [Link to PR #X](#) - reviewed by @username.
* [Link to PR #Y](#) - reviewed by @otherusername.
This code was reviewed by @username and @otherusername.

- [Link to PR #X](https://github.com/vanmitG/canvas_game_starter/pull/1) - reviewed by @username.
- [Link to PR #Y](#) - reviewed by @otherusername.

## Required User Stories

- [ ] I have at least three code reviews from others.
- [x] The user can move their character with the arrow keys.
- [x] The user can move their character with the arrow keys.
- [x] The user can see a monster.
- [ ] The monster is placed at a random location within the game boundaries.
- [x] The monster is placed at a random location within the game boundaries.
- [x] The user can catch a monster by moving their character to the same location as a monster.
- [ ] When the user catches a monster, a new monster is placed randomly upon the screen.
- [ ] The user can see the numbers of monsters she has caught. Every time she catches a monster, the number should increment by one.
- [ ] The game ends when the user has caught 20 monsters. The total time elapsed is displayed upon game completion, in seconds.
- [ ] The user can access this game from the internet (e.g. using Netlify).
- [ ] The code has been reviewed by at least one other person, using Pull Requests on GitHub.
- [x] When the user catches a monster, a new monster is placed randomly upon the screen.
- [x] The user can see the numbers of monsters she has caught. Every time she catches a monster, the number should increment by one.
- [x] The game ends when the user has caught 20 monsters. The total time elapsed is displayed upon game completion, in seconds.
- [x] The user can access this game from the internet (e.g. using Netlify).
- [x] The code has been reviewed by at least one other person, using Pull Requests on GitHub.

## Optional User Stories

- [ ] Custom styling: the developer has replaced the images for the main character, monster, and background with something of her choice.
- [ ] The user cannot move her character off the screen.
- [ ] The user sees a few different types of monster each time a new monster is spawned.
- [ ] The monster moves around on its own each frame, and the user must chase it.
- [ ] The map has "obstacles", such as trees, which block the user from moving through the space occupied by the obstacle.
- [ ] The user can hear sound effects upon movement and upon catching a monster.
- [ ] The user hears background music during the game.
- [ ] The user can see their high score.

- [x] Custom styling: the developer has replaced the images for the main character, monster, and background with something of her choice.
- [x] The user cannot move her character off the screen.
- [] The user sees a few different types of monster each time a new monster is spawned.
- [ ] The monster moves around on its own each frame, and the user must chase it.
- [ ] The map has "obstacles", such as trees, which block the user from moving through the space occupied by the obstacle.
- [ ] The user can hear sound effects upon movement and upon catching a monster.
- [ ] The user hears background music during the game.
- [x] The user can see their high score.

The following **additional** features are implemented:

* [x] List anything else that you can get done to improve the page!
- [x] List anything else that you can get done to improve the page!

## Time Spent and Lessons Learned

@@ -66,4 +65,4 @@ Describe any challenges encountered while building the app.
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
11 changes: 11 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#gameContainer {
width: 980;
height: 680;
display: flex;
justify-content: flex-end;
align-items: center;
}
.noScroll {
max-width: 100vw;
overflow-x: hidden;
}
369 changes: 303 additions & 66 deletions game.js

Large diffs are not rendered by default.

Binary file added images/0756dd46e11b3ce.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/assetList.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/backgroundN1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/backgroundN2 - Copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/backgroundN2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/blackGhost2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/blackGhostSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bonfire_PNG44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bush1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fireSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ghost_PNG85.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hero2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pondFrog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pondFrog2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/shrekSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/shrek_PNG5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stone-bush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stone1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stoneSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stoneSmall2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stone_PNG13589.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/stone_PNG13590.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/water-2748638_960_720.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/waterSmall.png
64 changes: 62 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="utf-8" />
<title>Best Game Ever!</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"
/>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="container">
<h2 class="text-center">Canvas Game</h2>
<div
class="row col-md-12 d-flex justify-content-center align-items-center"
>
<div class="col-md-2">
<button
id="playAgain()"
class="btn btn-outline-success"
onclick="playAgain()"
>
Play Again
</button>
</div>

<div class="col-md-10 d-flex justify-content-center">
<h6 class="alert alert-success">
Timer:
<span id="timePlay"></span>
</h6>

<h6 class="alert alert-success">
Score Number:
<span id="scoreNumber">
Your Catch
</span>
</h6>
<h6 class="alert alert-success text-center">
Your High Score: <span id="playerHighScore"></span>
</h6>
<h6 class="alert alert-success">
Game Number:
<span id="gameNumber">1</span>
</h6>
<h6 class="alert alert-success">
Best Score: <span id="highScore"></span>
</h6>
</div>
</div>

<!-- <h3 id="endOfGame"></h3> -->

<div class="container d-flex justify-content-center align-items-center">
<div class="row col-md-12 noScroll">
<div id="gameContainer"></div>
</div>
</div>
</div>

<script src="game.js"></script>
</body>
</html>
</html>