• Register
110 points
7

Overview Game in python

Today we will see in our website kodlogs how we can learn a game in python programming language.And how to copy and paste.Dear friends you must have played snake game in your whole life,mobile or computer.Today I ,m sharing with you.In Kodlogs you are told everything about programming .So that you do not have any problem in learning programming.How does this game come to be .

What is snake game?

There is a snake and wherever he finds food he runs to eat it .As he eats the food it grow taller and we try not to let the snake hit the screen .Tania has learned to make this game in python,you can learn this game if you know any programming language.But the code of this game is easily written in python,then in other programming language.These codes become very long.The more fun it is to play this game ,the more fun it is to build it in Python.Let’s see what we need to make this game.

1.pycharm 3

2.install pygame

3.Pycharm editor community

  • Installing pygame
  • Create the screen
  • Create the snake
  • Moving the snake
  • Game over
  • Add the food
  • Increase the Length of the snake
  • Display the score
import pygame
pygame.init()
dis=pygame.display.set_mode((400,300))
pygame.display.update()
pygame.display.set_caption('Snake game by Kodlogs')
game_over=False
while not game_over:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            game_over=True
 
pygame.quit()
quit()

Games in python

 1.Paint 

 2.Snake

 3.Pacman

 4.Cannon

 5.Connect

 6.Flappy

 7.Memory

 8.Pong

9. Simon Says

 10.Tic Tac Toe

 11.Tiles

 12.Tron

 13.Life

 14.Maze 

 15.Fidget

 

110 points
7

1 Comment

Nice article