Giter VIP home page Giter VIP logo

fetris's Introduction

Fetris (Fake Tetris)
Assignment 1 - CSC2003S

To Run:

Requires Gradle

Go to desktop/build/libs/ and double click on the jar file.

Alternatively:

Unix based OS: ./gradlew desktop:run

Windows: gradlew.bat desktop:run

To Build:

Requires Gradle
Unix based OS: ./gradlew desktop:dist

Windows: gradlew.bat desktop:dist

The built .jar file will be in desktop/build/libs/

To run it after build, change to the above directory and run: java -jar desktop-1.0.jar

Controls:
Control - Key
Move Left - Left Arrow
Move Right - Right Arrow
Move Down - Down Arrow
Drop Down - Spacebar
Rotate - Right Shift
Move Up - Up Arrow (Bonus Feature)"
Toggle Move Up - U
Reset game - Enter
Toggle music - M

Special features:
Music playing in background
Blocks can move upwards if the upwards toggle is on

Implementation
Used a form of bitmapping to populate an array with different values corresponding to different blocks and then printing an image corresponding to the block.

Gameplay

The gameplay involves the player moving and positioning the various pieces in an attempt to complete rows and avoid the blocks stacking to the top of the play area.


The player can move the blocks left or right and the blocks can be rotated using the Right shift key.

As an interesting extra feature, blocks can also be moved upwards if the up toggle is on.

The player can drop the block from its current position. It will stop when it collides with the floor or another block.

After the blocks land, there is a time (the same as the rate at which the block falls) in which the block can be moved.

Finally, once the game is over, a popup saying "Game over!" will appear

*BUGS*
Pressing the spacebar too soon after a block is generated will generate another block on top of the current one and the game will think the game is over.

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.