Initial Commit
137
.gitignore
vendored
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/python,visualstudiocode
|
||||||
|
# Edit at https://www.gitignore.io/?templates=python,visualstudiocode
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# 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/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
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
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# 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/
|
||||||
|
|
||||||
|
### Python Patch ###
|
||||||
|
.venv/
|
||||||
|
|
||||||
|
### VisualStudioCode ###
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
### VisualStudioCode Patch ###
|
||||||
|
# Ignore all local history of files
|
||||||
|
.history
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/python,visualstudiocode
|
||||||
33
color.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Colors
|
||||||
|
# Level
|
||||||
|
LEVEL_1 = '#22272D'
|
||||||
|
LEVEL_2 = '#292E36'
|
||||||
|
LEVEL_3 = '#2D333C'
|
||||||
|
LEVEL_4 = '#30353F'
|
||||||
|
LEVEL_5 = '#383F4B'
|
||||||
|
LEVEL_6 = '#404855'
|
||||||
|
LEVEL_7 = '#464F5E'
|
||||||
|
LEVEL_8 = '#5B6478'
|
||||||
|
LEVEL_9 = '#AAB2C3'
|
||||||
|
|
||||||
|
# Tint
|
||||||
|
DARK_GRAY = '#888888'
|
||||||
|
GHOST = '#F8F8F0'
|
||||||
|
LIGHT_GHOST = '#F5F5F5'
|
||||||
|
LIGHT_GRAY = '#CCCCCC'
|
||||||
|
SEA_GREEN = '#529B2F'
|
||||||
|
|
||||||
|
# Hue
|
||||||
|
BLUE = '#66D9EF'
|
||||||
|
BROWN = '#E6B362'
|
||||||
|
GREEN = '#A3E076'
|
||||||
|
ORANGE = '#FD971F'
|
||||||
|
PINK = '#FB6060'
|
||||||
|
PURPLE = '#B287FF'
|
||||||
|
YELLOW = '#FFD569'
|
||||||
|
|
||||||
|
# Other
|
||||||
|
TRANSPARENT = '#010101'
|
||||||
|
DARK_BLUE = '#108498'
|
||||||
|
DARK_BROWN = '#49483E'
|
||||||
|
DARK_ORANGE = '#C86F02'
|
||||||
9
game/fall.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from tkinter import *
|
||||||
|
|
||||||
|
# Main
|
||||||
|
def main(canvas: Canvas):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
def loop(deltatime: float):
|
||||||
|
pass
|
||||||
9
game/osu.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import tkinter as tk
|
||||||
|
|
||||||
|
# Main
|
||||||
|
def main(canvas: tk.Canvas):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
def loop(deltatime: float):
|
||||||
|
pass
|
||||||
9
game/pong.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from tkinter import *
|
||||||
|
|
||||||
|
# Main
|
||||||
|
def main(canvas: Canvas):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
def loop(deltatime: float):
|
||||||
|
pass
|
||||||
9
game/space.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from tkinter import *
|
||||||
|
|
||||||
|
# Main
|
||||||
|
def main(canvas: Canvas):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
def loop(deltatime: float):
|
||||||
|
pass
|
||||||
73
main.py
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import tkinter as tk
|
||||||
|
import datetime as dt
|
||||||
|
import color
|
||||||
|
from time import sleep
|
||||||
|
from game import fall, osu, pong, space
|
||||||
|
from PIL import Image, ImageTk
|
||||||
|
|
||||||
|
win = tk.Tk()
|
||||||
|
win['bg'] = color.LEVEL_9
|
||||||
|
win.title('QuadraLudi')
|
||||||
|
win.geometry('806x606')
|
||||||
|
win.resizable(False, False)
|
||||||
|
win.wm_attributes('-transparentcolor', color.TRANSPARENT)
|
||||||
|
|
||||||
|
# Res
|
||||||
|
image_center = ImageTk.PhotoImage(Image.open('res/logo/main.png'))
|
||||||
|
|
||||||
|
# Time
|
||||||
|
time = None
|
||||||
|
delta = None
|
||||||
|
iter = 0
|
||||||
|
|
||||||
|
def loop(deltaTime):
|
||||||
|
global time, delta, iter
|
||||||
|
|
||||||
|
# Start
|
||||||
|
delta = dt.datetime.now()
|
||||||
|
deltatime = (delta - time).microseconds * 1e-6
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
if iter > 2:
|
||||||
|
fall.loop(deltatime)
|
||||||
|
osu.loop(deltatime)
|
||||||
|
pong.loop(deltatime)
|
||||||
|
space.loop(deltatime)
|
||||||
|
else:
|
||||||
|
iter += 1
|
||||||
|
|
||||||
|
# End
|
||||||
|
time = delta
|
||||||
|
win.after(int(1000 / 60), lambda: loop(deltaTime))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
global time, delta
|
||||||
|
|
||||||
|
# Create Canvas
|
||||||
|
canvas_osu = tk.Canvas(win, width = 400, height = 300, bd = 0, highlightthickness = 0, relief = 'ridge', bg = color.LEVEL_1)
|
||||||
|
canvas_osu.place(x = 2, y = 2)
|
||||||
|
canvas_pong = tk.Canvas(win, width = 400, height = 300, bd = 0, highlightthickness = 0, relief = 'ridge', bg = color.LEVEL_1)
|
||||||
|
canvas_pong.place(x = 404, y = 2)
|
||||||
|
canvas_space = tk.Canvas(win, width = 400, height = 300, bd = 0, highlightthickness = 0, relief = 'ridge', bg = color.LEVEL_1)
|
||||||
|
canvas_space.place(x = 2, y = 304)
|
||||||
|
canvas_fall = tk.Canvas(win, width = 400, height = 300, bd = 0, highlightthickness = 0, relief = 'ridge', bg = color.LEVEL_1)
|
||||||
|
canvas_fall.place(x = 404, y = 304)
|
||||||
|
|
||||||
|
# Logo
|
||||||
|
win.iconbitmap('res/logo/main.ico')
|
||||||
|
tk.Label(win, image = image_center, bg = color.LEVEL_1).place(x = 401 - 32, y = 301 - 32)
|
||||||
|
|
||||||
|
# Ini
|
||||||
|
fall.main(canvas_fall)
|
||||||
|
osu.main(canvas_osu)
|
||||||
|
pong.main(canvas_pong)
|
||||||
|
space.main(canvas_space)
|
||||||
|
|
||||||
|
# Loop
|
||||||
|
delta = dt.datetime.now()
|
||||||
|
time = dt.datetime.now()
|
||||||
|
loop(1000 / 60)
|
||||||
|
|
||||||
|
print('Bienvenue dans le jeu QuadraLudi')
|
||||||
|
main()
|
||||||
|
win.mainloop()
|
||||||
1376
res/logo/Logo.ai
Normal file
BIN
res/logo/Logo.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
res/logo/Logo_Dark_Cast/res/mipmap-hdpi/Logo_Dark_Cast.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
res/logo/Logo_Dark_Cast/res/mipmap-mdpi/Logo_Dark_Cast.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
res/logo/Logo_Dark_Cast/res/mipmap-xhdpi/Logo_Dark_Cast.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
res/logo/Logo_Dark_Cast/res/mipmap-xxhdpi/Logo_Dark_Cast.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
res/logo/Logo_Dark_Cast/res/mipmap-xxxhdpi/Logo_Dark_Cast.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
res/logo/Logo_Dark_Cast/web_hi_res_512.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
res/logo/Logo_Dark_Elevate/res/mipmap-hdpi/Logo_Dark_Elevate.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
res/logo/Logo_Dark_Elevate/res/mipmap-mdpi/Logo_Dark_Elevate.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 27 KiB |
BIN
res/logo/Logo_Dark_Elevate/web_hi_res_512.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
res/logo/Logo_Light_Cast/res/mipmap-hdpi/Logo_Light_Cast.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
res/logo/Logo_Light_Cast/res/mipmap-mdpi/Logo_Light_Cast.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
res/logo/Logo_Light_Cast/res/mipmap-xhdpi/Logo_Light_Cast.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
res/logo/Logo_Light_Cast/res/mipmap-xxhdpi/Logo_Light_Cast.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
res/logo/Logo_Light_Cast/res/mipmap-xxxhdpi/Logo_Light_Cast.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
res/logo/Logo_Light_Cast/web_hi_res_512.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 28 KiB |
BIN
res/logo/Logo_Light_Elevate/web_hi_res_512.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
res/logo/main.ico
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
res/logo/main.png
Normal file
|
After Width: | Height: | Size: 11 KiB |