Skip to content

DimaGutierrez/Python-Games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍Python Games with turtle graphics 🐢

Install on terminal

C:\....\....>pip install turtle

Go to proyects!

import turtle
import time
import random
import winsound

Python "tetris" Game 🏆

Легендарная игра от создателя Алексей Пажитнов!

https://github.com/dimagutierrez

Settings 💻

Run > tetris_turtle.py

тетрис controls 🎮

🕹️Move (← A ) (→ D )
🕹️Rotate = space

# Keyboard
wn.listen()
wn.onkeypress(lambda: shape.move_left(grid), "a")
wn.onkeypress(lambda: shape.move_right(grid), "d")
wn.onkeypress(lambda: shape.rotate(grid), "space")

Space Shooting 🛸...

many functions available here, movements and statistics, graphic animations, sound efects!

import turtle
import random
import winsound

https://github.com/dimagutierrez

Settings 💻

Run > space_shooting_turtle.py the py file and the images must be in the same folder

controls 🎮

🕹️Move (← ) (→ ) (↑ ) (↓ )
🕹️Shooting = space

# Keyboard binding
wn.listen()
wn.onkeypress(quit_game, "q")
wn.onkeypress(player.up, "Up")
wn.onkeypress(player.down, "Down")
wn.onkeypress(player.move_left, "Left")
wn.onkeypress(player.move_right, "Right")
wn.onkeypress(fire_missile, "space")

Sound Efects / misile, explossion

def fire_missile():
    for missile in missiles:
        if missile.state == "ready":
            missile.fire()
            winsound.PlaySound("SS_missile.wav",winsound.SND_ASYNC)
            break

ChernoBird ☢️

FlappyBird https://github.com/dimagutierrez

Settings 💻

Run > cherno_bird.py the py file and the images must be in the same folder
Theme & graphic design Dima Gutierrez

controls 🎮

🕹️Fly press space маленькая птичка летит 🐤

Python "Pong" Game 🏓

https://github.com/dimagutierrez

Settings 💻

Run > pong.py

Controls 🎮

🕹️Player A (↑ W ) (↓ S )
🕹️Player B (↑ ) (↓ )

# Keyboard
wn.listen()
wn.onkeypress(paddle_a_up, "w")
wn.onkeypress(paddle_a_down, "s")
wn.onkeypress(paddle_b_up, "Up")
wn.onkeypress(paddle_b_down, "Down")

Python "Turtle Race" 🏁

https://github.com/dimagutierrez

Settings 💻

Run > turtle race.py

from turtle import *
from random import *
import turtle
import time

Python "tetris" One block version 🟨

https://github.com/dimagutierrez

Settings 💻

Run > tetris_one_block.py

тетрис controls 🎮

🕹️Move ( ← ) ( → )

This simple version has a score counter

score_count = 0
score = turtle.Turtle()
score.color('red')
score.up()
score.hideturtle()
score.goto(60,-300)
score.write('Score: 0', align='center', font=('Courier', 24, 'normal'))



Visit > discussions/

Enjoy the games! 🐍

Python