Skip to main content

Vertex2D

EN

Vertex2D is a 2D game engine built on pygame-ce and SDL2. It provides a simple and clean API for creating games — scenes, sprites, camera, input, text and UI elements out of the box. The engine handles all the boilerplate: window creation, rendering, input processing and scene management. Designed to be lightweight and easy to pick up, so a project can go from zero to a running game in minutes.

Install: pip install vertex2d

Requires: Python >= 3.10, pygame-ce >= 2.3.0, numpy, opensimplex, sounddevice, soundfile. On Linux, audio needs PortAudio: sudo apt install libportaudio2 (bundled on Windows and macOS).

Quick Start:

from Vertex import Build

vertex = Build("My Game", screen_size=(700, 700), size_window_standart=(700, 700),
    resize=True, ot_pos=False, SafeMode=True, logs=False, DeveLoperMode=False, vsync=True)

class MyGame:
    def __init__(self):
        self.api = vertex.GetFell()
        self.api.SetFPSValue(60)
        self.player = self.api.Square("Player", (255, 0, 0), 350, 350, 150, 150, 0, static=False, center=True)

    def render(self):
        self.api.NewCanvas((75, 75, 75, 255))
        self.api.AllDraw()
        self.api.ClockUse(stabilize_fps=True)
        self.api.Draw()

    def update(self):
        dt = self.api.Get_DeltaTime()
        self.api.Event( { "quit": self.api.End } )
        self.api.UpdateButtonPressedHow()

        self.player.MoveMent("w.a.s.d", 500 * dt)
        """ or:
        if self.api.ButtonPressed("left"): self.player.MoveX(-300 * dt)
        if self.api.ButtonPressed("right"): self.player.MoveX(300 * dt)
        if self.api.ButtonPressed("up"): self.player.MoveY(-300 * dt)
        if self.api.ButtonPressed("down"): self.player.MoveY(300 * dt)
        """

        self.api.AllUpdate(dt)

    def run(self):
        self.update()
        self.render()

vertex.NewScene("MyGame", MyGame)
vertex.SetScene("MyGame")
vertex.run()
vertex.Destroy()

Several scenes: the first scene is selected automatically. For every next scene call set_data_create before NewScene, otherwise its objects are registered in the first scene.

vertex.NewScene("Menu", Menu)
vertex.set_data_create("Game")
vertex.NewScene("Game", Game)
vertex.SetScene("Menu")

Note: one Build per Python process.

Telegram: @Teme20xx

RU

Vertex2D — это 2D игровой движок на базе pygame-ce и SDL2. Предоставляет простое и понятное API для создания игр — сцены, спрайты, камера, ввод, текст и UI элементы из коробки. Движок берёт на себя всю рутину: создание окна, рендеринг, обработку ввода и управление сценами. Создан лёгким и простым в освоении — от нуля до работающего проекта за считанные минуты.

Установка: pip install vertex2d

Требования: Python >= 3.10, pygame-ce >= 2.3.0, numpy, opensimplex, sounddevice, soundfile. На Linux для звука нужен PortAudio: sudo apt install libportaudio2 (на Windows и macOS встроен).

Быстрый старт:

from Vertex import Build

vertex = Build("My Game", screen_size=(700, 700), size_window_standart=(700, 700),
    resize=True, ot_pos=False, SafeMode=True, logs=False, DeveLoperMode=False, vsync=True)

class MyGame:
    def __init__(self):
        self.api = vertex.GetFell()
        self.api.SetFPSValue(60)
        self.player = self.api.Square("Player", (255, 0, 0), 350, 350, 150, 150, 0, static=False, center=True)

    def render(self):
        self.api.NewCanvas((75, 75, 75, 255))
        self.api.AllDraw()
        self.api.ClockUse(stabilize_fps=True)
        self.api.Draw()

    def update(self):
        dt = self.api.Get_DeltaTime()
        self.api.Event( { "quit": self.api.End } )
        self.api.UpdateButtonPressedHow()

        self.player.MoveMent("w.a.s.d", 500 * dt)
        """ или:
        if self.api.ButtonPressed("left"): self.player.MoveX(-300 * dt)
        if self.api.ButtonPressed("right"): self.player.MoveX(300 * dt)
        if self.api.ButtonPressed("up"): self.player.MoveY(-300 * dt)
        if self.api.ButtonPressed("down"): self.player.MoveY(300 * dt)
        """

        self.api.AllUpdate(dt)

    def run(self):
        self.update()
        self.render()

vertex.NewScene("MyGame", MyGame)
vertex.SetScene("MyGame")
vertex.run()
vertex.Destroy()

Несколько сцен: первая сцена выбирается автоматически. Для каждой следующей сцены вызывай set_data_create перед NewScene, иначе её объекты попадут в первую сцену.

vertex.NewScene("Menu", Menu)
vertex.set_data_create("Game")
vertex.NewScene("Game", Game)
vertex.SetScene("Menu")

Примечание: один Build на один процесс Python.

Telegram: @Teme20xx

Metadata

Release files for Vertex2D 1.3.50

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Vertex2D 1.3.50
File Size Uploaded Provenance Actions
vertex2d-1.3.50.tar.gz 39.7 kB Without provenance Details for vertex2d-1.3.50.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Vertex2D 1.3.50
File Interpreter ABI Platform Actions
vertex2d-1.3.50-py3-none-any.whl Python 3 none any Details for vertex2d-1.3.50-py3-none-any.whl

Total release size: 78.1 kB

Release files / vertex2d-1.3.50.tar.gz

Download URL vertex2d-1.3.50.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1c5f4914ea09267f4f3181a64c3db9f8be4aeb2fa915720b2b69dbd538fba117
BLAKE2b-256 checksum
How to use checksums
6d23bb75089c16c3475fcf4c812bf7554ddf7762e3f66dbe35ee3300f05fd6d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / vertex2d-1.3.50-py3-none-any.whl

Download URL vertex2d-1.3.50-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea4b34c42e0bb7c1047f85546a439987d36a0d7b78f430858c26fb719fdf071f
BLAKE2b-256 checksum
How to use checksums
c9aee704d452a14c870f6b92b8f34c1b42f116e0248ba05f3692e72cca7fbdf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for Vertex2D 1.3.50

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page