Here's pygame you can argue about

print("Python has begun running . . .")

#Imports
import time
import math
import pygame
import threading
import ctypes
from sys import exit

#pygame startup
pygame.init()
info = pygame.display.Info()
print(info)
screen = pygame.display.set_mode((info.current_w, info.current_h), pygame.RESIZABLE | pygame.DOUBLEBUF | pygame.HWSURFACE)
pygame.display.set_caption("Survivion")
pygame.display.set_icon(pygame.image.load("fg/assets/player.svg"))
clock = pygame.time.Clock()

#mouse setup
pygame.mouse.set_visible(False)
cursorImg = pygame.image.load("fg/assets/cursor.png")

#Classes and Functions
class Tmo:
    def __init__(self):
        self.timers = {}
        self.timer_id = 0
    
    def setTimeout(self, fn, delay, *args, **kwargs):
        def timer_callback():
            self.timers.pop(timer_id, None)
            fn(*args, **kwargs)
        
        timer_id = self.timer_id
        self.timer_id += 1
        t = threading.Timer(delay / 1000, timer_callback)
        self.timers[timer_id] = t
        t.start()
        return timer_id
    
    def clearTimeout(self, timer_id):
        t = self.timers.pop(timer_id, None)
        if t is not None:
            t.cancel()
class Ints:
    def __init__(self):
        self.timers = {}
        self.timer_id = 0
    
    def setInterval(self, fn, time, *args):
        def interval_callback():
            fn(*args)
            self.timers[timer_id] = threading.Timer(time, interval_callback)
            self.timers[timer_id].start()

        timer_id = self.timer_id
        self.timer_id += 1
        self.timers[timer_id] = threading.Timer(time, interval_callback)
        self.timers[timer_id].start()

    def clearInterval(self, fn):
        for timer_id in self.timers:
            if self.timers[timer_id].function == fn:
                self.timers[timer_id].cancel()
                del self.timers[timer_id]
                break

tmo = Tmo()
ints = Ints()

class Stats:
	def __init__(self):
		self.clock = pygame.time.Clock()
		self.font = pygame.font.Font("fg/fonts/LilitaOne.ttf", 20)
		self.fps = 0
		self.ms = self.font.render(f"{ms}ms", True, (255, 255, 255))
		self.visible = True

	def render(self, display):
		self.fps = self.font.render(f"{round(self.clock.get_fps())}fps", True, (255, 255, 255))

		if self.visible:
			screen.blit(self.fps, (30, 15))
			screen.blit(self.ms, (30, 45))

class Player(object):
	def __init__(self):
		self.width = 34
		self.height = 30
		self.x = (info.current_w/2) - self.width/2
		self.y = (info.current_h/2) - self.height/2
		self.keys = [False, False, False, False]
		self.sprite = pygame.image.load('fg/assets/player.svg').convert_alpha()
		self.sprite = pygame.transform.scale(self.sprite, (self.width, self.height))
		self.movementSpeed = 1
		self.rotation = 0

	def update(self):
		if (self.keys[0] and not self.keys[1]):
			self.y -= self.movementSpeed
		if (self.keys[1] and not self.keys[0]):
			self.y += self.movementSpeed
		if (self.keys[2] and not self.keys[3]):
			self.x -= self.movementSpeed
		if (self.keys[3] and not self.keys[2]):
			self.x += self.movementSpeed

		#Rotation towards mouse
		angle = math.atan2(mouse["y"] - 16 - self.y + (self.height/2), mouse["x"] - self.x - 16 + (self.width/2))
		self.rotation = angle;
		degrees = math.degrees(self.rotation)
		self.spriteR = pygame.transform.rotate(self.sprite, -degrees)

		#THIS STEP IS VERY IMPORTANT. IT ANCHORS TO THE CENTER OF THE SPRITE, AND NOT THE TOP LEFT
		sprite_rect = self.spriteR.get_rect(center=(self.x + self.width / 2, self.y + self.height / 2))
		screen.blit(self.spriteR, sprite_rect)

	def perform(self):
		self.update()

class Background(object):
	def __init__(self):
		self.screen_width = info.current_w
		self.screen_height = info.current_h
		self.sprite = pygame.image.load('fg/assets/background.jpg').convert_alpha()
		self.backgrounds = []
		bg_width, bg_height = self.sprite.get_size()
		for x in range(0, self.screen_width, bg_width):
			for y in range(0, self.screen_height, bg_height):
				self.backgrounds.append((x, y))

	def perform(self):
		for x, y in self.backgrounds:
			screen.blit(self.sprite, (x, y))

def cursor(x, y):
	screen.blit(cursorImg, (x, y))

#Variables
mouse = {
	"x": 0,
	"y": 0,
	"holding": False
}
ms = 0
ds, de = 0, 0
stats = Stats()

#Sprites
background = Background()
player = Player()

#Loop
while True:
	ds = pygame.time.get_ticks()
	mouse["x"], mouse["y"] = pygame.mouse.get_pos()
	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			pygame.quit()
			exit()
		if event.type == pygame.KEYDOWN:
			if event.key == pygame.K_w:
				player.keys[0] = True
			if event.key == pygame.K_s:
				player.keys[1] = True
			if event.key == pygame.K_a:
				player.keys[2] = True
			if event.key == pygame.K_d:
				player.keys[3] = True
		if event.type == pygame.KEYUP:
			if event.key == pygame.K_w:
				player.keys[0] = False
			if event.key == pygame.K_s:
				player.keys[1] = False
			if event.key == pygame.K_a:
				player.keys[2] = False
			if event.key == pygame.K_d:
				player.keys[3] = False

	background.perform()
	player.perform()
	cursor(mouse["x"], mouse["y"])
	de = pygame.time.get_ticks()
	ms = abs(round(ds - de))
	stats.render(screen)
	pygame.display.update()
	stats.clock.tick(65)

def calcMS():
		self.ms = self.font.render(f"{ms}ms", True, (255, 255, 255))
		
ints.setInterval(calcMS, 0.5)

person obviously the vietnamese bánh mì (100% not biased)

    Letti42
    working on a giant top down battle royale game, done with mechanics now adding content
    will be out soon

    pluto fr that sandwich is bussin (fr fr no cap) i have a mental breakdown when deciding to order that or the soup

      person
      get both(duh)
      worst-case scenario, you can't finish the food so you have leftovers for the next day

      my bank balance is $-10.40 im not buying both

      person (i assume you’re talking about pho)

      I love pho but I hate getting it because its incredibly expensive here in seattle
      Normally if somethings expensive to buy I would get the ingredients to make it myself but its so difficult to make pho from scratch 😭

        Letti42 pho is frfr amazing, but if you wanna cook it at home traditionally, it'll take hours

        Vietnamese is just so underrated at my school we did this sandwich bracket (thats why i asked you guys) and most kids hadent even heard of falafel, let alone the banh mi

          person Falafel isn't Vietnamese though? Unless I'm thinking of something different

            okay so everyone's talking food. i believe that pho is also very good. spicy and yummy 😋

              ackvonhuelio oh hell nah. i don't put Sriracha in my pho at all. the way i had it was too good to have that in it

              ackvonhuelio WHO WOULD DO THAT?!?!??!?!
              im vietnamese and i have seen no vietnamese person do that every in their lives.
              we use like hoisin sauce and siracha just for dipping the meat in.

              Letti42 like i said it was a sandwich bracket not just all Vietnamese

              can we all agree that undertale is just pure nostalgia
              theres nothing to hate about it

              • -wyi replied to this.

                Chat