Skip to content

moises0108/Pigeon2D

Repository files navigation

Pigeon2D

Version Lines Files Last Commit Size Hits Documentation Status

![Current](https://img.shields.io/badge/currently-in progress-red) Help wanted

A python game engine for pygame.

Table of Contents

Advantages

  • Not very dependant
  • Lightweight
  • Easy to use

Disadvantages

  • Not fully featured
  • Limited help

Installation

⚠️ When you install the package using pip it installs pygame 1.9.2, which is usable, but pygame 2.1.2 at least is reccomended. ⚠️

Install

$ pip install Pigeon2d

Upgrade

$ pip install -U Pigeon2d

Install Pygame Latest Version

$ pip install -U pygame

How To

Syntax

# Game

Game(title, GRAVITY, FRICTION, ACCELERATION)
.update(fill)
.config(title, GRAVITY, FRICTION, ACCELERATION)

# Sprite (pygame.sprite.Sprite)

Sprite(surface, image, pos, playerobj)
.move()
.draw()
.config(surface, image, pos, playerobj)

# spritesheet (object)

spritesheet(filename)
.image_at(rectangle, colorkey)
.images_at(rects, colorkey)
.load_strip(rect, image_count, colorkey)

# SpriteStripAnim (object)

SpriteStripAnim(filename, rect, count, colorkey, loop, frames)
.iter()
.next()

Tutorial

# import module
import Pigeon2d as p
# initialize Game() object
game = p.Game()
# load image
image = p.resize_image(p.spritesheet("assets/Pigeons/Original Diminsions/Pigeon Sprite Sheet.png").image_at((0, 16, 16, 16)))
# initialize player Sprite() object
player = p.Sprite(game, image, pos=(20, 20))
# game loop
while True:
    game.update()
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html

Used in Tutorial

Assets

Assets were made on itch.io by Pop Shop Packs (https://pop-shop-packs.itch.io/)

Example Code

Example code by @desvasicek (me) feel free to use it though.

Code

Code by @desvasicek and is registered under the MIT License (Read it here). Spritesheet handling by pygame (https://www.pygame.org/wiki/Spritesheet) adapted to Python 3.9.2 by @desvasicek

Thank You!

Collaborators

desvasicek
Des

Contributors

desvasicek
Des

Stargazers

  • @ahribellah
  • @Moosems
  • @cergotv12
  • @merkfam

Contributing

To start, create a pull request or ask me to allow you collaboration access

Bugs 🐛️

Please create an issue

Ideas 💡️

Please communicate with me

About

A python game engine for pygame.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages