Skip to main content

A package to build games with ease.

Project description

pygame-builder

Introduction

Use this package to create a game in python in just a few lines of code. Built on top of Pygame, this module is perfect for beginners looking to make their first game. Experts may also find this useful when trying to save time. Enjoy!

Code Format

from pygame_builder import Pygame, Element, Image

with Pygame(backgroundImage : Image = image, size : list = [480, 270], windowCaption = "Pygame", fps = 60, backgroundColour : tuple = (0, 0, 0), backgroundMusic : Music = None), backgroundSound = None) as pg:
    element = Element(image : Image, parent, centerPosition = [0, 0], speed = [1, 1])
    pg.add(element)
    pg.loop(lambda : <callable>)

Example

from pygame_builder import Pygame, Element, Image

ballGif = "/path/to/ball.gif"

def main():
	ball.bouncingAnimation()

with Pygame() as pg:
    ball = Element(Image(ballGif), pg, pg.getScreenCenter(), [2, 2])
    pg.add(ball)
    pg.loop(lambda : main)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame_builder-0.2.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

pygame_builder-0.2.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page