GithubHelp home page GithubHelp logo

androidcollidesquare's Introduction

AndroidCollideSquare

Player Instruction

To play this game, you need to move the green square on the screen and try your best to not collide with any black blocks. You will get five points when each blocks disappear on the screen, and will die once you collide with any black blocks.

Note: Occasionally you may see white screen when you open the app. It is probably because your computer runs too slow. Try to reopen (most of time no need to reinstall) the app and wait for few seconds.

Classes and Functions

This game includes three activities.

MainActivity: this activity shows the canvas, which is the Game View of the game.

SubmitActivity: this activity will appear once you end the game. It will show your score and allow you to put your name. It also includes menu that allows you to directly restart the game or go to leader board activity without storing your name and score.

BoardActivity: this activity will show up after you click the submit button in the SubmitActivity or after you click the icon button in the menu. This activity shows the TOP 5 players in the game and allow you to reset the leaderboard with confirmation. It also includes menu bar that allows you to restart the game. It uses sharePreference to store that past top 5 players’ data. It uses a ListView with custom adapter to show the results of top five players.

Game View and Characters

GameView: GameView is the main canvas of the game. It implemented SurfaceView, a custom View, and GameThread, a thread to control all animations/drawings.

Sprite: the black rectangle in each line/bar.

SpriteList: this class that creates a list of black rectangle that share same characteristics. It also includes the collide function and scoring function.

Player: the class where created the characteristics of players

Constants: it scores some constants such as screen width and screen height for the game.

GameObject: an interface for player and sprites

androidcollidesquare's People

Contributors

cocozhao321 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.