Skip to content

rutavshah/FinalAndroidProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We created three games for our CSC207 project. In this project, we have an android application where
we have seperate games. All the three games have three separate sub games in it.

Game 1: The Labyrinth
Info: In this game we have a bunch of barriers and a ball. The basic purpose of the game to get the
ball through the barrier or avoid it. In this game we have 3 lives for the player.
We have 3 sub game for this game -

    Level 1: In this level, we have to dodge the barriers that appear on the screen.

    Level 2: In this level, we have to go through on top of a single barrier that appears on the screen.

    Level 3: In this level, we have to go through two barriers that appear on the screen.

We have an easter egg in this game: If you lose your lives on score 1, 3 and 6, then you win the game!
The other way to win the a game is score 15 points in that if selected 'easy' mode or 20 if selected
'hard mode'.

We are applying the Strategy design pattern by using Algorithm interface to decrease coupling and
increase cohesion.

Game 2: The Matching Game
Info: In this game the goal is to click the ball on the left that matches certain ones on the right
If you select hard mode you will have 5 tries (incorrect answers) and default easy mode is 7 tries

    Mode 1: Click the ball on the left that matches the yellow one on the right, score 7 to win

    Mode 2: Click the balls on the left that DO NOT match the yellow one on the right, score 15 to
    win

    Mode 3: Just like game mode, but the stat tracked is accuracy get 60% accuracy after at least 5
    clicks on the ball to win




Game 3: The Memory Game
Info: In this game the user is first shown 9 colored balls for a short duration.
They should be memorise the position of these colored balls. After this short duration, they will be
prompted with one of those colored balls. The player should now select the position of the ball
where this colour had initially appeared and they receive a point.

Levels: For every 3 correct answers, the level increases. When the level goes up, the player is given at
most 3 extra lives(if they had lost any) and an extra point. The difficulty of the game increases,ie,
they are given fewer time to complete each stages of the next level.
Every 6 correct answers, the user gains back all their lives and get 2 extra points.

Lives: The user is given 7 lives which appear as hearts in the game. This means they can make at
most 7 wrong attempts. They gain back lives as they complete levels.

Easter Egg: If the player selects the 4 corner balls in such a way that they end up having only 1
life left then they will be granted with 25 extra points and all of their lives back!


Committing errors in the beginning:
Step 1
Created a folder hierarchy to organize the 3 games and a main activity

Step 2
Added features to memory game. This is explained more in the members section

Step 3
Deleted corrupted files which were created by accidentally merging two games. The two games are safe
and backed up elsewhere

Step 4
Created game files for game1. More explained in member section below.

Step 5
Created a main home with buttons that connect to three games

Step 6
Created a stats page.

Step 7
Updated main activity to connect to game1 and the stats page



Started committing the files and added README.txt for keeping the track
#############
Step 1
Member: Sargunan Gurumurthy
Commit made: Created the main Activity class and added the background and buttons.

Step 2
Member: Uttkarsh Berwal
Commit made: Added the README file. Connecting the MainActivity with Level1(Activity), Created
classes MainThread and Level1view to create the canvas for game1(Level1).

Step 3
Member: Aditya Goyal
Commit made: Added the barrier.java, Button.java, ChildBall.java, GameManager.java - These classes
makes the object entities required in the first game. Also, connected the whole Level1 game

Step 4
Member: Uttkarsh Berwal
Commit made: Added GameStats(activity) to keep the record of the score of the games.

Step 5
Member 1: Sargunan Gurumurthy
Changes made: Created Ball.java, Level2.java, GameView.java. This handles front end for
level1. Added some game logic in GameView which will be refactored into a manager class.
Connected MainActiity to Level3.
Member 2: Zohaib Rehman
Commit made: Added Ball.java, Level3.java, GameView.java which were created previously. Created and
added MainThread. Created and added GameManager.java to handle all backend logic for the game.
Code previously handling game-logic in GameView has been refactored into the GameManager.java.

