Snake (Python)

You have already successfully completed the workshop Discover Python programming, and you want to speed up? This workshop is made for you!

Python

8 Steps

Intermediate

We start? Start
1

Overview

Flashback on the history of the Snake game.
Demonstration of what will be achieved in this workshop.

2

Setting up

Script installation on the console.
Introducing functions.
Installing game engine.
Notions of colorimetric spaces.
Definition of the spatial reference frame of the META.
Introducing global variables.
Initialization of the graphical rendering engine.

3

Modeling

Modeling a virtual world.
Snake modeling.
Implementation using lists and dictionaries.

4

Controls and display

Interception of user interactions.
Controlling snake movements.
Displaying snake on the game scene.
Scheduling of game engine tasks.

5

Imposing rules

Constraining the playing area.
Detect when the snake bites its tail.
Apples display on the game scene.
Detect when the snake swallows an apple.

6

Score points

Snake's tail extension management.
Score management and display.

7

Optimization

Graphic rendering optimization and display acceleration.

8

Finishes

Game ending management.
Time management and flashing.
Access to the complete game code.

The author

Steph

https://gamebuino.m1cr0lab.com