From 731ba1053e0b0cf62ccf72be0ddbfd71b40f38a8 Mon Sep 17 00:00:00 2001 From: dvorakmortonxd Date: Fri, 5 Jun 2026 11:22:12 +0200 Subject: [PATCH] first sprite, making up the theme, some slight adjustments to differ from the pygame template, etc. --- README.md | 3 ++- levels.py | 2 +- main.py | 7 ++++--- sprites.png | Bin 4281 -> 5819 bytes sprites.pxo | Bin 5289 -> 6685 bytes 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7f63e0a..06f6ffe 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,5 @@ You control the weather to your liking, just be aware, it can turn against you! # Credits -Here I will list all the external resources I will use, most likely, fonts. I make most of my assets by my own. \ No newline at end of file +Here I will list all the external resources I will use, most likely, fonts. I make most of my assets by my own. +Alright so I think its fair to state I stole some code from my last minijam project at https://git.dvorakmortonxd.dev/dvorakmortonxd/revival-inc , however I dont know if this counts as external resource since, I am literally the one who wrote it. \ No newline at end of file diff --git a/levels.py b/levels.py index 1233ece..261718c 100644 --- a/levels.py +++ b/levels.py @@ -1,7 +1,7 @@ from render import load_sprite # this makes it so our function for rendering sprites from sprites.png is available in here def level1(screen, sheet, lastclickpos, basicfont, mouse, click, level): # the function for our first level, ignore the unused variables here, you can use them when you edit it - screen.blit(load_sprite(sheet, 0, 0, 26, 8, 210, 60), (200, 200)) # this renders a button I made in the sprites.png, its purely for visual purposes so it doesnt matter where you click rn + screen.blit(load_sprite(sheet, 0, 0, 57, 36, 912, 576), (0, 0)) # this renders a button I made in the sprites.png, its purely for visual purposes so it doesnt matter where you click rn if click: # this checks if you clicked, when you clicked it does the following stuff under level = 2 # sets the level to 2 print("yo") # prints out "yo" for debugging purposes, otherwise completely unnecessary diff --git a/main.py b/main.py index e8e618d..55ada2a 100644 --- a/main.py +++ b/main.py @@ -5,9 +5,10 @@ window_fps = 60 # the frames per second, this decides how fast the main loop ru def main(fps=window_fps): # the main function pygame.init() # initalizes pygame - screen_width = 800 # the screen width - screen_height = 500 # the screen height - title = "Example Title" # the title of the window obviously + screen_width = 912 # the screen width + screen_height = 576 # the screen height + # THE SCREEN IS 19:12 RATIO + title = "The Destroyer of Cities" # the title of the window obviously lastclickpos = [0, 0] # last position that was clicked, this changes every time you click somewhere on the game window screen = pygame.display.set_mode((screen_width, screen_height)) # this initalizes the display with the screen_width and screen_height variables pygame.display.set_caption(title) # this actually sets the title of the window from the title variable diff --git a/sprites.png b/sprites.png index 7bcb86e242d98dfd91a1142a10a7d9ace8ff881f..df9c9e91e99ef42e17ce6fe19efb197023f88226 100644 GIT binary patch delta 1881 zcmW+%c{H2(8vfD}#~q~^vDB7IM{!ZhZU?ob3lhucayk-Sw6}(; z64zctxETy;>9x&RN>47veD_QL`Mu}7@AEwGd!F;2_t#leGh@VLr#KoHz#cfqd@e2S5;b8aIz(k9VLj;tZOc0I(F$hl;O;7G zdqLa|06<^j<(n#Sv_vQaARJSbf6t%0;D^p_mHh^=fwolA}GNa?P_VYi*0|*y5b@*S^`6IY1 z&)8EntX2JUrWQ>g~V>eL0#xx`)M5Kb#8KybF1*P(y(XFH3RF5XGu()Dm#J35IZV`Rvnbcuj` z3^Jw=&@e1@^Qsr1XX6V_*Fy|v%(TyLuH~(e^!uXq)FJR*3Yb!p38OgC&oR^Gtkv<* zDcWpuAr+wST@OaPJ6$q0sIo3Qa4C&$c^0y(1|z*xy#Oa4W|iyteV5pZ#V@nhh<8^4 z#b4Lw8!7%yK<@c3wl@&X zzi%fUZuAmT4i9#h@J?jVsbb~{H65MBBN))ucSOXGClt39K39H}tY~HjKPvq*3SH|$ znDyM1M*0oBSh4(j-hNC%LVDW0c#H1dma~5I!dfQN`en(Z7ww4+VkNkXm9{akF8Xq6 zV%sDy66*>zr9>uv=NdgE>td7f64H#QXD1^u;Zqa4hQS}m2T|%~2-t^#B>S@xi2v}r zH_p>ay1F4wVW{SgF5NjT%bEa6#%V)X7&x{?;-`s?&3OaXa3MBNYbyyAd|ouHakeZSAgo|(;1ikp3Y94@XUkdfyc7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