diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/jorcademy-template.iml b/.idea/jorcademy-template.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/jorcademy-template.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f0e7683 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..9652b9b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..93acfa0 --- /dev/null +++ b/Pipfile @@ -0,0 +1,13 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +pygame = "*" + +[dev-packages] + +[requires] +python_version = "3.11" +python_full_version = "3.11.3" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..e36a24c --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,96 @@ +{ + "_meta": { + "hash": { + "sha256": "398f7f35f9edb7cc3e48a1159aae6b515670d5d69eb5af9b71ef95e82112a287" + }, + "pipfile-spec": 6, + "requires": { + "python_full_version": "3.11.3", + "python_version": "3.11" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "pygame": { + "hashes": [ + "sha256:00ecd4688ee25d5d4cf48eddab18749a9bb2b382772f7fa8a987e4d21026c603", + "sha256:075c1282b1d307669c8ef29942564b91acb85623bedba3bfb841079d539ded31", + "sha256:13511c7c29f0fc23636f3b95a96ab45f964e84073e7e27dc602a479cd274d89a", + "sha256:1422673a2b485153cbc20dbbd37af791c9842ca98a1b7a89fe3ac115cce79805", + "sha256:14492d8c0eaad778bb10b6d53eaea4ef77f4d3431b6b7c857397dc6cf4397ac9", + "sha256:1b7201a44869eb420dd56c8e003251c9e7422c5304b3e78508e767a5634ab31b", + "sha256:23543e2d206d8de7d6db4f7b1c74e6fea6c01ead63caf7252e63341e1cdb09f6", + "sha256:2946c151691c80ffb9f3f39e1f294d7ed9edaae1814e528d2f5b4751e7e6d903", + "sha256:32ed4d4317bce8fe78592a7b5b4a07f2e0ff814e35c66cb5a3b398dae96c3f27", + "sha256:3ab14e06c302921f33d25180813711a920acef386d3992fc21731d2d5e8e86f0", + "sha256:418659c2d42f6a2356e2691006d79b6e07fd4992f9e904a2638c51c992f3e41b", + "sha256:43db3a6c9be3d94eececf7c86cde7584d2bb87f394ade40139c3b4e528fdff24", + "sha256:47be83060a9dbc79763fd230f04d53a29064b5f64d1b59425c432d3570b22623", + "sha256:47fd096ceb68d966681f8d0e820f7305bf05b30421ca562cfdb3c89a5aef26e5", + "sha256:4a98ed8c47e367b9233b5ca25c36c2b45ab61959ac543195f0b6349f0a599ec8", + "sha256:4b562cfdd8caa76ba47ca2a9211fee6b0a95ceb95c9da94cf60a3909b2300854", + "sha256:4ffec9661731fb674ccc88d1de92709219047af3d8198d0e6203c21f3f1b54a7", + "sha256:5210cb09ec31281e16fda008bf8dfe2e024eef58e075dd0c01935d0004fdfffd", + "sha256:53bfdc1aea619fa8d347be37b08de87089d543375948aacf8b163b0c5eb6d4e4", + "sha256:5a2aee4214e5efed2cb3650139010dd4d0b1c29a9760278ab259d0b46281b66a", + "sha256:5a93d368311d40827dc5f0cad2a0e9a8700c1b017346808cfdfd9ea98aee45df", + "sha256:6060d68d10fafd51c4cb3a7d687d741009881860dfd429c863e570877e2ce9de", + "sha256:627c8bb007a757da18d32c5d9b7ac50ab0356d9e922d570b0572765778080787", + "sha256:63591f381e5b28b90e115ac7a96f8ce5ecb917facb42d79d4f89714f89cc6d8e", + "sha256:65ee75e0e83e393fdc5c06e55e376c7511881a5ebee006ecca89cb1b3b41d6f1", + "sha256:6ba967d0e3fed8611f1face6695dc8fa554ee543d300681f8080f5de9cc7da73", + "sha256:6c0081546749c0b4341ce575622a4f8eee05f675d3a0872ab6aed6e5bd2ba5a8", + "sha256:6ec870a63295ebff737640c4ef39868312e206dcba655b4ad5c7d0e8c2488b73", + "sha256:751bc57e4c3b7cd92762344562dcbd405e2b54488de1d7a1e083a470bdbc5ae9", + "sha256:75ef535ebe541b74a160bb59c3e520f543250d19f69d5973350ec1b9706e1469", + "sha256:79b0962a8f09788ca735532cfcf2dd053424fe5eabbda564b74f8e5e2eb11f48", + "sha256:7e5d32def075e495b4802371fd8cda96ff4957aa39e215f83d87022dedf14cfb", + "sha256:7fa1e65fd559823997f39a592cb49d8c89dd31c8bbde8273fe3922e2c1f294f6", + "sha256:802b03f6c367359c94eb6a90169666efa1aa1d6e24fce37a0b21642ccdfe48cf", + "sha256:80502eb26483b0206d0508475ec7d67a86bc0afc5bb4aad3a6172a7a85a27554", + "sha256:867cf19f1c7aa6f187a0a31b702f5668e935e700b46d94bd58e94ec8581cf081", + "sha256:8b6e1493724d29e46a0e7e8125d9808c9957c652db67afe9497d385509fc5ac5", + "sha256:8f97c8be81b3262ad8dae982485c4a73c9f2374614dfc0db8eb0f754badb29d6", + "sha256:93bb1406125ae9bd7a9bb0d45f11b30f157ea8d2efee1ebe9d781b1d1a9fce6b", + "sha256:99c296ecb8ce6ea1f404f4d174fdb215c64515827778525301c29ddf6f8e6e07", + "sha256:9f6b7a604812f447495829751dfe7ab57cb31c2c9acdb07ba4b7157490411a12", + "sha256:a66b314f4a637784d5ca2970745bb2e6e554447dce8f4cfedd9b9fcef5e3ffc6", + "sha256:ab8115af26a9e95f39b08fff416f097803480f265500b218a5ca065d6e73124f", + "sha256:b04451e5addae3a078a7a4f494e6b217025f4813dfb364a49c250fc5dfd1d2e2", + "sha256:b4c75dd345707da622c78dbd6a63a025f7b89377ddc4e71ba40043929824f5d4", + "sha256:b6b94fc99487ce4a45ce00fa9145f4861f6e021254a005101d00bc17a4bb4f5c", + "sha256:bb5a39320d00fa781959d2d0151e6f0293dd1398c6dc9dc934112ecce7b4fb52", + "sha256:be7f948d33d0536c2922289e6f5983251cb0bd0d727db6ff692886c239f47a2c", + "sha256:c09323eeae9e0cb2ced0cb3635485ae17f4f1b2b6b908a494ce2d830c609d4be", + "sha256:c4241e1da3852a955d37a22157ed51b2d30a65f7987eac9d162bb302fb754d87", + "sha256:ca2ecc65126eaaa5b8e6a119913cfb2c2b1ed4c8ee1b980baf333aa9d379f227", + "sha256:cad74cbbefbdb81cb22a9ea22561614b8dc58fcd52cd54126bbb8ee9ee77a5d5", + "sha256:cff815181437add5f3d702e8c7f1d2aa4ed04ed04cde27ec809e7ac516ee6b5f", + "sha256:d9b1127f085d09c7c0a976d440e8fc2f7adc579d62abcfc20c23c2699bbe2dc1", + "sha256:de963a4b8787d93a9fba8f4052d9dde8b12adbeac5781e48035be1557dfadb20", + "sha256:e2a3176b33b97ebae397f951d254e3155a0afe730e1b76fb35126555c27dd3b5", + "sha256:e3603e70e96ee30af1954ce57d4922a059402f368013e7138e90f1c03d185267", + "sha256:e5f043751840a07ff0160abe46ed42a88bc29baee93656abb5a050beda176306", + "sha256:e70fd71e0321a805001192e08ae4af45b86c68f155670230c3f6f4dd25089e70", + "sha256:e75d8c2980d719045be366160568bf508cbbed21285efe32468c75abcd4cf8b3", + "sha256:ef14750fa60b47510cfe9c7c37e7abe67617f5d1f1a8ffa257a59d49836dadda", + "sha256:f3020fb98f27a6ea79418a5b332ca07be93884e4a455c8a0a31b2dcf39ee2d96", + "sha256:f576403c2b14f0eea694365b9018d5bacac70b1550261ffc7a54a92e18967541", + "sha256:f9c8bb7b77f97eb49dac900445fbf96a332d2072588949d6396581933843fb04", + "sha256:fa2531f83e7c5f6f7cc20a1b4e0f982bd608aad81ff6c385148e64256ab0419f", + "sha256:faa3b63b71d555e7a21cecc11c65e059d9cb1902158d863ac3592e1947bc521a", + "sha256:fb7bb86c4aedb4382d7f643ff7d21ab4731d59ddb9b448e78b9125ab1addc007", + "sha256:fbcba1b06f42338fecbd366227025f81729d9f4a577677fd3cd1ceff34d7286a" + ], + "index": "pypi", + "version": "==2.4.0" + } + }, + "develop": {} +} diff --git a/assets/jc_icon.png b/assets/jc_icon.png new file mode 100644 index 0000000..1bb25fa Binary files /dev/null and b/assets/jc_icon.png differ diff --git a/assets/jorcademy.png b/assets/jorcademy.png new file mode 100644 index 0000000..991c670 Binary files /dev/null and b/assets/jorcademy.png differ diff --git a/engine.py b/engine.py new file mode 100644 index 0000000..aaeba08 --- /dev/null +++ b/engine.py @@ -0,0 +1,38 @@ +import pygame +import game +import jorcademy as jc + +# Init user setup +game.setup() + +# pygame setup +pygame.init() +screen = pygame.display.set_mode(jc.screen_size) +clock = pygame.time.Clock() +running = True + +# Set app icon +pygame_icon = pygame.image.load('assets/jorcademy.png') +pygame.display.set_icon(pygame_icon) + +while running: + # poll for events + # pygame.QUIT event means the user clicked X to close your window + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + + # fill the screen with a color to wipe away anything from last frame + pygame.display.set_caption(jc.screen_title) + screen.fill(jc.background_color) + + # Render game + game.draw() + + # flip() the display to put your work on screen + pygame.display.flip() + + clock.tick(60) # limits FPS to 60 + + +pygame.quit() \ No newline at end of file diff --git a/game.py b/game.py new file mode 100644 index 0000000..b177447 --- /dev/null +++ b/game.py @@ -0,0 +1,11 @@ +from jorcademy import * + + +def setup() -> None: + screen(800, 600) + title("Best game ever") + backdrop(255, 255, 255) + + +def draw() -> None: + pass diff --git a/jorcademy.py b/jorcademy.py new file mode 100644 index 0000000..ea5bddd --- /dev/null +++ b/jorcademy.py @@ -0,0 +1,44 @@ +import pygame + +# Game settings +screen_size = (100, 100) +screen_title = "JorCademy Engine" +background_color = (0, 0, 0) + + +# Change screen size +def screen(width: int, height: int) -> (int, int): + global screen_size + screen_size = (width, height) + + +# Change screen title +def title(t: str): + global screen_title + screen_title = t + + +# Change screen background color +def backdrop(r: int, g: int, b: int): + global background_color + background_color = (r, g, b) + + +# Draw a circle +def circle(): + pass + + +# Draw a rectangle +def rect(): + pass + + +# Draw a triangle +def triangle(): + pass + + +# Draw a string of text +def text(): + pass