Pre-work - Memory Game
Memory Game is a Light & Sound Memory game to apply for CodePath's SITE Program.
Submitted by: Brian Lam
Time spent: 3 hours spent in total
Link to project: https://glitch.com/edit/#!/joyous-daffy-responsibility
Required Functionality
The following required functionality is complete:
- Game interface has a heading (h1 tag), a line of body text (p tag), and four buttons that match the demo app
- "Start" button toggles between "Start" and "Stop" when clicked.
- Game buttons each light up and play a sound when clicked.
- Computer plays back sequence of clues including sound and visual cue for each button
- Play progresses to the next turn (the user gets the next step in the pattern) after a correct guess.
- User wins the game after guessing a complete pattern
- User loses the game after an incorrect guess
The following optional features are implemented:
- Any HTML page elements (including game buttons) has been styled differently than in the tutorial
- Buttons use a pitch (frequency) other than the ones in the tutorial
- More than 4 functional game buttons
- Playback speeds up on each turn
- Computer picks a different pattern each time the game is played
- Player only loses after 3 mistakes (instead of on the first mistake)
- Game button appearance change goes beyond color (e.g. add an image)
- Game button sound is more complex than a single tone (e.g. an audio file, a chord, a sequence of multiple tones)
- User has a limited amount of time to enter their guess on each turn
The following additional features are implemented:
- List anything else that you can get done to improve the app!
Video Walkthrough
Here's a walkthrough of implemented user stories:
Reflection Questions
-
If you used any outside resources to help complete your submission (websites, books, people, etc) list them here.
MDN Web Docs
-
What was a challenge you encountered in creating this submission (be specific)? How did you overcome it? (recommended 200 - 400 words)
A challenge that I specifically encountered in creating this submission was following the logic of the code that we were asked to make for keeping track of progress and guesses. I was especially confused because I was not exactly sure what each variable represented at that time, so it messed my thinking up when I was trying to go through the code. However, I overcame this block by going through the code line by line and thinking about what each line represents. I also took some time to read more on the varaibles and what exactly they represent, which helped paint an idea of how we were keeping track of guesses and our progress on the game itself.
-
What questions about web development do you have after completing your submission? (recommended 100 - 300 words)
I have an incredible amount of questions now after completing my submission. First of all, it is incredible that you are able to make such a game through just HTML, CSS, and JS. So, as expected, I am now immediately left wondering how much further can you take web development, and in what cases would we need multiple HTML, JS, or CSS files. In addition, since we only made a single-page app in this case, I want to know if it is possible to make multi-page apps and how hard they would be.
-
If you had a few more hours to work on this project, what would you spend them doing (for example: refactoring certain functions, adding additional features, etc). Be specific. (recommended 100 - 300 words)
I would definitely take some time to first digest the functions that were already written to try and understand them better. Then I would first try to do the optional features that were recommended that I have not done yet, such as adding a timer to guesses, and having a "three strikes" system, as I believe that would enhance the game by a big margin. Next, I would definitely try to tackle the style of our website to make it more aesthetically pleasing.
License
Copyright Brian Lam
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
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.