semvec/pypi-packages huggingface dataset:
pgpp 1.1.2
Easy to use graphic library for game and application development built arround pygame
Keywords: python,game,app,game engine,application,pgpp

# Pg++

Rewrite! Stable with some bugs

Developed by RedRyan from RedProductions

## Installation
```python
pip install pgpp
```

## Examples of How To Use

Basic Window

```python
from pgpp import *

WIDTH, HEIGHT = 1080, 720 # define the dimensions

WHITE = (255, 255, 255) # define color white in rgb values

createWindow("Pg++", WIDTH, HEIGHT) # crezate a window
setBackground(WHITE) # set the window background

def main():
    startClock() # start a framerate cap
    run = 1

    while run:
        clockTick(30) # cap the frame rate at 30 fps
        for event in getEvents(): # get window events
            if event.type == eventQuit(): # quit the window
                run = False

        drawWindow() # update all the elements inside the window

    gameQuit() # quit if main loop broken

if __name__ == "__main__":
    main()

```

Creating A Moving Sprite
```python
from pgpp import * # import py++

WIDTH, HEIGHT = 1080, 720 # define the dimensions

WHITE = (255, 255, 255) # define color white in rgb values

createWindow("Pg++", WIDTH, HEIGHT) # create a window

setBackground(WHITE) # set the window background


setElement("player", "spaceship.png", 100, 100, 100, 100, 100, 0, [False, False], [1], 1) # create a sprite

def main():
    startClock() # start a framerate cap
    run = True

    while run:
        clockTick(30) # cap the frame rate at 30 fps
        for event in getEvents(): # get window events
            if event.type == eventQuit(): # quit the window
                run = False

        keys = getKeyPressed() # get all the keys pressed

        if keys[keyW()]: # if key w pressed move upwards
            tryMoveY("player", -6)
        if keys[keyS()]: # if key s pressed move downwards
            tryMoveY("player", 6)
        if keys[keyA()]: # if key a pressed move to the left
            tryMoveX("player", -6)
        if keys[keyD()]: # if key d pressed move to the right
            tryMoveX("player", 6)

        drawWindow() # update all the elements inside the window

    gameQuit() # quit if main loop broken

if __name__ == "__main__":
    main()

```