Skip to content

A C++ and Opengl based game to draw a window leading to snake which runs on neural network to reach it's food within certain iteration for AI along with Keyboard press to move the Snake quads. Youtube:

License

Notifications You must be signed in to change notification settings

aryaminus/srijana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

A C++ and Opengl based game to draw a window leading to snake which runs on neural network to reach it's food within certain iteration for AI along with Keyboard press to move the Snake quads. Youtube:

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published