Giter Site home page Giter Site logo

snake-game's Introduction

SnakeGame

Classic Arcade Game- Snake

Project Report - Snake Game

By Pratibha Natani

Course: Software Engineering and Testing-Portland State University

Date: 30 January 2013

Project Description: This game has a board and a snake. There are food items on the board for the snake to consume. The snake moves around on the board and eats the food piece. As it consumes the food piece a new piece is created on the board and the snake length increases by 1. The user can control the direction of the snake with arrow keys. The player cannot stop the snake from moving while the game is in progress, and cannot make the snake go in reverse. If the snake head touches itself or the walls it dies.

Project Requirements:

  1. The following minimum game parameters should be set by the player and processed by PHP prior to the start of a game:

  2. Board size

  3. Snake pace

  4. Number of possible simultaneous goals

  5. Game behavior should be consistent with traditional rules of play as described on Wikipedia or other available web resources

  6. The game animates itself

  7. The player directs the head of the snake

  8. Colliding with goals/food lengthens the snake

  9. Colliding with walls or the tail of your snake ends the game

  10. Main game controls should be the keyboard arrow keys

  11. Score should be tracked and displayed during play

  12. An external style sheet should be present to skin the app

  13. There should be no JavaScript errors when the app runs

  14. The game has three levels. As the snake consumes specific number of food items the user reaches next level and with each level the snake pace is faster.

Project Files:

  1. index.html – The main page of the project which draws a form where user can choose his game options like – Board Size, Snake Pace and No of goals.

  2. Snake.php – This file has embedded PHP and Javascript code. PHP script extracts the form parameters from the index.html and processes them. The parameters are used by Javascript to set the game. This file has the main control logic for enabling the game.

  3. Snake.css- External style content for the index.html and Snake.php files.

  4. food.png- Image of the food item drawn on the board.

  5. snake.png- Image of the snake segments which are used to draw the snake.

  6. Snake_Report.docx- Brief project summary.

Tools/Languages Used:

• Javascript, PHP, HTML, CSS

• Firebug Lite 1.4.0, Wamp Server, Sublime Text2

References/Collaboration:

http://www.tizag.com/phpT/forms.php

http://www.w3schools.com/js/js_objects.asp

snake-game's People

Contributors

pnatani 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.