From 32df492d86ba6e4c2c783b082e8765e8dda3991d Mon Sep 17 00:00:00 2001
From: dimkauzh
- +
@@ -15,8 +15,8 @@ hide: - - + + diff --git a/mkdocs.yml b/mkdocs.yml index 7497e96..a33380c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,8 @@ site_name: Fusion Engine Documentation site_description: A custom open-source game engine on OpenGL and Python, it’s written in pure Python! It’s easy and fast! -repo_name: fusion-engine -repo_url: https://github.com/fusionengine-org/fusion-engine +repo_name: fusionengine-org/fusion +repo_url: https://github.com/fusionengine-org/fusion nav: - Home: 'index.md' diff --git a/src/fusionengine/engine/nodes.py b/src/fusionengine/engine/nodes.py new file mode 100644 index 0000000..54a9700 --- /dev/null +++ b/src/fusionengine/engine/nodes.py @@ -0,0 +1,26 @@ +from fusionengine.engine.physics import Staticbody +from fusionengine.engine.vector import Vector2D + + +class Node: + def __init__( + self, + x: int, + y: int, + node_type, + body_type=Staticbody, + ): + self.x = x + self.y = y + self.x = node_type.x + self.y = node_type.y + self.body_type = body_type + self.node_type = node_type + + pass + + def get_coord_tuple(self) -> tuple[int, int]: + return self.x, self.y + + def get_vec2_coord(self) -> Vector2D: + return Vector2D(self.x, self.y) diff --git a/src/fusionengine/engine/physics.py b/src/fusionengine/engine/physics.py new file mode 100644 index 0000000..35f56a9 --- /dev/null +++ b/src/fusionengine/engine/physics.py @@ -0,0 +1,8 @@ +class Rigidbody: + def __init__(self): + pass + + +class Staticbody: + def __init__(self): + pass diff --git a/tests/performance.py b/tests/performance.py new file mode 100644 index 0000000..35f5d5e --- /dev/null +++ b/tests/performance.py @@ -0,0 +1,27 @@ +import fusionengine as fusion +import time + +checked_time = False +start_time = time.time() + +window = fusion.Window("test", 600, 600) + + +if fusion.__version__ == "5.1.0" or fusion.__version__ == "5.0.0": + image = fusion.Image(fusion.DEBUGIMAGE, 0, 0, 600, 600) + +else: + image = fusion.Image(window, fusion.DEBUGIMAGE, 0, 0, 600, 600) + + +@window.loop +def loop(): + global checked_time + image.draw() + + if not checked_time: + end_time = time.time() + elapsed_time = end_time - start_time + + print(elapsed_time) + checked_time = True