How to use ppb - 10 common examples

To help you get started, we’ve selected a few ppb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pathunstrom / game-tutorial / shooter-tutorial / sample / 8-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(400, 600)) as engine:
        engine.run()
github pathunstrom / game-tutorial / fundamentals / samples / 3-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(800, 800)) as engine:
        engine.run()
github pathunstrom / game-tutorial / fundamentals / samples / 1-main.py View on Github external
from ppb import GameEngine, BaseScene

with GameEngine(BaseScene) as engine:
    engine.run()
github pathunstrom / game-tutorial / shooter-tutorial / sample / 6-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(400, 600)) as engine:
        engine.run()
github pathunstrom / game-tutorial / hack-and-slash-tutorial / samples / 4-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(800, 800)) as engine:
        engine.run()
github pathunstrom / game-tutorial / shooter-tutorial / sample / 4-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(400, 600)) as engine:
        engine.run()
github pathunstrom / game-tutorial / fundamentals / samples / 2-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(800, 800)) as engine:
        engine.run()
github pathunstrom / game-tutorial / shooter-tutorial / sample / main.py View on Github external
def main():
    with GameEngine(Game, resolution=(400, 600)) as engine:
        engine.run()
github pathunstrom / game-tutorial / shooter-tutorial / sample / 7-main.py View on Github external
def main():
    with GameEngine(Game, resolution=(400, 600)) as engine:
        engine.run()
github pathunstrom / game-tutorial / shooter-tutorial / sample / main.py View on Github external
def simulate(self, time_delta):
        self.rect.centery += -10


class Enemy(BaseGameObject):
    image_path = "enemy.png"

    def __init__(self, scene, x_position):
        super().__init__(scene, (x_position, 0))

    def simulate(self, time_delta):
        self.rect.centery += 3


class Game(BaseScene):

    def __init__(self, engine, background_color=(90, 55, 100), **kwargs):
        super().__init__(engine=engine,
                         background_color=background_color,
                         **kwargs)
        Player(self)
        Bullet(self, (0, 0)).kill()
        self.spawner = Spawner(self, file_spawner("spawn.csv"), Enemy)

    def simulate(self, time_delta):
        super().simulate(time_delta)

        self.spawner.spawn(time_delta)

        player = self.groups[Player.group]
        bullets = self.groups[Bullet.group]

ppb

An Event Driven Python Game Engine

Artistic-2.0
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis