ed-game 3.2.0__tar.gz → 4.0.0.dev1__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.
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: ed-game
3
+ Version: 4.0.0.dev1
4
+ Summary: Earth Defense Game
5
+ Author-email: qq-name <your@email.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://pypi.org/project/ed-game/
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Classifier: Programming Language :: Python :: 3.15
12
+ Classifier: Programming Language :: Python :: 3.16
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Topic :: Games/Entertainment
17
+ Requires-Python: >=3.13
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: pygame-ce>=2.5.3
21
+ Requires-Dist: pyglet>=2.0
22
+ Dynamic: license-file
23
+
24
+ Installing:
25
+ ```bash
26
+ pip install ed-game
27
+ ```
28
+
29
+ or:
30
+
31
+ ```bash
32
+ pip3 install ed-game
33
+ ```
34
+
35
+ Usage:
36
+
37
+ ```python
38
+ import ed_game
39
+ ed_game.run()
40
+ ```
41
+
42
+ ed-game dependencies:
43
+
44
+ setuptools>=77.3.4 (is build)
45
+
46
+ pygame-ce >= 2.5.3 (core of 2.x / 3.x /4.x)
47
+
48
+ pyglet >= 2.0 (core of 4.x New Game)
49
+
50
+ CPython >= 3.13
51
+
52
+ Earth Defense Game - A cross-platform shooter.
53
+
54
+ Windows / 2.x & 3.x: Uses a high-performance C++ extension for precise, ultra-slow enemy movement and fast collision detection.
55
+
56
+ Other platforms / 2.x & 3.x: Runs a 100% Pure Python fallback.
57
+
58
+ 4.x New Game: A brand new implementation using the Pyglet library.
59
+
60
+ 🆕 What's New in 4.0.0dev1
61
+ New Ed-Game Engine: Added a completely new implementation (ed_game.new) built with the Pyglet library, moving away from Pygame.
62
+
63
+ Early Access: Please note that this is an early dev release. There may be bugs and performance issues before 4.0.0rc1.
64
+
65
+ ⚠️ Known Issues
66
+ We have identified runtime visual bugs in ed_game 4.0.0dev1 and ed_game 3.2.0.
67
+
68
+ These issues will be fixed in the upcoming ed_game 4.0.0dev2 and ed_game 3.2.1 (or 3.3.0).
@@ -0,0 +1,45 @@
1
+ Installing:
2
+ ```bash
3
+ pip install ed-game
4
+ ```
5
+
6
+ or:
7
+
8
+ ```bash
9
+ pip3 install ed-game
10
+ ```
11
+
12
+ Usage:
13
+
14
+ ```python
15
+ import ed_game
16
+ ed_game.run()
17
+ ```
18
+
19
+ ed-game dependencies:
20
+
21
+ setuptools>=77.3.4 (is build)
22
+
23
+ pygame-ce >= 2.5.3 (core of 2.x / 3.x /4.x)
24
+
25
+ pyglet >= 2.0 (core of 4.x New Game)
26
+
27
+ CPython >= 3.13
28
+
29
+ Earth Defense Game - A cross-platform shooter.
30
+
31
+ Windows / 2.x & 3.x: Uses a high-performance C++ extension for precise, ultra-slow enemy movement and fast collision detection.
32
+
33
+ Other platforms / 2.x & 3.x: Runs a 100% Pure Python fallback.
34
+
35
+ 4.x New Game: A brand new implementation using the Pyglet library.
36
+
37
+ 🆕 What's New in 4.0.0dev1
38
+ New Ed-Game Engine: Added a completely new implementation (ed_game.new) built with the Pyglet library, moving away from Pygame.
39
+
40
+ Early Access: Please note that this is an early dev release. There may be bugs and performance issues before 4.0.0rc1.
41
+
42
+ ⚠️ Known Issues
43
+ We have identified runtime visual bugs in ed_game 4.0.0dev1 and ed_game 3.2.0.
44
+
45
+ These issues will be fixed in the upcoming ed_game 4.0.0dev2 and ed_game 3.2.1 (or 3.3.0).
@@ -4,13 +4,16 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ed-game"
7
- version = "3.2.0"
7
+ version = "4.0.0dev1"
8
8
  description = "Earth Defense Game"
9
9
  authors = [{name = "qq-name", email = "your@email.com"}]
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.13"
12
12
  license = "MIT"
13
- dependencies = ["pygame-ce>=2.5.3"]
13
+ dependencies = [
14
+ "pygame-ce>=2.5.3",
15
+ "pyglet>=2.0"
16
+ ]
14
17
 
