Virashu / vgame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyGameTest (VGame)

Code style: black

My try to build game engine on top of PyGame

This thing replicates Love2D1-like interface


cat
funny silly cat (almost as this project😁)

How to install

Using pip VCS features

python3 -m venv .env

pip install git+https://github.com/virashu/pygametest.git

Manually

python3 -m venv .env

git clone https://github.com/virashu/pygametest.git
cd pygametest

pip install .

How to use

Examples directory contains basic implementation.

Structure looks like this:

from vgame import Scene, Runner

class MyGame(Scene):
    def load(self):
      # actions before game loads

    def update(self):
      # update loop
      # + delta time

    def draw(self):
      # draw loop
      # + graphics object

    def exit(self):
      # actions before exit


Runner.run(
    MyGame(width=800, height=600, framerate=120, tickrate=120, title="Game")
)

TODO

  • Graphics
    • Texture library
  • Events
  • Axis (controls)
  • Sounds + music
  • Template classes & modules
    • Physics
    • GUI
    • Players

Footnotes

1 Love2D is an 2D game engine for lua available here.

About


Languages

Language:Python 100.0%