-
Notifications
You must be signed in to change notification settings - Fork 10
Development
- Make sure you install Kano DevBox and you start it
- Install make-snake using the icon on the desktop
- Now you will be able to run and develop make-snake on Kano DevBox!
- Open a terminal and type
make-snake.
If you want to run the game directly then typepython /usr/share/make-snake. (Make sure the window is big enough, otherwise snake might not run properly)
The project is written in Python2.7 with the curses library, expect for the tutorial (/bin/make-snake) with is a bash script.
snake/
...__main__.py > Entry point. Initialises all the different components.
...config.py > Declaration of constants: game speed and sizes, points etc.
...console.py > Contains a function to determine the console size.
...controls.py > Manages the user input.
...custom_theme > This file will be loaded by the game and modified by the editor.
...game.py > Game controller: movement, collision detection, apples cycle.
...gameloop.py > Contains the infinite loop: update + rendering.
...gamestate.py > save/load the state (game statistics and level).
...graphics.py > All that has to do with the rendering.
...parser.py > Defines the different parameters.
...stage.py > Initialises the game based on the parameters passed as input.
...theme.py > Load the appropriate theme.
...themes.py > Defines the different themes.
snake-editor/
...__main__.py > Entry point. Initialises all the different components, needed to run the Editor on stand-alone.
...console.py > Contains a function to determine the console size. Duplicated code
...controls.py > Manages the user input.
...game.py > Positions the snake and apples.
...gameloop.py > Contains the infinite loop: update + rendering.
...gamestate.py > save/load the state (game statistics and level).
...graphics.py > All that has to do with the rendering.
...menus.py > Defines the different menus.
...stage.py > Sets the board size.
...theme.py > Load the custom theme.