VertexEngine 1.9.6__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of VertexEngine might be problematic. Click here for more details.
- {vertexengine-1.9.6/src/VertexEngine.egg-info → vertexengine-2.0.0}/PKG-INFO +12 -8
- {vertexengine-1.9.6 → vertexengine-2.0.0}/README.md +9 -5
- {vertexengine-1.9.6 → vertexengine-2.0.0}/pyproject.toml +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/InputSystem/BtnInputs.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/InputSystem/Events.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/InputSystem/KeyInputs.py +6 -6
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/Vertex/__init__.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexScreenModifiers.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +1 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +6 -6
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/__init__.py +5 -6
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/_base.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/assets.py +49 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/engine.py +3 -3
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/games/snake/main.py +2 -2
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/test.py +4 -4
- {vertexengine-1.9.6 → vertexengine-2.0.0/src/VertexEngine.egg-info}/PKG-INFO +12 -8
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine.egg-info/SOURCES.txt +2 -1
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine.egg-info/requires.txt +1 -1
- vertexengine-2.0.0/tests/test_spritesheet_manager.py +15 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/LICENSE +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/setup.cfg +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/Collisions/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/Collisions/collisions.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/Math/_Vector2.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/Math/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/WHY.mp3 +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/audio.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/MajorSystemTest/Wangi.png +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/MajorSystemTest/main.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3 +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/pygwidget_test.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/scenes.py +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine.egg-info/top_level.txt +0 -0
- {vertexengine-1.9.6 → vertexengine-2.0.0}/tests/test_pygame_vwidgets_style.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
5
|
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -11,7 +11,7 @@ Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
|
11
11
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
12
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
13
|
Project-URL: Discord, https://discord.gg/jqG8kQjX
|
|
14
|
-
Keywords: gamedev,game-development,game-engine,
|
|
14
|
+
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
15
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +28,7 @@ Classifier: Operating System :: OS Independent
|
|
|
28
28
|
Requires-Python: >=3.10
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
License-File: LICENSE
|
|
31
|
-
Requires-Dist:
|
|
31
|
+
Requires-Dist: PySide6>=6.7.0
|
|
32
32
|
Requires-Dist: pygame>=2.6; python_version < "3.14"
|
|
33
33
|
Requires-Dist: pygame-ce>=2.5.0; python_version >= "3.14"
|
|
34
34
|
Dynamic: license-file
|
|
@@ -49,7 +49,7 @@ Dynamic: license-file
|
|
|
49
49
|
</p>
|
|
50
50
|
|
|
51
51
|
# VertexEngine/Vertex
|
|
52
|
-
VertexEngine is a GUI and Game Engine for
|
|
52
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
53
|
|
|
54
54
|
## Official Extensions:
|
|
55
55
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -59,7 +59,11 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
59
59
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
60
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
61
|
|
|
62
|
-
## Change Logs (1.8rc1 -
|
|
62
|
+
## Change Logs (1.8rc1 - 2.0)
|
|
63
|
+
### 2.0
|
|
64
|
+
- Thanks for ONE YEAR!
|
|
65
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
66
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
63
67
|
### 1.9.6
|
|
64
68
|
- Engine Optimizations
|
|
65
69
|
### 1.9.5
|
|
@@ -75,7 +79,7 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
75
79
|
### 1.9.1
|
|
76
80
|
- NEW DEMO
|
|
77
81
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
78
|
-
- Fixed engine clash bug (pygame and
|
|
82
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
79
83
|
### 1.9
|
|
80
84
|
- FINALLY fixed the demos!
|
|
81
85
|
- how to run:
|
|
@@ -126,14 +130,14 @@ Step 1: Type in `pip install VertexEngine`
|
|
|
126
130
|
|
|
127
131
|
Step 2: Wait a few minutes.
|
|
128
132
|
|
|
129
|
-
Pygame or
|
|
133
|
+
Pygame or PySide6 systems are compatible with VertexEngine so you can use pygame collision system or PySide6's UI system in VertexEngine.
|
|
130
134
|
|
|
131
135
|
## Dependencies
|
|
132
136
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
133
137
|
|
|
134
138
|
| Dependency | Version |
|
|
135
139
|
|------------------|--------------------------------------|
|
|
136
|
-
|
|
|
140
|
+
| PySide6 | >=6.7 |
|
|
137
141
|
| Pygame | >=2.0 |
|
|
138
142
|
| Python | >=3.10 |
|
|
139
143
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
# VertexEngine/Vertex
|
|
17
|
-
VertexEngine is a GUI and Game Engine for
|
|
17
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
18
18
|
|
|
19
19
|
## Official Extensions:
|
|
20
20
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -24,7 +24,11 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
24
24
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
25
25
|
- Support Email: FinalFacility0828@gmail.com
|
|
26
26
|
|
|
27
|
-
## Change Logs (1.8rc1 -
|
|
27
|
+
## Change Logs (1.8rc1 - 2.0)
|
|
28
|
+
### 2.0
|
|
29
|
+
- Thanks for ONE YEAR!
|
|
30
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
31
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
28
32
|
### 1.9.6
|
|
29
33
|
- Engine Optimizations
|
|
30
34
|
### 1.9.5
|
|
@@ -40,7 +44,7 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
40
44
|
### 1.9.1
|
|
41
45
|
- NEW DEMO
|
|
42
46
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
43
|
-
- Fixed engine clash bug (pygame and
|
|
47
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
44
48
|
### 1.9
|
|
45
49
|
- FINALLY fixed the demos!
|
|
46
50
|
- how to run:
|
|
@@ -91,14 +95,14 @@ Step 1: Type in `pip install VertexEngine`
|
|
|
91
95
|
|
|
92
96
|
Step 2: Wait a few minutes.
|
|
93
97
|
|
|
94
|
-
Pygame or
|
|
98
|
+
Pygame or PySide6 systems are compatible with VertexEngine so you can use pygame collision system or PySide6's UI system in VertexEngine.
|
|
95
99
|
|
|
96
100
|
## Dependencies
|
|
97
101
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
98
102
|
|
|
99
103
|
| Dependency | Version |
|
|
100
104
|
|------------------|--------------------------------------|
|
|
101
|
-
|
|
|
105
|
+
| PySide6 | >=6.7 |
|
|
102
106
|
| Pygame | >=2.0 |
|
|
103
107
|
| Python | >=3.10 |
|
|
104
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "VertexEngine"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.0.0"
|
|
4
4
|
description = "A high-performance SDK for Python Development."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Tyrel Miguel", email = "annbasilan0828@gmail.com" }
|
|
@@ -10,7 +10,7 @@ license = { text = "MIT" }
|
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
|
-
"
|
|
13
|
+
"PySide6>=6.7.0",
|
|
14
14
|
"pygame>=2.6; python_version < '3.14'",
|
|
15
15
|
"pygame-ce>=2.5.0; python_version >= '3.14'"
|
|
16
16
|
]
|
|
@@ -19,7 +19,7 @@ keywords = [
|
|
|
19
19
|
"gamedev",
|
|
20
20
|
"game-development",
|
|
21
21
|
"game-engine",
|
|
22
|
-
"
|
|
22
|
+
"PySide6",
|
|
23
23
|
"pygame",
|
|
24
24
|
"pygame-ce",
|
|
25
25
|
"sdk",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PySide6.QtCore import Qt
|
|
2
|
+
from PySide6.QtGui import QShortcut, QKeySequence
|
|
3
3
|
|
|
4
4
|
KEY_MAP = {
|
|
5
5
|
# Arrows
|
|
@@ -70,11 +70,11 @@ for key, qt_name in punctuation_map.items():
|
|
|
70
70
|
try:
|
|
71
71
|
KEY_MAP[key] = getattr(Qt.Key, f"Key_{qt_name}")
|
|
72
72
|
except AttributeError:
|
|
73
|
-
# Some symbols might not exist in
|
|
73
|
+
# Some symbols might not exist in PySide6's Qt.Key
|
|
74
74
|
pass
|
|
75
75
|
|
|
76
|
-
from
|
|
77
|
-
from
|
|
76
|
+
from PySide6.QtCore import Qt
|
|
77
|
+
from PySide6.QtGui import QShortcut, QKeySequence
|
|
78
78
|
|
|
79
79
|
KEY_MAP = {
|
|
80
80
|
# Arrows
|
|
@@ -145,7 +145,7 @@ for key, qt_name in punctuation_map.items():
|
|
|
145
145
|
try:
|
|
146
146
|
KEY_MAP[key] = getattr(Qt.Key, f"Key_{qt_name}")
|
|
147
147
|
except AttributeError:
|
|
148
|
-
# Some symbols might not exist in
|
|
148
|
+
# Some symbols might not exist in PySide6's Qt.Key
|
|
149
149
|
pass
|
|
150
150
|
|
|
151
151
|
class Input:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""VertexEngine.Vertex: VWidget, Layouts, Dialogs, App Management"""
|
|
2
2
|
|
|
3
3
|
import sys
|
|
4
|
-
from
|
|
4
|
+
from PySide6.QtWidgets import (
|
|
5
5
|
QApplication, QWidget, QVBoxLayout, QHBoxLayout,
|
|
6
6
|
QDialog, QLabel, QPushButton, QLineEdit
|
|
7
7
|
)
|
|
8
|
-
from
|
|
8
|
+
from PySide6.QtCore import Qt
|
|
9
9
|
# ------------------------
|
|
10
10
|
# Base widget wrapper
|
|
11
11
|
# ------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""WARNING: This library of Vertex is not made for games, if you want to make a game window, use the `GameEngine` Class instead."""
|
|
2
|
-
from
|
|
2
|
+
from PySide6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QApplication
|
|
3
3
|
import sys
|
|
4
4
|
from VertexEngine import VertexUI
|
|
5
5
|
# ===== Base window class =====
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget, QHBoxLayout, QPushButton, QApplication
|
|
2
|
+
from PySide6.QtCore import pyqtSignal
|
|
3
3
|
import sys
|
|
4
4
|
|
|
5
5
|
# -----------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget
|
|
2
|
+
from PySide6.QtCore import Qt, pyqtSignal, QRect
|
|
3
|
+
from PySide6.QtGui import QPainter, QColor
|
|
4
4
|
|
|
5
5
|
class ToggleSwitch(QWidget):
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import (
|
|
2
2
|
QTreeWidget, QTreeWidgetItem,
|
|
3
3
|
QTableWidget, QTableWidgetItem,
|
|
4
4
|
QSplitter,
|
|
5
5
|
QScrollArea,
|
|
6
6
|
QDockWidget, QWidget
|
|
7
7
|
)
|
|
8
|
-
from
|
|
9
|
-
from
|
|
8
|
+
from PySide6.QtCore import Qt, QThread, pyqtSignal, QSettings
|
|
9
|
+
from PySide6.QtGui import QPainter, QFont
|
|
10
10
|
|
|
11
11
|
class StarRating(QWidget):
|
|
12
12
|
def __init__(self, stars=5):
|
{vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QMessageBox, QFileDialog, QSlider, QProgressBar, QSpinBox, QToolBar
|
|
2
|
+
from PySide6.QtCore import Qt
|
|
3
|
+
from PySide6.QtGui import QAction
|
|
4
4
|
class VPopup:
|
|
5
5
|
@staticmethod
|
|
6
6
|
def info(text, title="Info"):
|
{vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QPushButton, QLineEdit
|
|
2
|
+
from PySide6.QtGui import QFont
|
|
3
|
+
from PySide6.QtWidgets import QPushButton
|
|
4
|
+
from PySide6.QtGui import QCursor
|
|
5
|
+
from PySide6.QtCore import Qt
|
|
6
|
+
from PySide6.QtWidgets import QLabel
|
|
7
7
|
|
|
8
8
|
class LegacyButton(QPushButton):
|
|
9
9
|
def __init__(
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
# This library/SDK is free. You can redistribute it.
|
|
4
4
|
# Tyrel Gomez (email as annbasilan)
|
|
5
5
|
# annbasilan0828@gmail.com
|
|
6
|
-
"""VertexEngine is an SDK for Application Development.
|
|
6
|
+
"""VertexEngine is an SDK for Application Development. Specifically games, or heavier Applications
|
|
7
7
|
|
|
8
8
|
Supported OSes
|
|
9
9
|
--------------
|
|
10
|
-
- RainOS
|
|
11
10
|
- Windows
|
|
12
11
|
- MacOS
|
|
13
12
|
- OS X
|
|
@@ -15,14 +14,14 @@ Supported OSes
|
|
|
15
14
|
- FreeBSD
|
|
16
15
|
- IRIX
|
|
17
16
|
- and Linux
|
|
18
|
-
|
|
19
|
-
It is written on top of the excellent Pygame library which is ran on the even more excellent SDL library which runs on every Desktop OS with SDL."""
|
|
20
|
-
import pygame
|
|
17
|
+
"""
|
|
21
18
|
from ._base import *
|
|
22
19
|
from .engine import GameEngine
|
|
23
20
|
from .scenes import Scene, SceneManager
|
|
24
21
|
from .assets import AssetManager
|
|
25
22
|
from .audio import AudioManager
|
|
23
|
+
from .Vertex import App
|
|
24
|
+
from .InputSystem import *
|
|
26
25
|
import os
|
|
27
26
|
|
|
28
27
|
|
|
@@ -586,7 +585,7 @@ import os
|
|
|
586
585
|
# This comment serves as a warning to the next developer.
|
|
587
586
|
# If you are reading this, you have probably found a bug or an issue with the code.
|
|
588
587
|
# Your problem.
|
|
589
|
-
# Hours Wasted:
|
|
588
|
+
# Hours Wasted: 78
|
|
590
589
|
# ----------------------------------------------------------------------
|
|
591
590
|
# Btw ur balls are big and i like them. I hope you have a nice day. :)
|
|
592
591
|
# ~ VSCode Copilot auto-generated comment.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pygame
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
2
|
+
from PySide6.QtWidgets import QPushButton, QLineEdit, QLabel, QWidget
|
|
3
|
+
from PySide6.QtGui import QFont, QCursor, QFontMetrics
|
|
4
|
+
from PySide6.QtCore import Qt
|
|
5
5
|
from VertexEngine.Vertex import VBox
|
|
6
6
|
|
|
7
7
|
class VertexScreen():
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pygame
|
|
2
|
-
from
|
|
2
|
+
from PySide6.QtGui import QImage
|
|
3
3
|
import typing_extensions as typing
|
|
4
4
|
|
|
5
5
|
@typing.deprecated('This is not a public API, use AssetManager pls :D')
|
|
@@ -46,6 +46,7 @@ class AssetManager:
|
|
|
46
46
|
"""The `AssetManager` is a class to draw and load images and assets of any kind."""
|
|
47
47
|
def __init__(self):
|
|
48
48
|
self.images = {}
|
|
49
|
+
self.spritesheets = {}
|
|
49
50
|
self._scaled_cache = {} # cache for scaled versions
|
|
50
51
|
|
|
51
52
|
def load_image(self, name: str, path: str):
|
|
@@ -103,3 +104,50 @@ class AssetManager:
|
|
|
103
104
|
scaled_img = self._scaled_cache[cache_key]
|
|
104
105
|
|
|
105
106
|
target_surface.blit(scaled_img, pos)
|
|
107
|
+
|
|
108
|
+
def load_spritesheet(self, name: str, path: str, frame_size):
|
|
109
|
+
"""Load a spritesheet and split it into equally sized frames.
|
|
110
|
+
|
|
111
|
+
``frame_size`` is ``(width, height)``. Incomplete frames at the
|
|
112
|
+
right or bottom edges are ignored.
|
|
113
|
+
"""
|
|
114
|
+
if name in self.spritesheets:
|
|
115
|
+
return self.spritesheets[name]
|
|
116
|
+
|
|
117
|
+
frame_width, frame_height = (int(value) for value in frame_size)
|
|
118
|
+
if frame_width <= 0 or frame_height <= 0:
|
|
119
|
+
raise ValueError("frame_size values must be greater than zero")
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
sheet = pygame.image.load(path)
|
|
123
|
+
except FileNotFoundError:
|
|
124
|
+
print(f"[Warning] Spritesheet '{path}' not found!")
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
sheet_width, sheet_height = sheet.get_size()
|
|
128
|
+
frames = [
|
|
129
|
+
sheet.subsurface((x, y, frame_width, frame_height)).copy()
|
|
130
|
+
for y in range(0, sheet_height - frame_height + 1, frame_height)
|
|
131
|
+
for x in range(0, sheet_width - frame_width + 1, frame_width)
|
|
132
|
+
]
|
|
133
|
+
self.spritesheets[name] = frames
|
|
134
|
+
return frames
|
|
135
|
+
|
|
136
|
+
def get_sprite(self, name: str, index: int):
|
|
137
|
+
"""Return one frame from a loaded spritesheet."""
|
|
138
|
+
spritesheet = self.spritesheets.get(name)
|
|
139
|
+
if spritesheet is None:
|
|
140
|
+
print(f"[Warning] Spritesheet '{name}' not loaded!")
|
|
141
|
+
return None
|
|
142
|
+
return spritesheet[index]
|
|
143
|
+
|
|
144
|
+
def draw_sprite(self, target_surface, name: str, index: int,
|
|
145
|
+
pos=(0, 0), size=None):
|
|
146
|
+
"""Draw one frame from a loaded spritesheet."""
|
|
147
|
+
sprite = self.get_sprite(name, index)
|
|
148
|
+
if sprite is None:
|
|
149
|
+
return
|
|
150
|
+
|
|
151
|
+
if size is not None:
|
|
152
|
+
sprite = pygame.transform.smoothscale(sprite, tuple(size))
|
|
153
|
+
target_surface.blit(sprite, pos)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
1
|
+
from PySide6.QtWidgets import QWidget
|
|
2
|
+
from PySide6.QtGui import QImage, QPainter
|
|
3
|
+
from PySide6.QtCore import QTimer, Qt
|
|
4
4
|
import pygame
|
|
5
5
|
from .scenes import SceneManager
|
|
6
6
|
from VertexEngine.InputSystem.KeyInputs import Input
|
|
@@ -2,8 +2,8 @@ import sys
|
|
|
2
2
|
import random
|
|
3
3
|
import pygame
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from PySide6.QtWidgets import QApplication
|
|
6
|
+
from PySide6.QtCore import Qt
|
|
7
7
|
|
|
8
8
|
from VertexEngine.engine import GameEngine
|
|
9
9
|
from VertexEngine.scenes import Scene
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from VertexEngine.InputSystem.Events import ButtonEvents
|
|
2
2
|
from VertexEngine import VertexUI
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
3
|
+
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout
|
|
4
|
+
from PySide6.QtCore import Qt
|
|
5
|
+
from PySide6.QtGui import QFont
|
|
6
6
|
import sys
|
|
7
7
|
import random
|
|
8
8
|
Buttons = ButtonEvents()
|
|
@@ -35,7 +35,7 @@ def random_text():
|
|
|
35
35
|
messages = [
|
|
36
36
|
"VertexEngine 🔥",
|
|
37
37
|
"Buttons clicked 😄",
|
|
38
|
-
"
|
|
38
|
+
"PySide6 is clean ✨",
|
|
39
39
|
"Event system FTW 🎮",
|
|
40
40
|
"Random works 🎲"
|
|
41
41
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
5
|
Author-email: Tyrel Miguel <annbasilan0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -11,7 +11,7 @@ Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
|
11
11
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
12
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
13
|
Project-URL: Discord, https://discord.gg/jqG8kQjX
|
|
14
|
-
Keywords: gamedev,game-development,game-engine,
|
|
14
|
+
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
15
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +28,7 @@ Classifier: Operating System :: OS Independent
|
|
|
28
28
|
Requires-Python: >=3.10
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
License-File: LICENSE
|
|
31
|
-
Requires-Dist:
|
|
31
|
+
Requires-Dist: PySide6>=6.7.0
|
|
32
32
|
Requires-Dist: pygame>=2.6; python_version < "3.14"
|
|
33
33
|
Requires-Dist: pygame-ce>=2.5.0; python_version >= "3.14"
|
|
34
34
|
Dynamic: license-file
|
|
@@ -49,7 +49,7 @@ Dynamic: license-file
|
|
|
49
49
|
</p>
|
|
50
50
|
|
|
51
51
|
# VertexEngine/Vertex
|
|
52
|
-
VertexEngine is a GUI and Game Engine for
|
|
52
|
+
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
53
|
|
|
54
54
|
## Official Extensions:
|
|
55
55
|
- [VertexEngine-JSON](https://pypi.org/project/VertexEngine-json)
|
|
@@ -59,7 +59,11 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
59
59
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
60
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
61
|
|
|
62
|
-
## Change Logs (1.8rc1 -
|
|
62
|
+
## Change Logs (1.8rc1 - 2.0)
|
|
63
|
+
### 2.0
|
|
64
|
+
- Thanks for ONE YEAR!
|
|
65
|
+
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
66
|
+
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
63
67
|
### 1.9.6
|
|
64
68
|
- Engine Optimizations
|
|
65
69
|
### 1.9.5
|
|
@@ -75,7 +79,7 @@ VertexEngine is a GUI and Game Engine for python applications, it works best if
|
|
|
75
79
|
### 1.9.1
|
|
76
80
|
- NEW DEMO
|
|
77
81
|
- How to Run: python3.x -m VertexEngine.examples.pygwidget_test
|
|
78
|
-
- Fixed engine clash bug (pygame and
|
|
82
|
+
- Fixed engine clash bug (pygame and PySide6 bug)
|
|
79
83
|
### 1.9
|
|
80
84
|
- FINALLY fixed the demos!
|
|
81
85
|
- how to run:
|
|
@@ -126,14 +130,14 @@ Step 1: Type in `pip install VertexEngine`
|
|
|
126
130
|
|
|
127
131
|
Step 2: Wait a few minutes.
|
|
128
132
|
|
|
129
|
-
Pygame or
|
|
133
|
+
Pygame or PySide6 systems are compatible with VertexEngine so you can use pygame collision system or PySide6's UI system in VertexEngine.
|
|
130
134
|
|
|
131
135
|
## Dependencies
|
|
132
136
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
133
137
|
|
|
134
138
|
| Dependency | Version |
|
|
135
139
|
|------------------|--------------------------------------|
|
|
136
|
-
|
|
|
140
|
+
| PySide6 | >=6.7 |
|
|
137
141
|
| Pygame | >=2.0 |
|
|
138
142
|
| Python | >=3.10 |
|
|
139
143
|
|
|
@@ -41,4 +41,5 @@ src/VertexEngine/examples/MajorSystemTest/Wangi.png
|
|
|
41
41
|
src/VertexEngine/examples/MajorSystemTest/main.py
|
|
42
42
|
src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3
|
|
43
43
|
src/VertexEngine/examples/games/snake/main.py
|
|
44
|
-
tests/test_pygame_vwidgets_style.py
|
|
44
|
+
tests/test_pygame_vwidgets_style.py
|
|
45
|
+
tests/test_spritesheet_manager.py
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pygame
|
|
2
|
+
|
|
3
|
+
from VertexEngine import AssetManager
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_load_spritesheet_splits_frames(monkeypatch):
|
|
7
|
+
sheet = pygame.Surface((20, 10), pygame.SRCALPHA)
|
|
8
|
+
monkeypatch.setattr(pygame.image, "load", lambda path: sheet)
|
|
9
|
+
manager = AssetManager()
|
|
10
|
+
|
|
11
|
+
frames = manager.load_spritesheet("player", "player.png", (10, 10))
|
|
12
|
+
|
|
13
|
+
assert len(frames) == 2
|
|
14
|
+
assert [frame.get_size() for frame in frames] == [(10, 10), (10, 10)]
|
|
15
|
+
assert manager.get_sprite("player", 1).get_size() == (10, 10)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-1.9.6 → vertexengine-2.0.0}/src/VertexEngine/examples/MajorSystemTest/Wangi.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|