Giter Club home page Giter Club logo

snake-on-pure-java's Introduction

Snake on pure Java

About

Very simple snake game code written on pure Java language. Game uses "Constant Game Speed with Maximum FPS" Game Loop. Main logic of game consist of two separate arrays x and y coordinates, without using double array with objects.

Snake is the a one of the most famous older classic video game concept where the player maneuvers a line which grows in length, with the line itself being a primary obstacle.

The size of each of the joints of a snake is by default 32px. The snake is controlled with the WASD keys. Initially, the snake has three joints. If the game is finished, the "Game Over" message is displayed in the middle of the board, then you can start new game.

Prerequisites

JDK 15.0.1

Installation

Download from git using this command:

git clone https://github.com/alma-iceee/Snake-on-Pure-Java.git

Then compile and run Game.class (Shift + F10)

Done! You can start the game!

Settings

You can set snake's speed from 5 up to 15.

If you want change some other settings, you can set it inside of code. For example, change preferred screen size in:

private final int BLOCK_SIZE = 16

However, don't forget to recompile main class after change.

Authors

There are information about us. Click on "About Us" button in Game Menu.

  • Almas Sharipkhan - Main Developer - alma-iceee
  • Askarbek Makhmedov - Contributing Developer - askarbek101

References

License

This project is licensed under the MIT License.

Citation

If you find this code useful for your research, please use the star this repository.

You are welcome to contribute this project.

Thank you!

snake-on-pure-java's People

Contributors

alma-iceee avatar askarbek101 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.