mirror of
https://github.com/csd4ni3l/shatterstack.git
synced 2025-11-05 05:58:18 +01:00
Initial version
This commit is contained in:
183
.gitignore
vendored
Normal file
183
.gitignore
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# UV
|
||||
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
#uv.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||
.pdm.toml
|
||||
.pdm-python
|
||||
.pdm-build/
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
# Ruff stuff:
|
||||
.ruff_cache/
|
||||
|
||||
# PyPI configuration file
|
||||
.pypirc
|
||||
|
||||
.vscode
|
||||
dragonfly
|
||||
private
|
||||
|
||||
test*.py
|
||||
.zed/
|
||||
logs/
|
||||
logs
|
||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.13
|
||||
1
README.md
Normal file
1
README.md
Normal file
@@ -0,0 +1 @@
|
||||
A game where you have to place shapes in lines to get points!
|
||||
BIN
assets/fonts/ProtestStrike-Regular.ttf
Normal file
BIN
assets/fonts/ProtestStrike-Regular.ttf
Normal file
Binary file not shown.
BIN
assets/graphics/button.png
Normal file
BIN
assets/graphics/button.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 280 B |
BIN
assets/graphics/button_hovered.png
Normal file
BIN
assets/graphics/button_hovered.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
174
game/play.py
Normal file
174
game/play.py
Normal file
@@ -0,0 +1,174 @@
|
||||
import arcade, arcade.gui, random, math
|
||||
|
||||
from game.sprites import Shape
|
||||
from utils.constants import SHAPES, CELL_SIZE, ROWS, COLS, menu_background_color, OUTLINE_WIDTH, COLORS, button_style
|
||||
from utils.preload import button_texture, button_hovered_texture
|
||||
|
||||
class Game(arcade.gui.UIView):
|
||||
def __init__(self, pypresence_client):
|
||||
super().__init__()
|
||||
self.shape_list = arcade.SpriteList()
|
||||
self.mouse_shape_list = arcade.SpriteList()
|
||||
|
||||
self.pypresence_client = pypresence_client
|
||||
|
||||
self.occupied = {}
|
||||
self.shapes = []
|
||||
|
||||
self.shape_to_place = random.choice(list(SHAPES.keys()))
|
||||
self.shape_color = random.choice(list(COLORS.values()))
|
||||
|
||||
self.next_shape_to_place = random.choice(list(SHAPES.keys()))
|
||||
self.next_shape_color = random.choice(list(COLORS.values()))
|
||||
|
||||
self.start_x = self.window.width / 2 - (COLS * (CELL_SIZE + OUTLINE_WIDTH)) / 2 + (CELL_SIZE / 2)
|
||||
self.start_y = self.window.height - (ROWS * (CELL_SIZE + OUTLINE_WIDTH)) - (CELL_SIZE / 2)
|
||||
|
||||
self.score = 0
|
||||
|
||||
self.anchor = self.add_widget(arcade.gui.UIAnchorLayout())
|
||||
|
||||
def main_exit(self):
|
||||
from menus.main import Main
|
||||
|
||||
self.window.show_view(Main())
|
||||
|
||||
def on_mouse_motion(self, x, y, dx, dy):
|
||||
super().on_mouse_motion(x, y, dx, dy)
|
||||
self.mouse_shape.update(self.shape_to_place, self.shape_color, x, y)
|
||||
|
||||
def on_show_view(self):
|
||||
super().on_show_view()
|
||||
|
||||
arcade.set_background_color(arcade.color.BLACK)
|
||||
|
||||
self.setup_grid()
|
||||
|
||||
self.mouse_shape = Shape(0, 0, self.shape_to_place, self.shape_color, self.mouse_shape_list)
|
||||
self.next_shape_ui = Shape(self.window.width - (CELL_SIZE * 4), self.window.height - (CELL_SIZE * 4), self.next_shape_to_place, self.next_shape_color, self.shape_list)
|
||||
|
||||
self.score_label = self.anchor.add(arcade.gui.UILabel(text="Score: 0", font_name="Protest Strike", font_size=24), anchor_x="center", anchor_y="top")
|
||||
self.back_to_menu_button = self.anchor.add(arcade.gui.UITextureButton(text="Back to Main Menu", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 3, height=100, style=button_style), anchor_x="center", anchor_y="bottom")
|
||||
self.back_to_menu_button.on_click = lambda event: self.main_exit()
|
||||
|
||||
self.pypresence_client.update(state='In Game', details='Shattering Stacks', start=self.pypresence_client.start_time)
|
||||
|
||||
self.window.set_mouse_visible(False)
|
||||
|
||||
def setup_grid(self):
|
||||
for row in range(ROWS):
|
||||
self.occupied[row] = {}
|
||||
for col in range(COLS):
|
||||
self.occupied[row][col] = 0
|
||||
center_x = self.start_x + col * (CELL_SIZE + OUTLINE_WIDTH)
|
||||
center_y = self.start_y + row * (CELL_SIZE + OUTLINE_WIDTH)
|
||||
|
||||
self.shape_list.append(arcade.SpriteSolidColor(
|
||||
width=CELL_SIZE,
|
||||
height=CELL_SIZE,
|
||||
color=menu_background_color,
|
||||
center_x=center_x,
|
||||
center_y=center_y
|
||||
))
|
||||
|
||||
def check_occupation(self, grid_col, grid_row):
|
||||
can_place = True
|
||||
|
||||
center_x, center_y = 0, 0
|
||||
|
||||
if 0 <= grid_row < ROWS and 0 <= grid_col < COLS:
|
||||
for offset_col, offset_row in SHAPES[self.shape_to_place]:
|
||||
tile_col = grid_col + offset_col
|
||||
tile_row = grid_row + offset_row
|
||||
|
||||
if not (0 <= tile_row < ROWS and 0 <= tile_col < COLS) or self.occupied[tile_row][tile_col]:
|
||||
can_place = False
|
||||
break
|
||||
|
||||
center_x = self.start_x + grid_col * (CELL_SIZE + OUTLINE_WIDTH)
|
||||
center_y = self.start_y + grid_row * (CELL_SIZE + OUTLINE_WIDTH)
|
||||
else:
|
||||
can_place = False
|
||||
|
||||
return can_place, center_x, center_y
|
||||
|
||||
def check_collisions(self):
|
||||
for row_idx, row in self.occupied.items():
|
||||
if all(row.values()):
|
||||
for tile in row.values():
|
||||
self.shape_list.remove(tile)
|
||||
|
||||
for col in range(COLS):
|
||||
self.occupied[row_idx][col] = 0
|
||||
self.score += 10
|
||||
|
||||
for col in range(COLS):
|
||||
column = [row[col] for row in self.occupied.values()]
|
||||
if all(column):
|
||||
for tile in column:
|
||||
self.shape_list.remove(tile)
|
||||
|
||||
for row_idx in range(ROWS):
|
||||
self.occupied[row_idx][col] = 0
|
||||
self.score += 25
|
||||
|
||||
def update_game(self):
|
||||
self.check_collisions()
|
||||
self.score_label.text = f"Score: {self.score}"
|
||||
self.check_game_over()
|
||||
|
||||
def check_game_over(self):
|
||||
for grid_row in range(ROWS):
|
||||
for grid_col in range(COLS):
|
||||
can_place, *_ = self.check_occupation(grid_col, grid_row)
|
||||
if can_place:
|
||||
return
|
||||
|
||||
self.game_over_label = self.anchor.add(arcade.gui.UILabel(text="GAME OVER", font_name="Protest Strike", font_size=64), anchor_x="center", anchor_y="center")
|
||||
|
||||
self.shape_list.clear()
|
||||
self.mouse_shape_list.clear()
|
||||
|
||||
self.window.set_mouse_visible(True)
|
||||
|
||||
def on_key_press(self, symbol: int, modifiers: int) -> bool | None:
|
||||
super().on_key_press(symbol, modifiers)
|
||||
if symbol == arcade.key.ESCAPE:
|
||||
self.main_exit()
|
||||
|
||||
def on_mouse_press(self, x: int, y: int, button: int, modifiers: int) -> bool | None:
|
||||
super().on_mouse_press(x, y, button, modifiers)
|
||||
|
||||
grid_col = math.ceil((x - self.start_x + (CELL_SIZE / 2)) // (CELL_SIZE + OUTLINE_WIDTH))
|
||||
grid_row = math.ceil((y - self.start_y + (CELL_SIZE / 2)) // (CELL_SIZE + OUTLINE_WIDTH))
|
||||
|
||||
can_place, center_x, center_y = self.check_occupation(grid_col, grid_row)
|
||||
|
||||
if can_place:
|
||||
shape = Shape(center_x, center_y, self.shape_to_place, self.shape_color, self.shape_list)
|
||||
self.shapes.append(shape)
|
||||
|
||||
n = 0
|
||||
|
||||
for offset_col, offset_row in SHAPES[self.shape_to_place]:
|
||||
tile_col = grid_col + offset_col
|
||||
tile_row = grid_row + offset_row
|
||||
self.occupied[tile_row][tile_col] = shape.tiles[n]
|
||||
|
||||
n += 1
|
||||
|
||||
self.score += 5
|
||||
|
||||
self.shape_to_place = self.next_shape_to_place
|
||||
self.shape_color = self.next_shape_color
|
||||
|
||||
self.update_game()
|
||||
|
||||
self.next_shape_to_place = random.choice(list(SHAPES.keys()))
|
||||
self.next_shape_color = random.choice(list(COLORS.values()))
|
||||
self.next_shape_ui.update(self.next_shape_to_place, self.next_shape_color)
|
||||
|
||||
def on_draw(self):
|
||||
super().on_draw()
|
||||
self.shape_list.draw()
|
||||
self.mouse_shape_list.draw()
|
||||
50
game/sprites.py
Normal file
50
game/sprites.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import arcade, random
|
||||
from utils.constants import SHAPES, COLORS, CELL_SIZE, OUTLINE_WIDTH
|
||||
|
||||
class Shape():
|
||||
def __init__(self, x, y, shape_type, shape_color, sprite_list: arcade.SpriteList):
|
||||
self.x = x
|
||||
self.y = y
|
||||
self.sprite_list = sprite_list
|
||||
self.shape_type = shape_type
|
||||
self.shape_color = shape_color
|
||||
self.tiles = []
|
||||
|
||||
self.setup_grid()
|
||||
|
||||
def update(self, shape, color, x=None, y=None):
|
||||
if x:
|
||||
self.x = x
|
||||
if y:
|
||||
self.y = y
|
||||
|
||||
self.shape_type = shape
|
||||
self.shape_color = color
|
||||
|
||||
n = 0
|
||||
|
||||
for tile in self.tiles:
|
||||
tile.visible = False
|
||||
|
||||
for offset_col, offset_row in SHAPES[self.shape_type]:
|
||||
x = self.x + (offset_col * (CELL_SIZE + OUTLINE_WIDTH))
|
||||
y = self.y + (offset_row * (CELL_SIZE + OUTLINE_WIDTH))
|
||||
|
||||
if n < len(self.tiles):
|
||||
self.tiles[n].position = x, y, 0
|
||||
self.tiles[n].color = color
|
||||
self.tiles[n].visible = True
|
||||
else:
|
||||
self.tiles.append(arcade.SpriteSolidColor(width=CELL_SIZE, height=CELL_SIZE,
|
||||
color=color, center_x=x, center_y=y))
|
||||
self.sprite_list.append(self.tiles[-1])
|
||||
|
||||
n += 1
|
||||
|
||||
def setup_grid(self):
|
||||
for offset_col, offset_row in SHAPES[self.shape_type]:
|
||||
x = self.x + (offset_col * (CELL_SIZE + OUTLINE_WIDTH))
|
||||
y = self.y + (offset_row * (CELL_SIZE + OUTLINE_WIDTH))
|
||||
self.tiles.append(arcade.SpriteSolidColor(width=CELL_SIZE, height=CELL_SIZE,
|
||||
color=self.shape_color, center_x=x, center_y=y))
|
||||
self.sprite_list.append(self.tiles[-1])
|
||||
49
menus/main.py
Normal file
49
menus/main.py
Normal file
@@ -0,0 +1,49 @@
|
||||
import arcade, arcade.gui, asyncio, pypresence, time
|
||||
from utils.preload import button_texture, button_hovered_texture
|
||||
from utils.constants import button_style
|
||||
from utils.utils import FakePyPresence
|
||||
|
||||
class Main(arcade.gui.UIView):
|
||||
def __init__(self, pypresence_client=None):
|
||||
super().__init__()
|
||||
|
||||
self.anchor = self.add_widget(arcade.gui.UIAnchorLayout())
|
||||
self.box = self.anchor.add(arcade.gui.UIBoxLayout(space_between=10), anchor_x='center', anchor_y='center')
|
||||
|
||||
self.pypresence_client = pypresence_client
|
||||
|
||||
if self.pypresence_client == None: # Game has started
|
||||
try:
|
||||
asyncio.get_event_loop()
|
||||
except:
|
||||
asyncio.set_event_loop(asyncio.new_event_loop())
|
||||
try:
|
||||
self.pypresence_client = pypresence.Presence(1360953272843632680)
|
||||
self.pypresence_client.connect()
|
||||
self.pypresence_client.start_time = time.time()
|
||||
except:
|
||||
self.pypresence_client = FakePyPresence()
|
||||
self.pypresence_client.start_time = time.time()
|
||||
|
||||
elif isinstance(self.pypresence_client, FakePyPresence):
|
||||
# get start time from old object
|
||||
start_time = copy.deepcopy(self.pypresence_client.start_time)
|
||||
try:
|
||||
self.pypresence_client = pypresence.Presence(1360953272843632680)
|
||||
self.pypresence_client.connect()
|
||||
self.pypresence_client.start_time = start_time
|
||||
except:
|
||||
self.pypresence_client = FakePyPresence()
|
||||
self.pypresence_client.start_time = start_time
|
||||
|
||||
self.pypresence_client.update(state='In Menu', details='In Main Menu', start=self.pypresence_client.start_time)
|
||||
|
||||
def on_show_view(self):
|
||||
super().on_show_view()
|
||||
|
||||
self.play_button = self.box.add(arcade.gui.UITextureButton(text="Play", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=150, style=button_style))
|
||||
self.play_button.on_click = lambda event: self.play()
|
||||
|
||||
def play(self):
|
||||
from game.play import Game
|
||||
self.window.show_view(Game(self.pypresence_client))
|
||||
10
pyproject.toml
Normal file
10
pyproject.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[project]
|
||||
name = "ShatterStack"
|
||||
version = "0.1.0"
|
||||
description = "A game where you have to place shapes in lines to get points!"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = ["arcade", "pillow>=11.0.0", "pypresence>=4.3.0"]
|
||||
|
||||
[tool.uv.sources]
|
||||
arcade = { git = "https://github.com/pythonarcade/arcade.git", rev = "gui/controller" }
|
||||
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Pillow
|
||||
git+https://github.com/pythonarcade/arcade.git@gui/controller
|
||||
pypresence
|
||||
83
run.py
Normal file
83
run.py
Normal file
@@ -0,0 +1,83 @@
|
||||
import pyglet
|
||||
|
||||
pyglet.options.debug_gl = False
|
||||
|
||||
import logging, datetime, os, json, sys, arcade
|
||||
|
||||
from utils.utils import get_closest_resolution, print_debug_info, on_exception
|
||||
from utils.constants import log_dir, menu_background_color
|
||||
from menus.main import Main
|
||||
import utils.preload # type: ignore
|
||||
from arcade.experimental.controller_window import ControllerWindow
|
||||
|
||||
sys.excepthook = on_exception
|
||||
|
||||
pyglet.resource.path.append(os.getcwd())
|
||||
pyglet.font.add_directory('./assets/fonts')
|
||||
|
||||
__builtins__.print = lambda *args, **kwargs: logging.debug(" ".join(map(str, args)))
|
||||
|
||||
if not log_dir in os.listdir():
|
||||
os.makedirs(log_dir)
|
||||
|
||||
while len(os.listdir(log_dir)) >= 5:
|
||||
files = [(file, os.path.getctime(os.path.join(log_dir, file))) for file in os.listdir(log_dir)]
|
||||
oldest_file = sorted(files, key=lambda x: x[1])[0][0]
|
||||
os.remove(os.path.join(log_dir, oldest_file))
|
||||
|
||||
timestamp = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
||||
log_filename = f"debug_{timestamp}.log"
|
||||
logging.basicConfig(filename=f'{os.path.join(log_dir, log_filename)}', format='%(asctime)s %(name)s %(levelname)s: %(message)s', level=logging.DEBUG)
|
||||
|
||||
for logger_name_to_disable in ['arcade']:
|
||||
logging.getLogger(logger_name_to_disable).propagate = False
|
||||
logging.getLogger(logger_name_to_disable).disabled = True
|
||||
|
||||
if os.path.exists('settings.json'):
|
||||
with open('settings.json', 'r') as settings_file:
|
||||
settings = json.load(settings_file)
|
||||
|
||||
resolution = list(map(int, settings['resolution'].split('x')))
|
||||
|
||||
if not settings.get("anti_aliasing", "4x MSAA") == "None":
|
||||
antialiasing = int(settings.get("anti_aliasing", "4x MSAA").split('x')[0])
|
||||
else:
|
||||
antialiasing = 0
|
||||
|
||||
fullscreen = settings['window_mode'] == 'fullscreen'
|
||||
style = arcade.Window.WINDOW_STYLE_BORDERLESS if settings['window_mode'] == 'borderless' else arcade.Window.WINDOW_STYLE_DEFAULT
|
||||
vsync = settings['vsync']
|
||||
fps_limit = settings['fps_limit']
|
||||
else:
|
||||
resolution = get_closest_resolution()
|
||||
antialiasing = 4
|
||||
fullscreen = False
|
||||
style = arcade.Window.WINDOW_STYLE_DEFAULT
|
||||
vsync = True
|
||||
fps_limit = 0
|
||||
|
||||
window = ControllerWindow(width=resolution[0], height=resolution[1], title='ShatterStack', samples=antialiasing, antialiasing=antialiasing > 0, fullscreen=fullscreen, vsync=vsync, resizable=False, style=style)
|
||||
|
||||
if vsync:
|
||||
window.set_vsync(True)
|
||||
display_mode = window.display.get_default_screen().get_mode()
|
||||
refresh_rate = display_mode.rate
|
||||
window.set_update_rate(1 / refresh_rate)
|
||||
window.set_draw_rate(1 / refresh_rate)
|
||||
elif not fps_limit == 0:
|
||||
window.set_update_rate(1 / fps_limit)
|
||||
window.set_draw_rate(1 / fps_limit)
|
||||
else:
|
||||
window.set_update_rate(1 / 99999999)
|
||||
window.set_draw_rate(1 / 99999999)
|
||||
|
||||
print_debug_info()
|
||||
main = Main()
|
||||
|
||||
window.show_view(main)
|
||||
|
||||
logging.debug('Game started.')
|
||||
|
||||
arcade.run()
|
||||
|
||||
logging.info('Exited with error code 0.')
|
||||
50
utils/constants.py
Normal file
50
utils/constants.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import arcade.color
|
||||
from arcade.types import Color
|
||||
from arcade.gui.widgets.buttons import UITextureButtonStyle
|
||||
|
||||
menu_background_color = Color(28, 28, 28)
|
||||
log_dir = 'logs'
|
||||
CELL_SIZE = 48
|
||||
ROWS = 14
|
||||
COLS = 14
|
||||
OUTLINE_WIDTH = 2
|
||||
|
||||
button_style = {'normal': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK), 'hover': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK),
|
||||
'press': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK), 'disabled': UITextureButtonStyle(font_name="Protest Strike", font_color=arcade.color.BLACK)}
|
||||
|
||||
SHAPES = {
|
||||
"I": [(0, 0), (1, 0), (2, 0), (3, 0)],
|
||||
"I_R1": [(0, 0), (0, 1), (0, 2), (0, 3)],
|
||||
"O": [(0, 0), (1, 0), (0, 1), (1, 1)],
|
||||
"T": [(0, 0), (1, 0), (2, 0), (1, 1)],
|
||||
"T_R1": [(1, 0), (1, 1), (1, 2), (0, 1)],
|
||||
"T_R2": [(0, 1), (1, 1), (2, 1), (1, 0)],
|
||||
"T_R3": [(0, 0), (0, 1), (0, 2), (1, 1)],
|
||||
"L": [(0, 0), (0, 1), (0, 2), (1, 2)],
|
||||
"L_R1": [(0, 1), (1, 1), (2, 1), (2, 0)],
|
||||
"L_R2": [(1, 0), (1, 1), (1, 2), (0, 0)],
|
||||
"L_R3": [(0, 0), (1, 0), (2, 0), (0, 1)],
|
||||
"J": [(1, 0), (1, 1), (1, 2), (0, 2)],
|
||||
"J_R1": [(0, 0), (0, 1), (1, 1), (2, 1)],
|
||||
"J_R2": [(0, 0), (1, 0), (0, 1), (0, 2)],
|
||||
"J_R3": [(0, 0), (1, 0), (2, 0), (2, 1)],
|
||||
"S": [(1, 0), (2, 0), (0, 1), (1, 1)],
|
||||
"S_R1": [(0, 0), (0, 1), (1, 1), (1, 2)],
|
||||
"Z": [(0, 0), (1, 0), (1, 1), (2, 1)],
|
||||
"Z_R1": [(1, 0), (0, 1), (1, 1), (0, 2)],
|
||||
"BLOB": [
|
||||
(0, 0), (1, 0), (2, 0),
|
||||
(0, 1), (1, 1), (2, 1),
|
||||
(0, 2), (1, 2), (2, 2)
|
||||
],
|
||||
}
|
||||
|
||||
COLORS = {
|
||||
"red": (255, 90, 90, 255),
|
||||
"blue": (100, 180, 255, 255),
|
||||
"green": (100, 255, 160, 255),
|
||||
"yellow": (255, 230, 100, 255),
|
||||
"purple": (200, 100, 255, 255),
|
||||
"orange": (255, 160, 90, 255),
|
||||
"teal": (100, 255, 255, 255),
|
||||
}
|
||||
4
utils/preload.py
Normal file
4
utils/preload.py
Normal file
@@ -0,0 +1,4 @@
|
||||
import arcade.gui, arcade
|
||||
|
||||
button_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button.png"))
|
||||
button_hovered_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button_hovered.png"))
|
||||
90
utils/utils.py
Normal file
90
utils/utils.py
Normal file
@@ -0,0 +1,90 @@
|
||||
import logging, arcade, arcade.gui, sys, traceback
|
||||
|
||||
from utils.constants import menu_background_color
|
||||
|
||||
import pyglet.info, pyglet.event
|
||||
|
||||
def dump_platform():
|
||||
import platform
|
||||
logging.debug(f'Platform: {platform.platform()}')
|
||||
logging.debug(f'Release: {platform.release()}')
|
||||
logging.debug(f'Machine: {platform.machine()}')
|
||||
logging.debug(f'Architecture: {platform.architecture()}')
|
||||
|
||||
def dump_gl(context=None):
|
||||
if context is not None:
|
||||
info = context.get_info()
|
||||
else:
|
||||
from pyglet.gl import gl_info as info
|
||||
logging.debug(f'gl_info.get_version(): {info.get_version()}')
|
||||
logging.debug(f'gl_info.get_vendor(): {info.get_vendor()}')
|
||||
logging.debug(f'gl_info.get_renderer(): {info.get_renderer()}')
|
||||
|
||||
def print_debug_info():
|
||||
logging.debug('########################## DEBUG INFO ##########################')
|
||||
logging.debug('')
|
||||
dump_platform()
|
||||
dump_gl()
|
||||
logging.debug('')
|
||||
logging.debug(f'Number of screens: {len(pyglet.display.get_display().get_screens())}')
|
||||
logging.debug('')
|
||||
for n, screen in enumerate(pyglet.display.get_display().get_screens()):
|
||||
logging.debug(f"Screen #{n+1}:")
|
||||
logging.debug(f'DPI: {screen.get_dpi()}')
|
||||
logging.debug(f'Scale: {screen.get_scale()}')
|
||||
logging.debug(f'Size: {screen.width}, {screen.height}')
|
||||
logging.debug(f'Position: {screen.x}, {screen.y}')
|
||||
logging.debug('')
|
||||
logging.debug('########################## DEBUG INFO ##########################')
|
||||
logging.debug('')
|
||||
|
||||
class ErrorView(arcade.gui.UIView):
|
||||
def __init__(self, message, title):
|
||||
super().__init__()
|
||||
|
||||
self.message = message
|
||||
self.title = title
|
||||
|
||||
def exit(self):
|
||||
logging.fatal('Exited with error code 1.')
|
||||
sys.exit(1)
|
||||
|
||||
def on_show_view(self):
|
||||
super().on_show_view()
|
||||
|
||||
self.window.set_caption('ShatterStack - Error')
|
||||
self.window.set_mouse_visible(True)
|
||||
self.window.set_exclusive_mouse(False)
|
||||
arcade.set_background_color(menu_background_color)
|
||||
|
||||
msgbox = arcade.gui.UIMessageBox(width=self.window.width / 2, height=self.window.height / 2, message_text=self.message, title=self.title)
|
||||
msgbox.on_action = lambda _: self.exit()
|
||||
self.add_widget(msgbox)
|
||||
|
||||
def on_exception(*exc_info):
|
||||
logging.error(f"Unhandled exception:\n{''.join(traceback.format_exception(exc_info[1], limit=None))}")
|
||||
|
||||
def get_closest_resolution():
|
||||
allowed_resolutions = [(800, 600), (1024, 768), (1280, 720), (1366, 768), (1440, 900), (1600,900), (1920,1080), (2560,1440), (3840,2160)]
|
||||
screen_width, screen_height = arcade.get_screens()[0].width, arcade.get_screens()[0].height
|
||||
if (screen_width, screen_height) in allowed_resolutions:
|
||||
if not allowed_resolutions.index((screen_width, screen_height)) == 0:
|
||||
closest_resolution = allowed_resolutions[allowed_resolutions.index((screen_width, screen_height))-1]
|
||||
else:
|
||||
closest_resolution = (screen_width, screen_height)
|
||||
else:
|
||||
target_width, target_height = screen_width // 2, screen_height // 2
|
||||
|
||||
closest_resolution = min(
|
||||
allowed_resolutions,
|
||||
key=lambda res: abs(res[0] - target_width) + abs(res[1] - target_height)
|
||||
)
|
||||
return closest_resolution
|
||||
|
||||
class FakePyPresence():
|
||||
def __init__(self):
|
||||
...
|
||||
def update(self, *args, **kwargs):
|
||||
...
|
||||
def close(self, *args, **kwargs):
|
||||
...
|
||||
157
uv.lock
generated
Normal file
157
uv.lock
generated
Normal file
@@ -0,0 +1,157 @@
|
||||
version = 1
|
||||
revision = 1
|
||||
requires-python = ">=3.13"
|
||||
|
||||
[[package]]
|
||||
name = "arcade"
|
||||
version = "3.1.0"
|
||||
source = { git = "https://github.com/pythonarcade/arcade.git?rev=gui%2Fcontroller#2e455be7a75170192a74549517cbdc9bd988780d" }
|
||||
dependencies = [
|
||||
{ name = "pillow" },
|
||||
{ name = "pyglet" },
|
||||
{ name = "pymunk" },
|
||||
{ name = "pytiled-parser" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "attrs"
|
||||
version = "25.3.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b", size = 812032 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cffi"
|
||||
version = "1.17.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "pycparser" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824", size = 516621 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8d/f8/dd6c246b148639254dad4d6803eb6a54e8c85c6e11ec9df2cffa87571dbe/cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e", size = 182989 },
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/f1/672d303ddf17c24fc83afd712316fda78dc6fce1cd53011b839483e1ecc8/cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2", size = 178802 },
|
||||
{ url = "https://files.pythonhosted.org/packages/0e/2d/eab2e858a91fdff70533cab61dcff4a1f55ec60425832ddfdc9cd36bc8af/cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3", size = 454792 },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/b2/fbaec7c4455c604e29388d55599b99ebcc250a60050610fadde58932b7ee/cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683", size = 478893 },
|
||||
{ url = "https://files.pythonhosted.org/packages/4f/b7/6e4a2162178bf1935c336d4da8a9352cccab4d3a5d7914065490f08c0690/cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5", size = 485810 },
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/8a/1d0e4a9c26e54746dc08c2c6c037889124d4f59dffd853a659fa545f1b40/cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4", size = 471200 },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/9f/1aab65a6c0db35f43c4d1b4f580e8df53914310afc10ae0397d29d697af4/cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd", size = 479447 },
|
||||
{ url = "https://files.pythonhosted.org/packages/5f/e4/fb8b3dd8dc0e98edf1135ff067ae070bb32ef9d509d6cb0f538cd6f7483f/cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed", size = 484358 },
|
||||
{ url = "https://files.pythonhosted.org/packages/f1/47/d7145bf2dc04684935d57d67dff9d6d795b2ba2796806bb109864be3a151/cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9", size = 488469 },
|
||||
{ url = "https://files.pythonhosted.org/packages/bf/ee/f94057fa6426481d663b88637a9a10e859e492c73d0384514a17d78ee205/cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d", size = 172475 },
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a", size = 182009 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pillow"
|
||||
version = "11.0.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a5/26/0d95c04c868f6bdb0c447e3ee2de5564411845e36a858cfd63766bc7b563/pillow-11.0.0.tar.gz", hash = "sha256:72bacbaf24ac003fea9bff9837d1eedb6088758d41e100c1552930151f677739", size = 46737780 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/63/24/e2e15e392d00fcf4215907465d8ec2a2f23bcec1481a8ebe4ae760459995/pillow-11.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bcd1fb5bb7b07f64c15618c89efcc2cfa3e95f0e3bcdbaf4642509de1942a699", size = 3147300 },
|
||||
{ url = "https://files.pythonhosted.org/packages/43/72/92ad4afaa2afc233dc44184adff289c2e77e8cd916b3ddb72ac69495bda3/pillow-11.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0e038b0745997c7dcaae350d35859c9715c71e92ffb7e0f4a8e8a16732150f38", size = 2978742 },
|
||||
{ url = "https://files.pythonhosted.org/packages/9e/da/c8d69c5bc85d72a8523fe862f05ababdc52c0a755cfe3d362656bb86552b/pillow-11.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ae08bd8ffc41aebf578c2af2f9d8749d91f448b3bfd41d7d9ff573d74f2a6b2", size = 4194349 },
|
||||
{ url = "https://files.pythonhosted.org/packages/cd/e8/686d0caeed6b998351d57796496a70185376ed9c8ec7d99e1d19ad591fc6/pillow-11.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d69bfd8ec3219ae71bcde1f942b728903cad25fafe3100ba2258b973bd2bc1b2", size = 4298714 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ec/da/430015cec620d622f06854be67fd2f6721f52fc17fca8ac34b32e2d60739/pillow-11.0.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:61b887f9ddba63ddf62fd02a3ba7add935d053b6dd7d58998c630e6dbade8527", size = 4208514 },
|
||||
{ url = "https://files.pythonhosted.org/packages/44/ae/7e4f6662a9b1cb5f92b9cc9cab8321c381ffbee309210940e57432a4063a/pillow-11.0.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:c6a660307ca9d4867caa8d9ca2c2658ab685de83792d1876274991adec7b93fa", size = 4380055 },
|
||||
{ url = "https://files.pythonhosted.org/packages/74/d5/1a807779ac8a0eeed57f2b92a3c32ea1b696e6140c15bd42eaf908a261cd/pillow-11.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:73e3a0200cdda995c7e43dd47436c1548f87a30bb27fb871f352a22ab8dcf45f", size = 4296751 },
|
||||
{ url = "https://files.pythonhosted.org/packages/38/8c/5fa3385163ee7080bc13026d59656267daaaaf3c728c233d530e2c2757c8/pillow-11.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fba162b8872d30fea8c52b258a542c5dfd7b235fb5cb352240c8d63b414013eb", size = 4430378 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ca/1d/ad9c14811133977ff87035bf426875b93097fb50af747793f013979facdb/pillow-11.0.0-cp313-cp313-win32.whl", hash = "sha256:f1b82c27e89fffc6da125d5eb0ca6e68017faf5efc078128cfaa42cf5cb38798", size = 2249588 },
|
||||
{ url = "https://files.pythonhosted.org/packages/fb/01/3755ba287dac715e6afdb333cb1f6d69740a7475220b4637b5ce3d78cec2/pillow-11.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:8ba470552b48e5835f1d23ecb936bb7f71d206f9dfeee64245f30c3270b994de", size = 2567509 },
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/98/2c7d727079b6be1aba82d195767d35fcc2d32204c7a5820f822df5330152/pillow-11.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:846e193e103b41e984ac921b335df59195356ce3f71dcfd155aa79c603873b84", size = 2254791 },
|
||||
{ url = "https://files.pythonhosted.org/packages/eb/38/998b04cc6f474e78b563716b20eecf42a2fa16a84589d23c8898e64b0ffd/pillow-11.0.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4ad70c4214f67d7466bea6a08061eba35c01b1b89eaa098040a35272a8efb22b", size = 3150854 },
|
||||
{ url = "https://files.pythonhosted.org/packages/13/8e/be23a96292113c6cb26b2aa3c8b3681ec62b44ed5c2bd0b258bd59503d3c/pillow-11.0.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:6ec0d5af64f2e3d64a165f490d96368bb5dea8b8f9ad04487f9ab60dc4bb6003", size = 2982369 },
|
||||
{ url = "https://files.pythonhosted.org/packages/97/8a/3db4eaabb7a2ae8203cd3a332a005e4aba00067fc514aaaf3e9721be31f1/pillow-11.0.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c809a70e43c7977c4a42aefd62f0131823ebf7dd73556fa5d5950f5b354087e2", size = 4333703 },
|
||||
{ url = "https://files.pythonhosted.org/packages/28/ac/629ffc84ff67b9228fe87a97272ab125bbd4dc462745f35f192d37b822f1/pillow-11.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:4b60c9520f7207aaf2e1d94de026682fc227806c6e1f55bba7606d1c94dd623a", size = 4412550 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d6/07/a505921d36bb2df6868806eaf56ef58699c16c388e378b0dcdb6e5b2fb36/pillow-11.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:1e2688958a840c822279fda0086fec1fdab2f95bf2b717b66871c4ad9859d7e8", size = 4461038 },
|
||||
{ url = "https://files.pythonhosted.org/packages/d6/b9/fb620dd47fc7cc9678af8f8bd8c772034ca4977237049287e99dda360b66/pillow-11.0.0-cp313-cp313t-win32.whl", hash = "sha256:607bbe123c74e272e381a8d1957083a9463401f7bd01287f50521ecb05a313f8", size = 2253197 },
|
||||
{ url = "https://files.pythonhosted.org/packages/df/86/25dde85c06c89d7fc5db17940f07aae0a56ac69aa9ccb5eb0f09798862a8/pillow-11.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5c39ed17edea3bc69c743a8dd3e9853b7509625c2462532e62baa0732163a904", size = 2572169 },
|
||||
{ url = "https://files.pythonhosted.org/packages/51/85/9c33f2517add612e17f3381aee7c4072779130c634921a756c97bc29fb49/pillow-11.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:75acbbeb05b86bc53cbe7b7e6fe00fbcf82ad7c684b3ad82e3d711da9ba287d3", size = 2256828 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pycparser"
|
||||
version = "2.22"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", size = 172736 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc", size = 117552 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyglet"
|
||||
version = "2.1.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/08/90/7f8a8d939dbf8f6875b957540cc3091e936e41c4ac8f190a9517589678f8/pyglet-2.1.3.tar.gz", hash = "sha256:9a2c3c84228402ea7103443ac8a52060cc1c91419951ec1105845ce30fed2ce8", size = 6515859 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/83/d6/41208b6741e732a7faf160e89346a17e81b14899bd7ae90058da858083d6/pyglet-2.1.3-py3-none-any.whl", hash = "sha256:5a7eaf35869ecf7451fb49cc064c4c0e9a118eaa5e771667c607125b13f85e33", size = 962091 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pymunk"
|
||||
version = "6.9.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cffi" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ac/08/1513c868bc2a6bfa22d47acded27f5525c1db10bf1db4fdfa39160991616/pymunk-6.9.0.tar.gz", hash = "sha256:765f7c561a859a1b565bc517a47cc3992d6258e860f9174c533033c218af63c3", size = 3104088 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b6/5a/c76904d21f3fdb0b713b3a8056622733a0b773f7e55ef974fa4546068cbd/pymunk-6.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5c59e5cf904e148dd0d35cffb7bafe146835042de9280672cafecc3a41caf7a3", size = 364703 },
|
||||
{ url = "https://files.pythonhosted.org/packages/63/b2/378d54b79812da5312b10de272c27aa0ac621498e059aa50eb4eec33ab52/pymunk-6.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4cbc2d37f69d85fedc1097af64edc8f4c43973a13429d51004883cbb9342875e", size = 347058 },
|
||||
{ url = "https://files.pythonhosted.org/packages/ba/a8/c7ea141a1d0e3f5b08ad653f0b5a4ebc0e5854f92bc7049a2a921fbe0d65/pymunk-6.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd64ef76e9e47fda929a2961fe98759ac46b5a7b6126d1ba3e6f04493da6519b", size = 1070851 },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/a2/f40bcc9be90c2af1fe8cf4ba4281385b48d9f5667f03f6834c49aba600fd/pymunk-6.9.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c568c7402acd5d9a55e3965565ae0a596e4603ba8a7b7b7f0952efadd0e69524", size = 990371 },
|
||||
{ url = "https://files.pythonhosted.org/packages/01/ae/ff7fdf1c8d32ba89d1ccada39b5f7ed66e35420b8d31bdc9af6d5d20ea2f/pymunk-6.9.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f6cbe3d06e468be11a615d4facecc4a870bf58c1a27c365e655b5a85685ec942", size = 976294 },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/90/64ef000011f0c930b42354f0d91a07b4bc7f70819ec5b6034b84198bf53f/pymunk-6.9.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:65a9a93a51dbaf1c77efa4d2425549888a1eda9f5c9cd9a5a89b7ca66310968a", size = 1042493 },
|
||||
{ url = "https://files.pythonhosted.org/packages/e5/fb/6516bd5fe565ea51a88308869632dfc896ca6b05b2579b016ffa8047a8ec/pymunk-6.9.0-cp313-cp313-win32.whl", hash = "sha256:a78b37bb360e715657c76caedaf40cdaaf6dab354d497eda481a976cc5cab3d7", size = 315341 },
|
||||
{ url = "https://files.pythonhosted.org/packages/e0/7c/1542df7ffbff70a4523ccb02c9241c9fe4dc24c77b747e2c16fb94891156/pymunk-6.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:d6419e1531df80ff0bb6f1f8215e044f57415514386b7b212dc148919ca629ed", size = 366673 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pypresence"
|
||||
version = "4.3.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f4/2e/d110f862720b5e3ba1b0b719657385fc4151929befa2c6981f48360aa480/pypresence-4.3.0.tar.gz", hash = "sha256:a6191a3af33a9667f2a4ef0185577c86b962ee70aa82643c472768a6fed1fbf3", size = 10696 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/1e/40/1d30b30e18f81eb71365681223971a9822a89b3d6ee5269dd2aa955bc228/pypresence-4.3.0-py2.py3-none-any.whl", hash = "sha256:af878c6d49315084f1b108aec86b31915080614d9421d6dd3a44737aba9ff13f", size = 11778 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pytiled-parser"
|
||||
version = "2.2.9"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "attrs" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/79/62/0d8a2220ee0747522f3b73e4f38bea7c78aefdf707afb86decf26f799fc5/pytiled_parser-2.2.9.tar.gz", hash = "sha256:225269fdd37afcbcd3b76ea3e2cab6b1e742387027106055990db43fd7451ebd", size = 45958 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/f7/6b6c51b50ed8681a31146e5e7ac325b78fe776ff48b1ec8f56d7e4995d72/pytiled_parser-2.2.9-py2.py3-none-any.whl", hash = "sha256:37f73d31950bf4d02ee3bda59f3d6123c55194dc8d8e876821dd2080af5f1f91", size = 44452 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shatterstack"
|
||||
version = "0.1.0"
|
||||
source = { virtual = "." }
|
||||
dependencies = [
|
||||
{ name = "arcade" },
|
||||
{ name = "pillow" },
|
||||
{ name = "pypresence" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "arcade", git = "https://github.com/pythonarcade/arcade.git?rev=gui%2Fcontroller" },
|
||||
{ name = "pillow", specifier = ">=11.0.0" },
|
||||
{ name = "pypresence", specifier = ">=4.3.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typing-extensions"
|
||||
version = "4.13.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef", size = 106967 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", size = 45806 },
|
||||
]
|
||||
Reference in New Issue
Block a user