plmju0a / pygame_examples

A repository for short pygame drafts, examples, tutorials and more!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pylint License: MIT

Pygame examples

A repository for short pygame drafts, examples, tutorials and more!

Currently, this repository contains a draft lighting system, a particle system, a networked game, and more.

Gif of the particle effects Gif of the lighting system

Getting started

To get a copy of this repository, simply open up git bash in an empty folder and use the command:

$ git clone https://github.com/rbaltrusch/pygame_examples

Dependencies can be installed using the requirements.txt as below:

pip install -r requirements.txt

To run some of the examples, navigate to the respective folder in the code folder, then run main.py.

Contents

This repository contains the following small pygame examples:

  • Particle system: contains a simple, but effective, particle system implementation.
  • Game console: contains a minimal implementation of an in-game console.
  • Animation testing tool: can be used to test out animations. Contains a fully featured in-game console with a decoupled and flexible design.
  • Networked game: contains a minimal implementation of a networked game, featuring one external server and two separate clients, communicating with each other through the server.
  • Dynamic lighting: contains a small draft implementation for dynamic in-game lighting.
  • Squish and stretch: contains an example implementation of squishing and stretching an image.
  • Timed events: contains an implementation of callbacks executed after a specified delay. Not pygame-specific.
  • Random starry sky: generates a random starry sky.

Contributions

To contribute to this repository, please read the contribution guidelines.

Python

Written in Python 3.8.3.

License

This repository is open-source software available under the MIT license.

Contact

Please raise an issue for code changes. To reach out, please send an email to richard@baltrusch.net.

About

A repository for short pygame drafts, examples, tutorials and more!

License:MIT License


Languages

Language:Python 100.0%