Skip to content

This repository contains enough programs from basic to advance to learn to create games using PyGame Package.

Notifications You must be signed in to change notification settings

rahuladream/PyGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGame (Game Development Library) 🐍️

From Basic to Advance level gaming tutorial. In this repository you can find my learning from day 1 to day end by prefix day.

Introduction: 📔️

  • Pygame is a cross-platform set of Python modules which is used to create video games.
  • It consists of computer graphics 🤖️ and sound libraries designed to be used with the Python programming language.
  • Pygame was officially written by Pete Shinners to replace PySDL.
  • Pygame is suitable to create client-side applications that can be potentially wrapped in a standalone executable.

Installation: 🎉️

Recommended to create a virtual enviorment and install the library.

pip3 install -U pygame --user

Check Installation 💫️

To check whether the pygame is properly installed or not, in the IDLE interpreter, type the following command and press Enter:

import pygame

Hello from the pygame community. https://www.pygame.org/contribute.html

ENOUGH OF THESE BULLSHIT 🛑️ LET'S JUMP TO CODE SEE WHAT WE CAN DO 🤩️

Day 1 📅️

  • screen_disaply.py - To give an idea about basic syntax.
  • display_image.py - Adding a image on white blank surface.
  • pygame_rect.py - Rect rect() is used to draw a rectangle in PyGame.

Day 2 📅

  • keypress_event.py - Pygame KEYDOWN and KEYUP detect the event if a key is physically pressed and released.
  • draw_using_key_event.py - We see KEY Press, now let's draw something using keyboard.
  • geometry_shape_draw.py - Let's draw rectangle, polygon, ellipse, straight line, circle, elliptical arc using pygame.

Day 3 📅

  • text_and_font.py - Let's render the font and text and also size and color the font.
  • sprite_collision_detection.py - A pygame sprite is a two-dimensional image that is part of the large graphical scene. Usually, a sprite will be some object in the scene.
  • multimedia_library.py - pyglet() another game library which is cross-platform for windowing and multi-media. It supports user interface event handling, windowing, OpenGL graphics, loading images and videos, and playing sounds and music.

About

This repository contains enough programs from basic to advance to learn to create games using PyGame Package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages