VertexEngine 2.0.0__tar.gz → 2.0rc1__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.
- {vertexengine-2.0.0/src/VertexEngine.egg-info → vertexengine-2.0rc1}/PKG-INFO +14 -50
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/README.md +11 -45
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/pyproject.toml +3 -5
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/__init__.py +4 -4
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/engine.py +7 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1/src/VertexEngine.egg-info}/PKG-INFO +14 -50
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/SOURCES.txt +1 -1
- vertexengine-2.0rc1/tests/test_engine_delta_time.py +28 -0
- vertexengine-2.0.0/src/VertexEngine/VertexScreenModifiers.py +0 -70
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/LICENSE +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/setup.cfg +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/Collisions/__init__.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/Collisions/collisions.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/BtnInputs.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/Events.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/InputSystem/KeyInputs.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/Math/_Vector2.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/Math/__init__.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/Vertex/__init__.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ChatBubble.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/CheckBox.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Counter.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Dropdown.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/OptionBtnWidget.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/StatusLight.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/ToggleSwitch.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/WindowMods.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/Windows.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/WHY.mp3 +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/_base.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/assets.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/audio.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/Wangi.png +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/main.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3 +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/games/snake/main.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/pygwidget_test.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/test.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/scenes.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/dependency_links.txt +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/requires.txt +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine.egg-info/top_level.txt +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/tests/test_pygame_vwidgets_style.py +0 -0
- {vertexengine-2.0.0 → vertexengine-2.0rc1}/tests/test_spritesheet_manager.py +0 -0
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0rc1
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
|
-
Author-email: Tyrel Miguel <
|
|
5
|
+
Author-email: Tyrel Miguel <FinalFacility0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://vertexengine-zii6.onrender.com
|
|
8
8
|
Project-URL: Documentation, https://vertexenginedocs.netlify.app
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
9
|
+
Project-URL: Developer Site, https://tyrel.onrender.com
|
|
11
10
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
11
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
|
-
Project-URL: Discord, https://discord.gg/jqG8kQjX
|
|
14
12
|
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -48,7 +46,7 @@ Dynamic: license-file
|
|
|
48
46
|
</a>
|
|
49
47
|
</p>
|
|
50
48
|
|
|
51
|
-
# VertexEngine
|
|
49
|
+
# VertexEngine
|
|
52
50
|
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
51
|
|
|
54
52
|
## Official Extensions:
|
|
@@ -59,9 +57,8 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
59
57
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
58
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
59
|
|
|
62
|
-
## Change Logs (1.8rc1 - 2.
|
|
63
|
-
### 2.
|
|
64
|
-
- Thanks for ONE YEAR!
|
|
60
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
61
|
+
### 2.0rc1
|
|
65
62
|
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
66
63
|
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
67
64
|
### 1.9.6
|
|
@@ -86,51 +83,18 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
86
83
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
87
84
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
88
85
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
89
|
-
### 1.8.9
|
|
90
|
-
- Small optimizations
|
|
91
|
-
- Removed dependence on Python Garbage Collection.
|
|
92
|
-
### 1.8.7
|
|
93
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
94
|
-
- Final 1.8.x update is 1.8.9
|
|
95
|
-
- 1.9rc1 soon.
|
|
96
|
-
|
|
97
|
-
### 1.8.6
|
|
98
|
-
- Fixed Engine bugs
|
|
99
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
100
|
-
|
|
101
|
-
### 1.8.5
|
|
102
|
-
- Fixed buttons!
|
|
103
|
-
### 1.8.4
|
|
104
|
-
- Are you here?
|
|
105
|
-
- jk :D
|
|
106
|
-
- Bug fixes!
|
|
107
|
-
### 1.8.3
|
|
108
|
-
- Added some setup for the next versions!
|
|
109
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
110
|
-
### 1.8.2
|
|
111
|
-
- Graphical Math Tweaks!
|
|
112
|
-
- Old classes now moved into Math
|
|
113
|
-
- GraphicalMath is now just Math
|
|
114
|
-
### 1.8.1
|
|
115
|
-
- Some Fixes!
|
|
116
|
-
- Tweaks!
|
|
117
|
-
### 1.8.0
|
|
118
|
-
- Updated Documentation!
|
|
119
|
-
- Engine Fixes!
|
|
120
|
-
### 1.8rc2
|
|
121
|
-
- Fixed math not defined errors
|
|
122
|
-
- Renamed to GraphicalMath
|
|
123
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
124
|
-
### 1.8rc1
|
|
125
|
-
- Patched some runtime errors
|
|
126
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
127
86
|
|
|
128
87
|
## How to install VertexEngine:
|
|
129
|
-
|
|
88
|
+
Type in `pip install VertexEngine`
|
|
89
|
+
|
|
90
|
+
## Delta time
|
|
130
91
|
|
|
131
|
-
|
|
92
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
132
93
|
|
|
133
|
-
|
|
94
|
+
```python
|
|
95
|
+
def update(self):
|
|
96
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
97
|
+
```
|
|
134
98
|
|
|
135
99
|
## Dependencies
|
|
136
100
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
# VertexEngine
|
|
16
|
+
# VertexEngine
|
|
17
17
|
VertexEngine is a GUI and Game Engine for Python applications.
|
|
18
18
|
|
|
19
19
|
## Official Extensions:
|
|
@@ -24,9 +24,8 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
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 - 2.
|
|
28
|
-
### 2.
|
|
29
|
-
- Thanks for ONE YEAR!
|
|
27
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
28
|
+
### 2.0rc1
|
|
30
29
|
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
31
30
|
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
32
31
|
### 1.9.6
|
|
@@ -51,51 +50,18 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
51
50
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
52
51
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
53
52
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
54
|
-
### 1.8.9
|
|
55
|
-
- Small optimizations
|
|
56
|
-
- Removed dependence on Python Garbage Collection.
|
|
57
|
-
### 1.8.7
|
|
58
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
59
|
-
- Final 1.8.x update is 1.8.9
|
|
60
|
-
- 1.9rc1 soon.
|
|
61
|
-
|
|
62
|
-
### 1.8.6
|
|
63
|
-
- Fixed Engine bugs
|
|
64
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
65
|
-
|
|
66
|
-
### 1.8.5
|
|
67
|
-
- Fixed buttons!
|
|
68
|
-
### 1.8.4
|
|
69
|
-
- Are you here?
|
|
70
|
-
- jk :D
|
|
71
|
-
- Bug fixes!
|
|
72
|
-
### 1.8.3
|
|
73
|
-
- Added some setup for the next versions!
|
|
74
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
75
|
-
### 1.8.2
|
|
76
|
-
- Graphical Math Tweaks!
|
|
77
|
-
- Old classes now moved into Math
|
|
78
|
-
- GraphicalMath is now just Math
|
|
79
|
-
### 1.8.1
|
|
80
|
-
- Some Fixes!
|
|
81
|
-
- Tweaks!
|
|
82
|
-
### 1.8.0
|
|
83
|
-
- Updated Documentation!
|
|
84
|
-
- Engine Fixes!
|
|
85
|
-
### 1.8rc2
|
|
86
|
-
- Fixed math not defined errors
|
|
87
|
-
- Renamed to GraphicalMath
|
|
88
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
89
|
-
### 1.8rc1
|
|
90
|
-
- Patched some runtime errors
|
|
91
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
92
53
|
|
|
93
54
|
## How to install VertexEngine:
|
|
94
|
-
|
|
55
|
+
Type in `pip install VertexEngine`
|
|
56
|
+
|
|
57
|
+
## Delta time
|
|
95
58
|
|
|
96
|
-
|
|
59
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
97
60
|
|
|
98
|
-
|
|
61
|
+
```python
|
|
62
|
+
def update(self):
|
|
63
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
64
|
+
```
|
|
99
65
|
|
|
100
66
|
## Dependencies
|
|
101
67
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "VertexEngine"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.0rc1"
|
|
4
4
|
description = "A high-performance SDK for Python Development."
|
|
5
5
|
authors = [
|
|
6
|
-
{ name = "Tyrel Miguel", email = "
|
|
6
|
+
{ name = "Tyrel Miguel", email = "FinalFacility0828@gmail.com" }
|
|
7
7
|
]
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
license = { text = "MIT" }
|
|
@@ -45,11 +45,9 @@ classifiers = [
|
|
|
45
45
|
[project.urls]
|
|
46
46
|
Homepage = "https://vertexengine-zii6.onrender.com"
|
|
47
47
|
Documentation = "https://vertexenginedocs.netlify.app"
|
|
48
|
-
|
|
49
|
-
"Official Tech Site" = "https://tyrel.onrender.com"
|
|
48
|
+
"Developer Site" = "https://tyrel.onrender.com"
|
|
50
49
|
Source = "https://github.com/VertexEngine-Projects/VertexEngine-Code"
|
|
51
50
|
Issues = "https://github.com/VertexEngine-Projects/VertexEngine-Code/issues"
|
|
52
|
-
Discord = "https://discord.gg/jqG8kQjX"
|
|
53
51
|
|
|
54
52
|
[tool.setuptools]
|
|
55
53
|
# Instructs setuptools to bundle non-python data assets
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# VertexEngine/__init__.py
|
|
2
|
-
# Copyright (C)
|
|
2
|
+
# Copyright (C) 2026
|
|
3
3
|
# This library/SDK is free. You can redistribute it.
|
|
4
|
-
# Tyrel Gomez (email as annbasilan)
|
|
5
|
-
# annbasilan0828@gmail.com
|
|
6
4
|
"""VertexEngine is an SDK for Application Development. Specifically games, or heavier Applications
|
|
7
5
|
|
|
8
6
|
Supported OSes
|
|
@@ -21,7 +19,9 @@ from .scenes import Scene, SceneManager
|
|
|
21
19
|
from .assets import AssetManager
|
|
22
20
|
from .audio import AudioManager
|
|
23
21
|
from .Vertex import App
|
|
24
|
-
from .InputSystem import *
|
|
22
|
+
from .InputSystem.KeyInputs import *
|
|
23
|
+
from .InputSystem.BtnInputs import *
|
|
24
|
+
from .InputSystem.Events import *
|
|
25
25
|
import os
|
|
26
26
|
|
|
27
27
|
|
|
@@ -2,6 +2,7 @@ from PySide6.QtWidgets import QWidget
|
|
|
2
2
|
from PySide6.QtGui import QImage, QPainter
|
|
3
3
|
from PySide6.QtCore import QTimer, Qt
|
|
4
4
|
import pygame
|
|
5
|
+
import time
|
|
5
6
|
from .scenes import SceneManager
|
|
6
7
|
from VertexEngine.InputSystem.KeyInputs import Input
|
|
7
8
|
|
|
@@ -17,6 +18,8 @@ class GameEngine(QWidget):
|
|
|
17
18
|
self.fps = fps
|
|
18
19
|
self.position = position
|
|
19
20
|
self.resizable = resizable
|
|
21
|
+
self.delta_time = 0.0
|
|
22
|
+
self._last_frame_time = time.perf_counter()
|
|
20
23
|
|
|
21
24
|
self.keys_down = set()
|
|
22
25
|
|
|
@@ -70,6 +73,10 @@ class GameEngine(QWidget):
|
|
|
70
73
|
# ---------------------- UPDATE ----------------------
|
|
71
74
|
|
|
72
75
|
def _update_frame(self):
|
|
76
|
+
current_time = time.perf_counter()
|
|
77
|
+
self.delta_time = current_time - self._last_frame_time
|
|
78
|
+
self._last_frame_time = current_time
|
|
79
|
+
|
|
73
80
|
if not self.hasFocus():
|
|
74
81
|
Input.clear()
|
|
75
82
|
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VertexEngine
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0rc1
|
|
4
4
|
Summary: A high-performance SDK for Python Development.
|
|
5
|
-
Author-email: Tyrel Miguel <
|
|
5
|
+
Author-email: Tyrel Miguel <FinalFacility0828@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://vertexengine-zii6.onrender.com
|
|
8
8
|
Project-URL: Documentation, https://vertexenginedocs.netlify.app
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL: Official Tech Site, https://tyrel.onrender.com
|
|
9
|
+
Project-URL: Developer Site, https://tyrel.onrender.com
|
|
11
10
|
Project-URL: Source, https://github.com/VertexEngine-Projects/VertexEngine-Code
|
|
12
11
|
Project-URL: Issues, https://github.com/VertexEngine-Projects/VertexEngine-Code/issues
|
|
13
|
-
Project-URL: Discord, https://discord.gg/jqG8kQjX
|
|
14
12
|
Keywords: gamedev,game-development,game-engine,PySide6,pygame,pygame-ce,sdk,gui
|
|
15
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
16
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -48,7 +46,7 @@ Dynamic: license-file
|
|
|
48
46
|
</a>
|
|
49
47
|
</p>
|
|
50
48
|
|
|
51
|
-
# VertexEngine
|
|
49
|
+
# VertexEngine
|
|
52
50
|
VertexEngine is a GUI and Game Engine for Python applications.
|
|
53
51
|
|
|
54
52
|
## Official Extensions:
|
|
@@ -59,9 +57,8 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
59
57
|
- The documentation is in the following link: [Documentation](https://vertexenginedocs.netlify.app/) for help.
|
|
60
58
|
- Support Email: FinalFacility0828@gmail.com
|
|
61
59
|
|
|
62
|
-
## Change Logs (1.8rc1 - 2.
|
|
63
|
-
### 2.
|
|
64
|
-
- Thanks for ONE YEAR!
|
|
60
|
+
## Change Logs (1.8rc1 - 2.0rc1)
|
|
61
|
+
### 2.0rc1
|
|
65
62
|
- Added Spritesheets, Delta Time, New Import Shortcuts
|
|
66
63
|
- Fundemental Change: All Code references of PyQt6 have been replaced with the more lenient PySide6.
|
|
67
64
|
### 1.9.6
|
|
@@ -86,51 +83,18 @@ VertexEngine is a GUI and Game Engine for Python applications.
|
|
|
86
83
|
- Snake: python3.x -m VertexEngine.examples.games.snake.main
|
|
87
84
|
- Event tester: python3.x -m VertexEngine.examples.test
|
|
88
85
|
- I was very tired while making this so the RNG text was generated by AI. sory abt that :q
|
|
89
|
-
### 1.8.9
|
|
90
|
-
- Small optimizations
|
|
91
|
-
- Removed dependence on Python Garbage Collection.
|
|
92
|
-
### 1.8.7
|
|
93
|
-
- 3rd Final 1.8.x Branch Security Patch
|
|
94
|
-
- Final 1.8.x update is 1.8.9
|
|
95
|
-
- 1.9rc1 soon.
|
|
96
|
-
|
|
97
|
-
### 1.8.6
|
|
98
|
-
- Fixed Engine bugs
|
|
99
|
-
- Fixed mouse dragging events (EVENT-ID: 1024)
|
|
100
|
-
|
|
101
|
-
### 1.8.5
|
|
102
|
-
- Fixed buttons!
|
|
103
|
-
### 1.8.4
|
|
104
|
-
- Are you here?
|
|
105
|
-
- jk :D
|
|
106
|
-
- Bug fixes!
|
|
107
|
-
### 1.8.3
|
|
108
|
-
- Added some setup for the next versions!
|
|
109
|
-
- Inviting people to the VertexEngine Projects planned for VertexEngine 2.0.0
|
|
110
|
-
### 1.8.2
|
|
111
|
-
- Graphical Math Tweaks!
|
|
112
|
-
- Old classes now moved into Math
|
|
113
|
-
- GraphicalMath is now just Math
|
|
114
|
-
### 1.8.1
|
|
115
|
-
- Some Fixes!
|
|
116
|
-
- Tweaks!
|
|
117
|
-
### 1.8.0
|
|
118
|
-
- Updated Documentation!
|
|
119
|
-
- Engine Fixes!
|
|
120
|
-
### 1.8rc2
|
|
121
|
-
- Fixed math not defined errors
|
|
122
|
-
- Renamed to GraphicalMath
|
|
123
|
-
- Added the utility functions (clamp, lerp, etc.)
|
|
124
|
-
### 1.8rc1
|
|
125
|
-
- Patched some runtime errors
|
|
126
|
-
- Added MATH! (from VertexEngine.math import *)
|
|
127
86
|
|
|
128
87
|
## How to install VertexEngine:
|
|
129
|
-
|
|
88
|
+
Type in `pip install VertexEngine`
|
|
89
|
+
|
|
90
|
+
## Delta time
|
|
130
91
|
|
|
131
|
-
|
|
92
|
+
`GameEngine.delta_time` contains the elapsed time since the previous frame, in seconds. Use it to make movement independent of the frame rate:
|
|
132
93
|
|
|
133
|
-
|
|
94
|
+
```python
|
|
95
|
+
def update(self):
|
|
96
|
+
self.player.x += self.speed * self.engine.delta_time
|
|
97
|
+
```
|
|
134
98
|
|
|
135
99
|
## Dependencies
|
|
136
100
|
VertexEngine obviously has heavy dependencies since it's a game engine, the following requirements are:
|
|
@@ -2,7 +2,6 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.cfg
|
|
5
|
-
src/VertexEngine/VertexScreenModifiers.py
|
|
6
5
|
src/VertexEngine/WHY.mp3
|
|
7
6
|
src/VertexEngine/__init__.py
|
|
8
7
|
src/VertexEngine/_base.py
|
|
@@ -41,5 +40,6 @@ src/VertexEngine/examples/MajorSystemTest/Wangi.png
|
|
|
41
40
|
src/VertexEngine/examples/MajorSystemTest/main.py
|
|
42
41
|
src/VertexEngine/examples/MajorSystemTest/universfield-ui-button-click-147358.mp3
|
|
43
42
|
src/VertexEngine/examples/games/snake/main.py
|
|
43
|
+
tests/test_engine_delta_time.py
|
|
44
44
|
tests/test_pygame_vwidgets_style.py
|
|
45
45
|
tests/test_spritesheet_manager.py
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
from types import SimpleNamespace
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
pytest.importorskip("PySide6")
|
|
7
|
+
|
|
8
|
+
from VertexEngine.engine import GameEngine
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_update_frame_sets_delta_time(monkeypatch):
|
|
12
|
+
frame_times = iter((10.0, 10.25))
|
|
13
|
+
engine_module = importlib.import_module("VertexEngine.engine")
|
|
14
|
+
monkeypatch.setattr(engine_module.time, "perf_counter", lambda: next(frame_times))
|
|
15
|
+
|
|
16
|
+
engine = SimpleNamespace(
|
|
17
|
+
_last_frame_time=next(frame_times),
|
|
18
|
+
delta_time=0.0,
|
|
19
|
+
hasFocus=lambda: True,
|
|
20
|
+
screen=SimpleNamespace(fill=lambda color: None),
|
|
21
|
+
color=(0, 0, 0),
|
|
22
|
+
scene_manager=SimpleNamespace(_update=lambda: None, draw=lambda surface: None),
|
|
23
|
+
_sync_qimage=lambda: None,
|
|
24
|
+
update=lambda: None,
|
|
25
|
+
)
|
|
26
|
+
GameEngine._update_frame(engine)
|
|
27
|
+
|
|
28
|
+
assert engine.delta_time == pytest.approx(0.25)
|
|
@@ -1,70 +0,0 @@
|
|
|
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 PySide6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QApplication
|
|
3
|
-
import sys
|
|
4
|
-
from VertexEngine import VertexUI
|
|
5
|
-
# ===== Base window class =====
|
|
6
|
-
class BaseWindow(QMainWindow):
|
|
7
|
-
def __init__(self, title="Base Window", width=400, height=300):
|
|
8
|
-
super().__init__()
|
|
9
|
-
self.setWindowTitle(title)
|
|
10
|
-
self.setGeometry(100, 100, width, height)
|
|
11
|
-
self.central_widget = QWidget()
|
|
12
|
-
self.setCentralWidget(self.central_widget)
|
|
13
|
-
self.layout = QVBoxLayout()
|
|
14
|
-
self.central_widget.setLayout(self.layout)
|
|
15
|
-
print(f"[DEBUG] Initialized window '{title}' with size {width}x{height}")
|
|
16
|
-
|
|
17
|
-
def add_label(self, text):
|
|
18
|
-
label = VertexUI.Text(text)
|
|
19
|
-
self.layout.addWidget(label)
|
|
20
|
-
print(f"[DEBUG] Added label: '{text}'")
|
|
21
|
-
|
|
22
|
-
def add_button(self, text, callback=None):
|
|
23
|
-
button = VertexUI.FancyButton(text)
|
|
24
|
-
if callback:
|
|
25
|
-
button.clicked.connect(callback)
|
|
26
|
-
self.layout.addWidget(button)
|
|
27
|
-
print(f"[DEBUG] Added button: '{text}'")
|
|
28
|
-
|
|
29
|
-
# ===== Fancy themed window =====
|
|
30
|
-
class FancyWindow(BaseWindow):
|
|
31
|
-
def __init__(self, title="Fancy Window", width=500, height=400, theme_color="#FF69B4"):
|
|
32
|
-
super().__init__(title, width, height)
|
|
33
|
-
self.theme_color = theme_color
|
|
34
|
-
self.apply_theme()
|
|
35
|
-
|
|
36
|
-
def apply_theme(self):
|
|
37
|
-
self.setStyleSheet(f"""
|
|
38
|
-
QMainWindow {{
|
|
39
|
-
background-color: {self.theme_color};
|
|
40
|
-
}}
|
|
41
|
-
QLabel {{
|
|
42
|
-
color: white;
|
|
43
|
-
font-size: 18px;
|
|
44
|
-
}}
|
|
45
|
-
QPushButton {{
|
|
46
|
-
background-color: white;
|
|
47
|
-
color: {self.theme_color};
|
|
48
|
-
border-radius: 5px;
|
|
49
|
-
padding: 5px 10px;
|
|
50
|
-
}}
|
|
51
|
-
""")
|
|
52
|
-
print(f"[DEBUG] Applied theme color: {self.theme_color}")
|
|
53
|
-
|
|
54
|
-
# ===== Random fun window with auto-close button =====
|
|
55
|
-
class FunWindow(BaseWindow):
|
|
56
|
-
def __init__(self, title="Fun Window"):
|
|
57
|
-
super().__init__(title)
|
|
58
|
-
self.add_label("Welcome to FunWindow!")
|
|
59
|
-
self.add_button("Close me", self.close)
|
|
60
|
-
|
|
61
|
-
if __name__ == "__main__":
|
|
62
|
-
app = QApplication(sys.argv)
|
|
63
|
-
|
|
64
|
-
# Choose your boredom mode
|
|
65
|
-
window = FancyWindow(theme_color="#8A2BE2")
|
|
66
|
-
window.add_label("This is super fancy 💎")
|
|
67
|
-
window.add_button("Click me!", lambda: print("You clicked the fancy button!"))
|
|
68
|
-
|
|
69
|
-
window.show()
|
|
70
|
-
sys.exit(app.exec())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/AdvancedVWidgets/List.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/BasicWidgets/SimpleGUI.py
RENAMED
|
File without changes
|
{vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/VertexWidgets/PygameVWidgets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/Wangi.png
RENAMED
|
File without changes
|
{vertexengine-2.0.0 → vertexengine-2.0rc1}/src/VertexEngine/examples/MajorSystemTest/main.py
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|