Giter Site home page Giter Site logo

snake-game's Introduction

Forks Stargazers Issues



Game screen

game_screen

Snake Game

A basic snake game program with progress load & save

View Demo · Report Bug · Request Feature



About The Project

A simple snake game app in java

There are currently 6 features implemented.

  1. User can use arrow keys to move the snake
  2. User can see previous scores
  3. User can continue game from the previous play, or can decide to play new game
  4. Snake gets faster every 10 eat, also reduces the amount of apple to eat

For initial start, snake usually starts at the middle. Snake cannot move in reverse direction, because the snake cannot eat itself.

Demo image and video

Video

main_menu

Screen_board

screen_board

(back to top)


Built With



How to run?

Java jre must be installed first, please download newest java from here In oder to execute the program, please download the file by forking this repository. Or you can download a zipfile from above tab.


Prerequisites

Data files are version sensitive, app version mismatch will cause error on data load.

Usage

Entertainment

Contact

Marco Backman - [email protected]

(back to top)

snake-game's People

Contributors

marcobackman avatar

Stargazers

 avatar

Watchers

 avatar

snake-game's Issues

Graphical change creates a jittering problem.

Problem: Graphical jitter happens on when changing graphical effects on every 50ms. For example, some process delays generally greater than 50ms.

Possible solution: https://gafferongames.com/post/fix_your_timestep/

long beforeTime = System.currentTimeMillis();

//Do execution that takes time

long sleepTimeBetweenRefresh = System.currentTimeMillis() - beforeTime;
if(sleepTimeBetweenRefresh < 0) sleepTimeBetweenRefresh = 0;

This will reduce the processing time gap based on the previous processing time.

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.