Code Monkey home page Code Monkey logo

snake-3d's Introduction

Snake-3D

A simple classic Snake3D game made with unity 5.3

The snake starts with 3 pieces and increase one piece for each fruit eaten.

A new fruit will appear in a random place with particles effect and sound effect every time the snake eats it, and there are 2 types of fruits int the game. The number of fruit pieces can be changed by the user. There are a number of rocks as obstacles and can also be determined by the user. The sanke dies in one of 3 cases:

  • Hitting the border
  • Hitting an obstacle
  • Hitting itself

The snake moves in 4 directions (ie. 4 angles) and the movement can be done with arrow keys, mouse swiping or touch swiping for mobile phones using swipe manager script (link below). The main menu is very simple with start button. Afetr clicking start a loading text appears for a couple of seconds until the game loading is finished. There are also some plant 3D models to simulate a garden and the game plane has a grass material sourrounded by 4 walls and the snake has a snake texture to simulate a real snake.

I have implemented a new feature in which the player can change the camera position with 3 modes:

  • close (like fps)

- middle

- far

And the pause button enables the player to pause the game at any time. After the snake dies the lose scene will be loaded showing the score of the player and a play again button which load the main menu again.

The game is suitable for mobile phones and was tested on some devices like (Galaxy S3, Galaxy S5, Note 4)

Demo Video: https://youtu.be/Ep0TP4F3A0U

Resources and useful links

Swipe manager script
https://forum.unity3d.com/threads/swipe-in-all-directions-touch-and-mouse.165416/page-2#post-2741253

particles
https://www.youtube.com/watch?v=TEZm8cfJnDg
https://www.assetstore.unity3d.com/en/#!/content/72399

Materials
https://www.assetstore.unity3d.com/en/#!/content/21113
https://www.assetstore.unity3d.com/en/#!/content/57060

Sounds
https://opengameart.org/content/rpg-sound-pack
https://incompetech.com

Grass models
https://opengameart.org/content/multi-stylized-grass

snake-3d's People

Contributors

awchi avatar rami965 avatar

Stargazers

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