amirshukayev / omegahero Goto Github PK
View Code? Open in Web Editor NEWGuitar Hero, but for the Arduino
Guitar Hero, but for the Arduino
ΩHero (Arduino) CMPUT 274 Assignment 3 (Final Project) DESCRIPTION This game is modeled based off of GUITAR HERO and TAP TAP REVENGE Currently features 7 amazing songs!! We recommend: Chinese and Song in C Major. Don't miss any notes, since you will lose lives. Features: randomly generated play and music! (it still sounds great though, except for dissonance in no particular key) TO RUN THE CODE Unzip the folder Open terminal to the unzipped directory Type "make" into the terminal Connect your Arduino Mega 2560 to the virtual machine, wired as below Type "make upload; serial-mon" into the terminal to upload the code to the Arduino ACCESSORIES 1x Arduino Mega 2560 1x Adafruit_ILI9341 Touchscreen 1x Piezo Buzzer Assorted wires WIRING INSTRUCTIONS Adafruit_ILI9341 Screen [pin from screen -> pin to Arduino]: GND -> GND Vin -> 5V 3Vo NOT CONNECTED CLK -> 52 MISO -> 50 MOSI -> 51 CS -> 10 D/C -> 9 RST NOT CONNECTED Lite NOT CONNECTED Y+ -> A2 (analog pin) X+ -> 4 (digital pin) Y- -> 5 (digital pin) X- -> A3 (analog pin) IM0 NOT CONNECTED IM1 NOT CONNECTED IM2 NOT CONNECTED IM3 NOT CONNECTED CCS -> 6 CD NOT CONNECTED Piezo Buzzer [Choice of Lead1 and Lead2 of the buzzer is arbitrary]: 47 (Arduino) -> Lead1 (buzzer) -> |Piezo Buzzer| -> Lead2 (buzzer) -> 5V (Arduino) FILE STRUCTURE screenLogic.cpp is the main file which contains the functions for the game as a whole as well as the imports from other files menus.cpp handles drawing, updating and interacting with the menu system sorting.cpp handles the sorting of the song list using Quicksort menus.h / sorting.h are the header files for the above two files, respectively song.h is the structure for the storage of song metadata GAME INSTRUCTIONS - Most information is obvious through on screen instructions - The Back button always sends you to the previous screen or exits a submenu - The scroll arrows on the right of the screen become active if there is more information off screen in that direction. Press them to scroll up or down - In the Difficulty Select screen, Easy Mode sets your starting lives to 5 and Hard Mode sets your starting lives to 1 - In the Song Select screen you can select the song you wish to play to begin the game - The Sort submenu in Song Select lets you modify the order in which the songs are displayed on in the list, based on the listed parameter - Highscores are listed from song with the highest score to song with the lowest (unless no scores are recorded, in which case it is alphabetical by title) - In game tap the circles at the bottom of the screen as the "note" is passing through it to score points. If you are incorrect with your timing you will lose a life and not score a point. - If you reach 0 lives you lose the game, and if your final score was higher than the previous highest score for that song it will be saved as a new High Score! HELP AND INFO - The touch screen is oriented differently than it was in previous projects, such that the top of the screen is the side furthest from the Arduino - The touch screen can seem to be a bit inaccurate in the menus at times, but that is because the actual main point of contact of your finger to the screen is lower than you would expect - The wiring is relatively straightforwards - The serial monitor displays information of the execution of the code, such as output from the sorting methods, however it is not used as an input and is not required to play the game - The game is played entirely through the touch screen, thus all menu navigation and gameplay is handled there. It should be intuitive what each button does, but the game instructions above are more explicit - The length and difficulty of each song has no bearing on gameplay and are purely for demonstrating the multiple options for sorting the list. The actual difficulty of the game is controlled in the Difficulty Select menu. - Each song corresponds to a different set of sounds with a semi-random sequence of "notes" to hit, with each game ending when you run out of lives - High Scores reset upon restarting the Arduino - If adding new songs to the song list make sure to add the metadata to the appropriate location of each array for the name, length (in seconds), difficulty (1-3, 3 being the hardest), source game title, and composer / artist - If you have added or removed any songs be sure to modify the numsongs variable and the initial size of the songs array - The order of the audio notes in the song is a set of preset arrays of frequencies in the different keys which are chosen at random - The order of the visual notes (that you tap in game) is based on a semi-random array of preset values NOTE Implements code created by TAs and instructors of the course (from eClass) Wiring instructions based on ones from eClass Created by Amir Shukayev (1506343) and Navras Kamal (1505463) December 2017 ____ _ _ / __ \ | | | | | | | || |__| | ___ _ __ ___ | | | || __ |/ _ \ '__/ _ \ _\ \/ /_| | | | __/ | | (_) | (___||___)_| |_|\___|_| \___/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.