Skip to content

MattSharp05/StarWarsMemoryGame

Repository files navigation

Pre-work - Star Wars Memory Game

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

Submitted by: Matthew Sharp

Time spent: 25 hours spent in total

Link to project: https://glitch.com/edit/#!/handsome-prong-tune?path=script.js%3A15%3A13

Try it yourself: https://handsome-prong-tune.glitch.me/

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:

  • Added a dynamic background with stars that twinkle
  • Centered everything to the middle of the webpage
  • Implemented a Star Wars theme for the game and updated the style of the buttons, headings and text accordingly
  • Added placeholder images to the button that chages when the button lights up or is clicked
  • Adjusted the time allowed per sequence so player has a more reasonable time limit for finding longer patterns

Video Walkthrough (GIF)

If you recorded multiple GIFs for all the implemented features, you can add them here:

Full Walkthrough:

Player loses after 3 mistakes:

Player loses after running out of time:

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) [I faced quite a few challenges when building this project. This was mainly because I had never used Javascript, HTML, or CSS before. I had quite a bit of difficulty figuring out how to use CSS to style the webpage, particularly because implemented my own design because I wanted my submission to be unique. I had quite a bit of difficulty centering all the content horizontally and had to use multiple resources to figure this out. It also took me quite a while to implement a dynamic background. I overcame these difficulties using my usual problem-solving techniques that involve figuring out the basics and building from there. I tried a lot of things that ended up not working which helped me learn a lot. I also struggled to implement a timer for the guesses. I had to look through several different websites for ideas on how to do that. It was also difficult for me to change the appearance of each button from the placeholder when unclicked to the character when clicked. I originally had these as images on the buttons that would appear and disappear depending on the state of the button. This caused several prolems and was not easy to implement. The buttons kept changing size depending on which images were on them. I solved this problem by setting the images as backgounds on the button and switched between the two backgrounds. This was much easier to implement and worked a lot better. To come up with this solution, I had to learn about styling the backgrounds of buttons. I also wanted to add custom sounds to the buttons. I wanted to add sound clips of the characters speaking when their buttons are lit but I couldn't find those audio clips on the internet. ]

  2. What questions about web development do you have after completing your submission? (recommended 100 - 300 words) [My first question would be: What are the next steps and where would I go from here if I wanted to launch this site? How would I host it? My second question would be: What is the best way to go about developing a webpage? Here we used Glitch which was really helpful as a way to learn, but if I wanted to create a professional website, what would be the optimal way of going about that? I also have many questions about CSS and the potential it allows for styling. I am very interested in styling websites with CSS now because I had a lot of fun designing this project. I intend to learn more about this.]

  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 wanted to implement different settings in the game. I wanted the user to be able to choose how long the sequence should be instead of having it as a fixed number. I also wanted to add a progress bar that would show the user how many guesses they have made and how many guesses they still have to make. I was also having so much fun styling the website with CSS and I have so many more ideas about how I could improve the design of the website. I want to mess around with the headings and text and see how differently I could style it. I also wanted to add unique sounds to the buttons. I thought about adding sound clips of the different characters speaking when their buttons are lit. I thought this would be a really cool feature but it was taking me too long to find the sound clips on the internet.]

Interview Recording URL Link

My 5-minute Interview Recording

License

Copyright [YOUR NAME]

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

Light and Sound game with Star Wars theme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published