Skip to content

Dofmor/light-and-memory-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre-work - Memory Game

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

Submitted by: Daniel Morales

Time spent: 8 hours spent in total

Link to project: (https://glitch.com/edit/#!/light-and-memory)

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:

Starting and ending the game:

Losing the game:

Winning the game:

Reflection Questions

  1. If you used any outside resources to help complete your submission (websites, books, people, etc) list them here.

I used the following site to look for javascript’s array length function https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

I used the following site for learning about background images https://www.w3schools.com/cssref/pr_background-image.asp https://stackoverflow.com/questions/8683528/embed-image-in-a-button-element

I also used the following site to look for a complementing color palette https://visme.co/blog/website-color-schemes/

  1. What was a challenge you encountered in creating this submission (be specific)? How did you overcome it? (recommended 200 - 400 words)

The most challenging aspect about this project was learning how to use three languages that I had never used before. While I was working on the project, I had trouble learning about each language’s syntax because I kept switching between which language I was working with. Prior to this, I had only ever used one language at a time for whole projects. Also, other languages tended to have only syntax differences or have unique features such as Java’s automatic garbage collector. For those reasons I had trouble understanding how to use three separate languages that complemented one another and had their specific purpose.

I was able to overcome this challenge two ways. The first thing I did was use my prior experience with coding projects to be able to understand the syntax. HTML and CSS was quite different from what I was used to but javascript’s syntax was easier to pick up because to me it is similar to Java. The second was simply rereading the code several times to be able to understand how the project worked. By tracing what was happening across the three files I was able to see how a button was able to call a function.

  1. What questions about web development do you have after completing your submission? (recommended 100 - 300 words)

I used Safari at first to work on the project. I eventually switched to Chrome for unrelated reasons and noticed that the project looked different on it compared to Safari. My first question about web development is, which browsers do you take into consideration when creating a product?

This is the first project I worked on where I used multiple languages that had their own specific purpose. Another question I have is, what other languages can be used for web development and what makes them worth using over another?

I understand that I made a static web page but I’m also wondering how I would be able to make dynamic websites that save users prior actions?

  1. 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)

If I had a few more hours I would try to add a function for random patterns each time because by the time I was recording the gif I was already familiar with the pattern. Another feature I would like to add is a timer for the user. If I knew how to use photoshop or something similar I would like to add a custom background image to each button. I’m thinking in terms of having each button having their own distinct color and shape. My reason for thinking of adding this feature is that it would add accessibility to the color blind because some colors on the buttons are only different shades of brown.

License

Copyright Daniel Morales

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published