Giter Site home page Giter Site logo

fistofhit / snake Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 9 KB

A VERY light weight game of snake made in plain JavaScript for a bit of fun when you're bored and there is no internet.

License: MIT License

HTML 11.40% JavaScript 88.60%
javascript html light-weight-game hacky practice-project game-development snake

snake's Introduction

JSnake

A VERY light weight game of snake made in plain JavaScript for a bit of fun when you're bored and there's no internet. Made after watching this video on Youtube by Gamkedo. Obviously, I've changed the code a fair amount to make things less "hacky" and clearer, but it's still nevertheless very simple and quick to run.

Requirements and Installation

Only need to have an internet browser (works in Chrome, not sure about IE), and a few KB of free space.

Just clone/download/Ctrl+c-Ctrl+v and open in your browser

Usage

Playing is very simple, simply use the 4 arrow keys (up, down, left and right) to control the snake. Hitting the walls means you'll teleport to the other side and continue in the same direction. The aim is to collect and eat the red apples to grow (1 unit per apple eaten) and make progress. The catch is that if you turn back on yourself or collide into your own body, you will restart from being 5 units long.

Contributing

There really isn't much to add if you only want to play, but if you want to add features to the game that dont require any libraries or super-genius tricks, feel free to take the code and build upon it. Perhaps keep a watch on this repository to have the latest version of the game!

Credits

The idea and methods I used are learnt from Gamkedo's Youtube video and so credit should go to him for this concept.

License

MIT license, so feel free to use and develop for your own fun!

snake's People

snake's Issues

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.