lunaengine 0.1.2__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.
Files changed (39) hide show
  1. lunaengine-0.1.2/LICENSE +21 -0
  2. lunaengine-0.1.2/PKG-INFO +112 -0
  3. lunaengine-0.1.2/README.md +74 -0
  4. lunaengine-0.1.2/lunaengine/__init__.py +14 -0
  5. lunaengine-0.1.2/lunaengine/backend/__init__.py +24 -0
  6. lunaengine-0.1.2/lunaengine/backend/opengl.py +939 -0
  7. lunaengine-0.1.2/lunaengine/backend/pygame_backend.py +158 -0
  8. lunaengine-0.1.2/lunaengine/core/__init__.py +27 -0
  9. lunaengine-0.1.2/lunaengine/core/engine.py +575 -0
  10. lunaengine-0.1.2/lunaengine/core/renderer.py +104 -0
  11. lunaengine-0.1.2/lunaengine/core/scene.py +174 -0
  12. lunaengine-0.1.2/lunaengine/core/window.py +124 -0
  13. lunaengine-0.1.2/lunaengine/graphics/__init__.py +43 -0
  14. lunaengine-0.1.2/lunaengine/graphics/camera.py +639 -0
  15. lunaengine-0.1.2/lunaengine/graphics/lighting.py +91 -0
  16. lunaengine-0.1.2/lunaengine/graphics/particles.py +719 -0
  17. lunaengine-0.1.2/lunaengine/graphics/shadows.py +97 -0
  18. lunaengine-0.1.2/lunaengine/graphics/spritesheet.py +362 -0
  19. lunaengine-0.1.2/lunaengine/tools/__init__.py +3 -0
  20. lunaengine-0.1.2/lunaengine/tools/code_stats.py +369 -0
  21. lunaengine-0.1.2/lunaengine/tools/image_conversion_tool.py +308 -0
  22. lunaengine-0.1.2/lunaengine/ui/__init__.py +56 -0
  23. lunaengine-0.1.2/lunaengine/ui/elements.py +2839 -0
  24. lunaengine-0.1.2/lunaengine/ui/layout.py +213 -0
  25. lunaengine-0.1.2/lunaengine/ui/styles.py +91 -0
  26. lunaengine-0.1.2/lunaengine/ui/themes.py +2178 -0
  27. lunaengine-0.1.2/lunaengine/utils/__init__.py +42 -0
  28. lunaengine-0.1.2/lunaengine/utils/image_converter.py +249 -0
  29. lunaengine-0.1.2/lunaengine/utils/math_utils.py +55 -0
  30. lunaengine-0.1.2/lunaengine/utils/performance.py +191 -0
  31. lunaengine-0.1.2/lunaengine/utils/threading.py +87 -0
  32. lunaengine-0.1.2/lunaengine.egg-info/PKG-INFO +112 -0
  33. lunaengine-0.1.2/lunaengine.egg-info/SOURCES.txt +37 -0
  34. lunaengine-0.1.2/lunaengine.egg-info/dependency_links.txt +1 -0
  35. lunaengine-0.1.2/lunaengine.egg-info/requires.txt +13 -0
  36. lunaengine-0.1.2/lunaengine.egg-info/top_level.txt +1 -0
  37. lunaengine-0.1.2/pyproject.toml +48 -0
  38. lunaengine-0.1.2/setup.cfg +4 -0
  39. lunaengine-0.1.2/setup.py +27 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 MrJuaum
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: lunaengine
3
+ Version: 0.1.2
4
+ Summary: A modern 2D game engine with advanced UI and graphics
5
+ Home-page: https://github.com/MrJuaumBR/lunaengine
6
+ Author: MrJuaum
7
+ License: MIT
8
+ Project-URL: Homepage, https://mrjuaumbr.github.io/lunaengine/
9
+ Project-URL: Repository, https://github.com/MrJuaumBR/lunaengine
10
+ Project-URL: Issue Tracker, https://github.com/MrJuaumBR/lunaengine/issues
11
+ Keywords: game,engine,2d,graphics,pygame
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pygame>=2.5.0
24
+ Requires-Dist: numpy>=1.21.0
25
+ Requires-Dist: PyOpenGL>=3.1.0
26
+ Requires-Dist: PyOpenGL-accelerate>=3.1.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: black>=22.0.0; extra == "dev"
29
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
30
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
31
+ Requires-Dist: setuptools>=65.0.0; extra == "dev"
32
+ Requires-Dist: wheel>=0.37.0; extra == "dev"
33
+ Requires-Dist: twine>=4.0.0; extra == "dev"
34
+ Requires-Dist: build>=0.10.0; extra == "dev"
35
+ Dynamic: home-page
36
+ Dynamic: license-file
37
+ Dynamic: requires-python
38
+
39
+ # LunaEngine 🚀
40
+
41
+ A modern, optimized 2D game engine built with Python and Pygame featuring advanced UI systems, procedural lighting, and embedded asset management.
42
+
43
+ ## 📋 Features
44
+
45
+ | Feature | Description | Status |
46
+ |---------|-------------|---------|
47
+ | **Advanced UI** | Roblox Studio-like UI components | ✅ Functional |
48
+ | **OpenGL Rendering** | Hardware-accelerated graphics | ✅ Functional |
49
+ | **Performance Tools** | FPS monitoring, hardware detection | ✅ Functional |
50
+ | **Themes** | The engine have pre-built themes | ✅ Functional |
51
+ | **Lighting System** | Dynamic lights and shadows | 🔄 WIP |
52
+ | **Particle Effects** | Particle system | 🔄 WIP |
53
+ | **Image Embedding** | Convert assets to Python code | ⚠️ Buggy |
54
+ | **Modular Architecture** | Easy to extend and customize | |
55
+
56
+ # Code
57
+ [See this file](./lunaengine/CODE_STATISTICS.md)
58
+ [TestPyPi](https://test.pypi.org/project/lunaengine/)
59
+ [PyPi](https://pypi.org/project/lunaengine/)
60
+
61
+ ## 🚀 Quick Start
62
+
63
+ ### Installation
64
+
65
+ ```bash
66
+ # Install dependencies
67
+ pip install -r requirements.txt
68
+
69
+ # Run a basic example
70
+ python examples/basic_game.py
71
+ ```
72
+
73
+ ## Requirements
74
+
75
+ ### Core Dependencies (required):
76
+
77
+ ```bash
78
+ pygame>=2.5.0
79
+ numpy>=1.21.0
80
+ PyOpenGL>=3.1.0
81
+ PyOpenGL-accelerate>=3.1.0
82
+ ```
83
+
84
+ ### Development Tools (optional):
85
+
86
+ ```bash
87
+ black>=22.0.0
88
+ flake8>=4.0.0
89
+ pytest>=7.0.0
90
+ setuptools>=65.0.0
91
+ wheel>=0.37.0
92
+ twine>=4.0.0
93
+ ```
94
+
95
+ ## Build
96
+ ```bash
97
+ # Make build
98
+ python -m build
99
+
100
+ # Check files
101
+ twine check dist/*
102
+
103
+ # Upload testpypi
104
+ twine upload --config-file .pypirc --repository testpypi dist/*
105
+
106
+ # Upload PyPi
107
+ twine upload --config-file .pypirc --repository pypi dist/*
108
+ ```
109
+
110
+ ## OpenGL
111
+ - Require OpenGL 3.3+
112
+ - ``LunaEngine("Game Title", screen_width, screen_height, use_opengl=True)``
@@ -0,0 +1,74 @@
1
+ # LunaEngine 🚀
2
+
3
+ A modern, optimized 2D game engine built with Python and Pygame featuring advanced UI systems, procedural lighting, and embedded asset management.
4
+
5
+ ## 📋 Features
6
+
7
+ | Feature | Description | Status |
8
+ |---------|-------------|---------|
9
+ | **Advanced UI** | Roblox Studio-like UI components | ✅ Functional |
10
+ | **OpenGL Rendering** | Hardware-accelerated graphics | ✅ Functional |
11
+ | **Performance Tools** | FPS monitoring, hardware detection | ✅ Functional |
12
+ | **Themes** | The engine have pre-built themes | ✅ Functional |
13
+ | **Lighting System** | Dynamic lights and shadows | 🔄 WIP |
14
+ | **Particle Effects** | Particle system | 🔄 WIP |
15
+ | **Image Embedding** | Convert assets to Python code | ⚠️ Buggy |
16
+ | **Modular Architecture** | Easy to extend and customize | |
17
+
18
+ # Code
19
+ [See this file](./lunaengine/CODE_STATISTICS.md)
20
+ [TestPyPi](https://test.pypi.org/project/lunaengine/)
21
+ [PyPi](https://pypi.org/project/lunaengine/)
22
+
23
+ ## 🚀 Quick Start
24
+
25
+ ### Installation
26
+
27
+ ```bash
28
+ # Install dependencies
29
+ pip install -r requirements.txt
30
+
31
+ # Run a basic example
32
+ python examples/basic_game.py
33
+ ```
34
+
35
+ ## Requirements
36
+
37
+ ### Core Dependencies (required):
38
+
39
+ ```bash
40
+ pygame>=2.5.0
41
+ numpy>=1.21.0
42
+ PyOpenGL>=3.1.0
43
+ PyOpenGL-accelerate>=3.1.0
44
+ ```
45
+
46
+ ### Development Tools (optional):
47
+
48
+ ```bash
49
+ black>=22.0.0
50
+ flake8>=4.0.0
51
+ pytest>=7.0.0
52
+ setuptools>=65.0.0
53
+ wheel>=0.37.0
54
+ twine>=4.0.0
55
+ ```
56
+
57
+ ## Build
58
+ ```bash
59
+ # Make build
60
+ python -m build
61
+
62
+ # Check files
63
+ twine check dist/*
64
+
65
+ # Upload testpypi
66
+ twine upload --config-file .pypirc --repository testpypi dist/*
67
+
68
+ # Upload PyPi
69
+ twine upload --config-file .pypirc --repository pypi dist/*
70
+ ```
71
+
72
+ ## OpenGL
73
+ - Require OpenGL 3.3+
74
+ - ``LunaEngine("Game Title", screen_width, screen_height, use_opengl=True)``
@@ -0,0 +1,14 @@
1
+ """
2
+ LunaEngine - A powerful 2D game engine for Python
3
+ """
4
+
5
+ __version__ = "1.0.0"
6
+
7
+ from . import core
8
+ from . import ui
9
+ from . import graphics
10
+ from . import utils
11
+ from . import backend
12
+ from . import tools
13
+
14
+ __all__ = ['core', 'ui', 'graphics', 'utils', 'backend', 'tools']
@@ -0,0 +1,24 @@
1
+ """Backend module for LunaEngine
2
+
3
+ LOCATION: lunaengine/backend/__init__.py
4
+
5
+ DESCRIPTION:
6
+ Initialization file for the backend module. This module provides rendering
7
+ backends and graphics system implementations for the LunaEngine.
8
+
9
+ MODULES PROVIDED:
10
+ - opengl: OpenGL-based renderer for hardware-accelerated graphics
11
+ - pygame_backend: Pygame-based fallback renderer for compatibility
12
+
13
+ LIBRARIES USED:
14
+ - pygame: Core graphics and window management
15
+ - OpenGL: 3D graphics rendering (optional)
16
+ - numpy: Numerical operations for graphics math
17
+ """
18
+
19
+ from .opengl import OpenGLRenderer, TextureShader, ParticleShader, ShaderProgram
20
+ from .pygame_backend import PygameRenderer
21
+
22
+ __all__ = [
23
+ "OpenGLRenderer", "TextureShader", "ParticleShader", "ShaderProgram", "PygameRenderer"
24
+ ]