Step 6
Member 1: Uttkarsh Berwal
Changes made: made a datapath to connect Level1 final score to be accessible in MainActivity and
GameStats. added game 1 score and total score to displayed on the game stats page. The scores are
accessed and modified using saveData() and loadData()
Member 2: Zohaib Rehman
Commit made: using SharedPreferences, created two methods loadData() and saveData() to be able to
save any score for any game. made these methods such that it is extensible when more games are added
or when user account system is implemented.

Step 7
Member: Zohaib Rehman
Commit made: added game 3 to be displayed in stats page and will now be used to calculate the total
score. GameManager.java draw method for game2 now also dynamically changes message to
show what is to be done next.

Step 8
Member: Sargunan Gurumurthy
Commit made: added login page, created buttons and linked them to Main activity. Also made the
transition from mainActivity to second main activity.

Step 9
Member: Rutav Shah
Commit made: added code for , added Ball.java, Level2.java, Level2view.java, Line.java and
MainThread.java under the level2 package. Connected the game to the main screen.

Step 10
Member: Sargunan Gurumurthy
Commit made: added customisation page, created buttons and linked them to Main activity. Also passed
data from the customisation page to level 3 and corrected the code correspondingly.

Step 11
Member: Zohaib Rehman, Uttkarsh Berwal
Commit made: Added a register account functionality. Log in now only works if user has first
registered his/her account. If log in has wrong credentials then a toast message is displayed.

Step 12
Member: Uttkarsh Berwal, Zohaib Rehman
Commit made: Added customization page for game 1.

Step 13
Member1: Rutav Shah
Commit made: Made methods in Level2View class to make the code cleaner, implemented randomization
code from
Member 2
Member2: Tony Liu
Commit made: Tony: made randomization code for the lines

Step 14
Member: Rutav Shah
Commit made: fixed coordinates for random lines between two balls

Step 15
Member: Zohaib Rehman
Commit made: Changed the background gradient

Step 16
Member: Rutav Shah
Commit made: Added Score tracking to Game 2 and made it display on the scores page. Fixed overall structure of
the game to resemble a running game by using OnTouch, Run, update, etc. methods.

Step 17
Member: Zohaib Rehman
Commit made: Added customizable background(forest/city) for game 3. Fixed alignment of buttons on
log in page.

Step 18
Member: Zohaib Rehman
Commit made: Game 3 now has infinite levels with 7 lives. For every mistake made, number of lives
decreases by 1.

Step 19
Member: Zohaib Rehman
Commit made: Added hearts at the bottom of the game 3 screen to show how many lives are left.

Step 20
Member: Zohaib Rehman
Commit made: Added delay when a correct answer is chosen in game 3 so that the user can see his
result.

Step 21
Member: Rutav Shah
Commit made: Made main screen after login include imagebuttons so that user can get a preview of
what game they are playing before they select it

Step 22
Member: Rutav Shah
Commit made: Added background for game1 in drawables folder

Step 23
Member: Zohaib Rehman
Commit made: Added game sounds in game 3 for feedback on correct and wrong responses

Step 24
Member: Zohaib Rehman
Commit made: Added looping background music to game 3

Step 25
Member: Zohaib Rehman
Commit made: Fixed an issue which caused music to continue even when activity was destroyed. Added
 whoosh sound in game 3 when colors flip.

Step 26
Member: Aditya Goyal
Commit made:
            - Created lives system.
            - changed the background from grass to forest.
            - Made the barriers of the game 1 more smooth and accurate.
            - Added the class Life.java.
            - Made functionality to pick up lives from the path.
Step 27
Member: Uttkarsh Berwal
Commit made: Added the files for the implementation of MVP architecture. Also, added the feature
            which takes the user to game2 when they win game1.

Step 28
Member: Tony Liu
Commit made: Added an activity containing 3 buttons that lead into their corresponding modes for
Level2, as well as instruction buttons.