15
18
  classifiers = [
16
19
  "Programming Language :: Python :: 3",
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: ed-game
3
+ Version: 4.0.0.dev1
4
+ Summary: Earth Defense Game
5
+ Author-email: qq-name <your@email.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://pypi.org/project/ed-game/
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Classifier: Programming Language :: Python :: 3.15
12
+ Classifier: Programming Language :: Python :: 3.16
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Topic :: Games/Entertainment
17
+ Requires-Python: >=3.13
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: pygame-ce>=2.5.3
21
+ Requires-Dist: pyglet>=2.0
22
+ Dynamic: license-file
23
+
24
+ Installing:
25
+ ```bash
26
+ pip install ed-game
27
+ ```
28
+
29
+ or:
30
+
31
+ ```bash
32
+ pip3 install ed-game
33
+ ```
34
+
35
+ Usage:
36
+
37
+ ```python
38
+ import ed_game
39
+ ed_game.run()
40
+ ```
41
+
42
+ ed-game dependencies:
43
+
44
+ setuptools>=77.3.4 (is build)
45
+
46
+ pygame-ce >= 2.5.3 (core of 2.x / 3.x /4.x)
47
+
48
+ pyglet >= 2.0 (core of 4.x New Game)
49
+
50
+ CPython >= 3.13
51
+
52
+ Earth Defense Game - A cross-platform shooter.
53
+
54
+ Windows / 2.x & 3.x: Uses a high-performance C++ extension for precise, ultra-slow enemy movement and fast collision detection.
55
+
56
+ Other platforms / 2.x & 3.x: Runs a 100% Pure Python fallback.
57
+
58
+ 4.x New Game: A brand new implementation using the Pyglet library.
59
+
60
+ 🆕 What's New in 4.0.0dev1
61
+ New Ed-Game Engine: Added a completely new implementation (ed_game.new) built with the Pyglet library, moving away from Pygame.
62
+
63
+ Early Access: Please note that this is an early dev release. There may be bugs and performance issues before 4.0.0rc1.
64
+
65
+ ⚠️ Known Issues
66
+ We have identified runtime visual bugs in ed_game 4.0.0dev1 and ed_game 3.2.0.
67
+
68
+ These issues will be fixed in the upcoming ed_game 4.0.0dev2 and ed_game 3.2.1 (or 3.3.0).
@@ -10,4 +10,6 @@ src/ed_game.egg-info/PKG-INFO
10
10
  src/ed_game.egg-info/SOURCES.txt
11
11
  src/ed_game.egg-info/dependency_links.txt
12
12
  src/ed_game.egg-info/requires.txt
13
- src/ed_game.egg-info/top_level.txt
13
+ src/ed_game.egg-info/top_level.txt
14
+ src/new/__init__.py
15
+ src/new/game.py
@@ -1 +1,2 @@
1
1
  pygame-ce>=2.5.3
2
+ pyglet>=2.0
@@ -0,0 +1 @@
1
+ from .game import run
@@ -0,0 +1,158 @@
1
+ import pyglet
2
+ from pyglet import shapes
3
+ from pyglet.window import key
4
+ import random
5
+ import math
6
+
7
+ WIDTH, HEIGHT = 1800, 1050
8
+
9
+ class NewGame:
10
+ def __init__(self):
11
+ self.window = pyglet.window.Window(WIDTH, HEIGHT, "Star Guardian 4.0.0dev1 (Pyglet)")
12
+ self.batch = pyglet.graphics.Batch()
13
+
14
+ self.player = shapes.Circle(WIDTH // 2, 100, 16, color=(62, 255, 250), batch=self.batch)
15
+ self.player_core = shapes.Circle(WIDTH // 2, 96, 6, color=(0, 204, 255), batch=self.batch)
16
+
17
+ self.bullets = []
18
+ self.enemies = []
19
+ self.particles = []
20
+
21
+ self.score = 0
22
+ self.lives = 3
23
+ self.boss_timer = 20.0
24
+ self.state = {"left": False, "right": False, "shoot": False, "cooldown": 0}
25
+
26
+ self.label_score = pyglet.text.Label('Score: 0', font_name='Arial', font_size=28, x=30, y=HEIGHT - 40, batch=self.batch, color=(0, 255, 255, 255))
27
+ self.label_lives = pyglet.text.Label('Lives: 3', font_name='Arial', font_size=28, x=WIDTH - 150, y=HEIGHT - 40, batch=self.batch, color=(255, 51, 102, 255))
28
+ self.label_status = pyglet.text.Label('Slow Galaxy', font_name='Arial', font_size=20, x=WIDTH//2, y=HEIGHT - 40, batch=self.batch, color=(255, 215, 0, 255), anchor_x='center')
29
+
30
+ self.window.push_handlers(self)
31
+ pyglet.clock.schedule_interval(self.update, 1/60.0)
32
+ pyglet.app.run()
33
+
34
+ def on_key_press(self, symbol, modifiers):
35
+ if symbol in (key.A, key.LEFT): self.state["left"] = True
36
+ if symbol in (key.D, key.RIGHT): self.state["right"] = True
37
+ if symbol in (key.SPACE, key.K, key.UP): self.state["shoot"] = True
38
+ if symbol == key.R: self.reset()
39
+
40
+ def on_key_release(self, symbol, modifiers):
41
+ if symbol in (key.A, key.LEFT): self.state["left"] = False
42
+ if symbol in (key.D, key.RIGHT): self.state["right"] = False
43
+ if symbol in (key.SPACE, key.K, key.UP): self.state["shoot"] = False
44
+
45
+ def reset(self):
46
+ self.score = 0
47
+ self.lives = 3
48
+ self.player.x, self.player.y = WIDTH // 2, 100
49
+ for b in self.bullets: b['node'].delete()
50
+ for e in self.enemies: e['node'].delete()
51
+ self.bullets.clear()
52
+ self.enemies.clear()
53
+ self.update_labels()
54
+
55
+ def update_labels(self):
56
+ self.label_score.text = f"Score: {self.score}"
57
+ self.label_lives.text = f"Lives: {self.lives}"
58
+
59
+ def on_draw(self):
60
+ self.window.clear()
61
+ self.batch.draw()
62
+
63
+ def update(self, dt):
64
+ if self.lives <= 0: return
65
+
66
+ if self.state["left"]: self.player.x -= 500 * dt
67
+ if self.state["right"]: self.player.x += 500 * dt
68
+ self.player.x = max(20, min(WIDTH - 20, self.player.x))
69
+ self.player_core.x = self.player.x
70
+ self.player_core.y = self.player.y - 4
71
+
72
+ self.state["cooldown"] -= dt
73
+ if self.state["shoot"] and self.state["cooldown"] <= 0:
74
+ b = shapes.Circle(self.player.x, self.player.y + 15, 5, color=(255, 255, 128), batch=self.batch)
75
+ self.bullets.append({"node": b, "vy": 900})
76
+ self.state["cooldown"] = 0.15
77
+
78
+ for b in self.bullets[:]:
79
+ b["node"].y += b["vy"] * dt
80
+ if b["node"].y > HEIGHT:
81
+ b["node"].delete()
82
+ self.bullets.remove(b)
83
+
84
+ self.boss_timer -= dt
85
+ if self.boss_timer <= 0:
86
+ self.boss_timer = 20.0
87
+ boss = shapes.Circle(random.randint(100, WIDTH - 100), HEIGHT + 50, 48, color=(180, 50, 255), batch=self.batch)
88
+ self.enemies.append({"node": boss, "hp": 50, "max_hp": 50, "vy": -15, "is_boss": True})
89
+
90
+ crown = shapes.Polygon([(boss.x - 20, boss.y + 40), (boss.x, boss.y + 60), (boss.x + 20, boss.y + 40)], color=(255, 215, 0), batch=self.batch)
91
+ bg_bar = shapes.Rectangle(boss.x - 40, boss.y + 55, 80, 6, color=(255, 50, 50), batch=self.batch)
92
+ fg_bar = shapes.Rectangle(boss.x - 40, boss.y + 55, 80, 6, color=(0, 255, 0), batch=self.batch)
93
+ boss["ui"] = {"crown": crown, "bg_bar": bg_bar, "fg_bar": fg_bar}
94
+
95
+ if random.random() < 0.03:
96
+ e = shapes.Circle(random.randint(20, WIDTH - 20), HEIGHT + 20, 12, color=(255, 58, 111), batch=self.batch)
97
+ self.enemies.append({"node": e, "hp": 1, "max_hp": 1, "vy": -80, "is_boss": False})
98
+
99
+ for e in self.enemies[:]:
100
+ e["node"].y += e["vy"] * dt
101
+ if e.get("is_boss") and "ui" in e:
102
+ ui = e["ui"]
103
+ ui["bg_bar"].x = e["node"].x - 40
104
+ ui["bg_bar"].y = e["node"].y + 55
105
+ ui["fg_bar"].x = e["node"].x - 40
106
+ ui["fg_bar"].y = e["node"].y + 55
107
+ ui["fg_bar"].width = 80 * (e["hp"] / e["max_hp"])
108
+
109
+ if math.hypot(self.player.x - e["node"].x, self.player.y - e["node"].y) < 16 + e["node"].radius:
110
+ self.lives -= 1
111
+ self.update_labels()
112
+ self.create_explosion(e["node"].x, e["node"].y)
113
+ if "ui" in e:
114
+ for u in e["ui"].values(): u.delete()
115
+ e["node"].delete()
116
+ self.enemies.remove(e)
117
+ if self.lives <= 0: return
118
+ continue
119
+
120
+ if e["node"].y < -100:
121
+ if "ui" in e:
122
+ for u in e["ui"].values(): u.delete()
123
+ e["node"].delete()
124
+ self.enemies.remove(e)
125
+
126
+ for b in self.bullets[:]:
127
+ for e in self.enemies[:]:
128
+ if math.hypot(b["node"].x - e["node"].x, b["node"].y - e["node"].y) < 5 + e["node"].radius:
129
+ e["hp"] -= 1
130
+ b["node"].delete()
131
+ self.bullets.remove(b)
132
+
133
+ if e["hp"] <= 0:
134
+ self.score += 200 if e.get("is_boss") else 10
135
+ self.update_labels()
136
+ self.create_explosion(e["node"].x, e["node"].y)
137
+ if "ui" in e:
138
+ for u in e["ui"].values(): u.delete()
139
+ e["node"].delete()
140
+ self.enemies.remove(e)
141
+ break
142
+
143
+ for p in self.particles[:]:
144
+ p["node"].x += p["vx"] * dt
145
+ p["node"].y += p["vy"] * dt
146
+ p["life"] -= dt
147
+ if p["life"] <= 0:
148
+ p["node"].delete()
149
+ self.particles.remove(p)
150
+
151
+ def create_explosion(self, x, y):
152
+ for _ in range(8):
153
+ p = shapes.Circle(x, y, random.uniform(2, 5), color=(255, random.randint(100, 200), 50), batch=self.batch)
154
+ self.particles.append({"node": p, "vx": random.uniform(-300, 300), "vy": random.uniform(-300, 300), "life": 0.5})
155
+
156
+ def run():
157
+ NewGame()
158
+ run()
ed_game-3.2.0/PKG-INFO DELETED
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ed-game
3
- Version: 3.2.0
4
- Summary: Earth Defense Game
5
- Author-email: qq-name <your@email.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://pypi.org/project/ed-game/
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.13
10
- Classifier: Programming Language :: Python :: 3.14
11
- Classifier: Programming Language :: Python :: 3.15
12
- Classifier: Programming Language :: Python :: 3.16
13
- Classifier: Operating System :: Microsoft :: Windows
14
- Classifier: Operating System :: MacOS
15
- Classifier: Operating System :: POSIX :: Linux
16
- Classifier: Topic :: Games/Entertainment
17
- Requires-Python: >=3.13
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: pygame-ce>=2.5.3
21
- Dynamic: license-file
22
-
23
- Installing:
24
-
25
- pip install ed-game
26
-
27
- or:
28
-
29
- pip3 install ed-game
30
-
31
- Usage:
32
-
33
- import ed_game
34
- ed_game.run()
35
-
36
- ed-game dependencies:
37
- 1. setuptools>=77.3.4 (is build)
38
- 2. pygame-ce >= 2.5.3 (core of ed-game) (Last version is 2.5.8)
39
- 3. CPython >= 3.13 (Support for Python 3.8, 3.9, 3.10, 3.11, and 3.12 has been dropped.)
40
-
41
- Note: We will drop support for any Python version that has been in security-only mode for over a year.
42
-
43
- **⚠️ Source Code (`.tar.gz`) Warning:**
44
- If you are installing from the source distribution (`pip install --no-binary :all: ed-game`), please note that the pre-compiled `edgame_core.dll` is **NOT** included to keep the package lightweight.
45
- You must have **G++** (MinGW on Windows) and **VS Code** (or any C++ compiler environment) to manually compile the `edgame_core.cpp` before running the C++ accelerated version. If you don't have these tools, please install the binary wheel (`.whl`) instead by running `pip install ed-game`.
46
-
47
- Earth Defense Game - A cross-platform shooter.
48
- - **Windows**: Uses a high-performance **C++ extension** for precise, ultra-slow enemy movement and fast collision detection.
49
- - **Other platforms ( macOS / Linux / Android )**: Runs a 100% Pure Python fallback.
50
-
51
- ### 🆕 What's New in 3.2.0
52
- - **Boss Counterattack**: The Boss now fires deadly red projectiles at you.
53
- - **Combat Polish**: Smoother bullet logic and fixed edge-case bugs for the Nuke button.
ed_game-3.2.0/README.md DELETED
@@ -1,31 +0,0 @@
1
- Installing:
2
-
3
- pip install ed-game
4
-
5
- or:
6
-
7
- pip3 install ed-game
8
-
9
- Usage:
10
-
11
- import ed_game
12
- ed_game.run()
13
-
14
- ed-game dependencies:
15
- 1. setuptools>=77.3.4 (is build)
16
- 2. pygame-ce >= 2.5.3 (core of ed-game) (Last version is 2.5.8)
17
- 3. CPython >= 3.13 (Support for Python 3.8, 3.9, 3.10, 3.11, and 3.12 has been dropped.)
18
-
19
- Note: We will drop support for any Python version that has been in security-only mode for over a year.
20
-
21
- **⚠️ Source Code (`.tar.gz`) Warning:**
22
- If you are installing from the source distribution (`pip install --no-binary :all: ed-game`), please note that the pre-compiled `edgame_core.dll` is **NOT** included to keep the package lightweight.
23
- You must have **G++** (MinGW on Windows) and **VS Code** (or any C++ compiler environment) to manually compile the `edgame_core.cpp` before running the C++ accelerated version. If you don't have these tools, please install the binary wheel (`.whl`) instead by running `pip install ed-game`.
24
-
25
- Earth Defense Game - A cross-platform shooter.
26
- - **Windows**: Uses a high-performance **C++ extension** for precise, ultra-slow enemy movement and fast collision detection.
27
- - **Other platforms ( macOS / Linux / Android )**: Runs a 100% Pure Python fallback.
28
-
29
- ### 🆕 What's New in 3.2.0
30
- - **Boss Counterattack**: The Boss now fires deadly red projectiles at you.
31
- - **Combat Polish**: Smoother bullet logic and fixed edge-case bugs for the Nuke button.
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ed-game
3
- Version: 3.2.0
4
- Summary: Earth Defense Game
5
- Author-email: qq-name <your@email.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://pypi.org/project/ed-game/
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.13
10
- Classifier: Programming Language :: Python :: 3.14
11
- Classifier: Programming Language :: Python :: 3.15
12
- Classifier: Programming Language :: Python :: 3.16
13
- Classifier: Operating System :: Microsoft :: Windows
14
- Classifier: Operating System :: MacOS
15
- Classifier: Operating System :: POSIX :: Linux
16
- Classifier: Topic :: Games/Entertainment
17
- Requires-Python: >=3.13
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: pygame-ce>=2.5.3
21
- Dynamic: license-file
22
-
23
- Installing:
24
-
25
- pip install ed-game
26
-
27
- or:
28
-
29
- pip3 install ed-game
30
-
31
- Usage:
32
-
33
- import ed_game
34
- ed_game.run()
35
-
36
- ed-game dependencies:
37
- 1. setuptools>=77.3.4 (is build)
38
- 2. pygame-ce >= 2.5.3 (core of ed-game) (Last version is 2.5.8)
39
- 3. CPython >= 3.13 (Support for Python 3.8, 3.9, 3.10, 3.11, and 3.12 has been dropped.)
40
-
41
- Note: We will drop support for any Python version that has been in security-only mode for over a year.
42
-
43
- **⚠️ Source Code (`.tar.gz`) Warning:**
44
- If you are installing from the source distribution (`pip install --no-binary :all: ed-game`), please note that the pre-compiled `edgame_core.dll` is **NOT** included to keep the package lightweight.
45
- You must have **G++** (MinGW on Windows) and **VS Code** (or any C++ compiler environment) to manually compile the `edgame_core.cpp` before running the C++ accelerated version. If you don't have these tools, please install the binary wheel (`.whl`) instead by running `pip install ed-game`.
46
-
47
- Earth Defense Game - A cross-platform shooter.
48
- - **Windows**: Uses a high-performance **C++ extension** for precise, ultra-slow enemy movement and fast collision detection.
49
- - **Other platforms ( macOS / Linux / Android )**: Runs a 100% Pure Python fallback.
50
-
51
- ### 🆕 What's New in 3.2.0
52
- - **Boss Counterattack**: The Boss now fires deadly red projectiles at you.
53
- - **Combat Polish**: Smoother bullet logic and fixed edge-case bugs for the Nuke button.
File without changes
File without changes
File without changes
File without changes