AdhamKhalifa / CodePath-SITE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pre-work - Memory Game

Memory Game is a Light & Sound Memory game to apply for CodePath's SITE Program.

Submitted by: Adham Khalifa

Time spent: 3 hours spent in total

Link to project: https://glitch.com/embed/#!/embed/languid-fan-sink?path=README.md&previewSize=0

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

  1. If you used any outside resources to help complete your submission (websites, books, people, etc) list them here.
  1. What was a challenge you encountered in creating this submission (be specific)? How did you overcome it? (recommended 200 - 400 words) JavaScript is not my first language, so I had to get used to the differences in syntax. However, JavaScript is similar to other languages, so this made it easier. To overcome this challenge, I went to W3Schools and read some intro topics to see how different is the syntax for some statements, conditions, loops, functions, etc. I also made sure I read every line in the tutorial carefully to understand the game very well. Sound frequencies in JavaScript were new to me too, so I had to go through it carefully and made sure I understand what these numbers mean when interpreted to sound. Frequencies did not make sense to me as all I thought about them is that humans have a range that they can hear, nothing about music or games on mind. This was the most interesting challenge because whenever I try a number value, I hear a new sound and play with numbers. W3schools was my main resource to overcome both challenges in addition to the webpage from teropa. I think that curiosity made me determined on understanding this topic, and I believe I will be using it a lot in the future because I found it so interesting.

  2. What questions about web development do you have after completing your submission? (recommended 100 - 300 words) Web Development is an interesting world to explore. One of my questions about it after submission is how to put this into action on a real website or server so that people all over the world can use it on their devices? How to write new version of the game and update it without interrupting those playing it? How to make sure that a player does not cheat by checking the JavaScript code and reading the pattern array? How to make sure that no one passes something through JavaScript or other languages and hack into the game server or website?

  3. 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 have added new functions to create more levels. I think of more complicated levels with more buttons and sounds when the player wins the first level. I think of making some fancy winning and losing messages too. I wish I could add an intro screen to get the player's name and connect it to a leaderboard or something to check how well the player's doing compared to other players. I think I could make it a multiplayer game with a split screen so that it can be played by two. This can make the game more interesting and popular.

License

Copyright Adham Khalifa

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.

About


Languages

Language:JavaScript 57.3%Language:HTML 27.6%Language:CSS 15.1%