first sprite, making up the theme, some slight adjustments to differ from the pygame template, etc.

This commit is contained in:
dvorakmortonxd 2026-06-05 11:22:12 +02:00
commit 731ba1053e
5 changed files with 7 additions and 5 deletions

View file

@ -20,4 +20,5 @@ You control the weather to your liking, just be aware, it can turn against you!
# Credits # Credits
Here I will list all the external resources I will use, most likely, fonts. I make most of my assets by my own. 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.

View file

@ -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 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 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 if click: # this checks if you clicked, when you clicked it does the following stuff under
level = 2 # sets the level to 2 level = 2 # sets the level to 2
print("yo") # prints out "yo" for debugging purposes, otherwise completely unnecessary print("yo") # prints out "yo" for debugging purposes, otherwise completely unnecessary

View file

@ -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 def main(fps=window_fps): # the main function
pygame.init() # initalizes pygame pygame.init() # initalizes pygame
screen_width = 800 # the screen width screen_width = 912 # the screen width
screen_height = 500 # the screen height screen_height = 576 # the screen height
title = "Example Title" # the title of the window obviously # 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 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 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 pygame.display.set_caption(title) # this actually sets the title of the window from the title variable

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

Binary file not shown.