Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 2.15 KB

README.md

File metadata and controls

68 lines (50 loc) · 2.15 KB

Srijana - OpenGL based 2D Snake game

A C++ and OpenGL based game made for 5th semester Graphics Project and Neural Network used to display snake quad to move towards food in random state with both keyboard press and neural processing to locate food using artificial intelligence AI for automatic playing and score monitoring.

Currently in beta state

Srijana features

Note: Make sure you have opengl, freeglut3-dev & libgl1-mesa-dev

Installation

Clone the source locally:

$ git clone https://github.com/aryaminus/srijana
$ cd srijana
$ make run

else

$ git clone https://github.com/aryaminus/srijana
$ cd srijana
$ g++ main.cpp -lGL -lglut -lGLU -o main
$ ./main

For Codeblocks:

  • Open local source file main.cpp from Srijana directory

  • Before Build & Run, goto:

-> Settings / Compiler / Global Compiler Settings / Linker Settings
  • in Other linker options:
-lGL -lglut -lGLU

Working Flowchart

Todo

  • Fix gluPerspective from glOrtho when moving from welcome() to DrawNeural()
  • When clicked User/Play_Neural, resize is needed which needs to be fixed
  • Implementation of better algorithm than Q-learning
  • Header to show score in window for DrawUser
  • Setup for Keyboard press to navigate snake

Reference

  1. snake
  2. snake-unix
  3. airplane-game
  4. q_snake

Contributing

  1. Fork it (https://github.com/aryaminus/srijana/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Enjoy!