Step 29
Member: Rutav Shah
Commit made: Added in a common Interface for Drawable objects (Line and Balls) and used inheritance
to separate two sets of balls.

Step 30
Member: Rutav Shah
Commit made: Added a new class that handles creating objects seen in the game that also reduces
the work GameManager does.

Step 31:
Member: Uttkarsh Berwal
Commit made: Cleaned the architecture and removed some extra dependencies in Level1. Also, grouped
them into different packages.

Step 32:
Member: Rutav Shah
Commit made: Added files for MVP architecture. Implemented Strategy design Pattern for game modes.

Step 33:
Member: Sargunan Gurumurthy
Commit made: Converted all reading and writing in main code to use firebase database.

Step 34:
Member: Rutav Shah
Commit made: Fixed android manifest.

Step 35:
Member: Rutav Shah
Commit made: Added other game modes, followed MVP structure.

Step 36:
Member: Sargunan Gurumurthy
Commit made: Modified code to use firebase to calculate highscore for game 3.

Step 37:
Member: Zohaib Rehman
Commit made: Implemented Builder Design Pattern in Game 3 for building game elements.

Step 38:
Member: Zohaib Rehman
Commit made: Implemented Builder Design Pattern in Game 3 for building a facade for sounds

Step 39:
Member: Zohaib Rehman
Commit made: Added packaging to game 3 and changed some access modifiers to package-private for
data protection and others to public to support packaging

Step 40:
Member: Uttkarsh Berwal
Commit made: Removed the left and right move buttons from Level1 and added a touch & slide control.
Also removed some unwanted dependencies in the code.

Step 41:
Member: Sargunan Gurumurthy
Commit made: Cleaned up code to catch errors and added an easter egg where player gets an extra life
after 5 correct entries.

Step 42:
Member: Sargunan Gurumurthy
Commit made: Updated game 1 to use firebase to keep track of highscore.

Step 43:
Member: Zohaib Rehman
Commit made: Added new point and lives system that rewards levelling up.
    Added correct radio fields and instructions in the customise page.
    Added new sound when user gains lives.

Step 44:
Member: Zohaib Rehman
Commit made: Added class GameStates to be used by GameManager. This reduces the responsibility of
the GamaManager and is closer to Single Responsibility Principle.

Step 45:
Member: Zohaib Rehman
Commit made: Added an easter egg to game 3.

Step 46:
Member: Zohaib Rehman
Commit made: Game 3 gets progressively harder as one levels up

Step 47:
Members: Uttkarsh Berwal and Aditya Goyal
Commit made: Three sublevels introduce in the first game(Level1 package) and added a easter egg to
win the entire Level.

Step 48:
Member: Tony Liu
Commit made: Re-positioned buttons, changed background, and changed layout to constraint layout in
instructions.xml

Step 49:
Members: Aditya and Uttkarsh
Commit made: Three sublevels for game1 Completed.

Step 50:
Member: Aditya Goyal
Commit made: Three sublevels for game 1 are distinctly shown and activity_level_selection.xml made uniform.

Step 51:
Members: Rutav Shah
Commit made: Added in support for all three game modes, modes end when a certain score is reached
added in a "hard" mode option.

Step 52:
Member: Aditya Goyla
Commit made:- Trimmed the repeated code
            - Removed code redundancies
            - Corrected the behaviour of level_selection_activity

Step 53:
Member: Zohaib Rehman
Commit made: Added javadoc and removed unused import statements and variables.

Step 54:
Member: Zohaib Rehman
Commit made: Fixed issues with the .gitignore file.

Step 55:
Member: Rutav Shah
Commit Made: Added limited tries in level 2, also an undo button for the first time you lose.

Step 56:
Member: Zohaib Rehman
Commit made: Added javadoc to Main Activities and Game Stats.

Step 57:
Member: Zohaib Rehman
Commit made: Fixed firebase support in game 2.

About

Final Project of CSC207

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published