Switch Game - is an Engine to create games based on python. It supports some sprites like a StaticSprite, AnimatedSprite and many useful classes such as Image, Animation, Tileset and other. This project is in development, but you can already use it in your games.
from SwitchGame import *
from SwitchGame import *
app = WindowLoop(Vec2(1000, 600))
def main():
while True: # mainloop
app.update_display()
if __name__ == "__main__":
main()
from SwitchGame import *
class Main(WindowLoop):
def __init__(self) -> None:
super().__init__(Vec2(1000, 600), 165)
def update_events(self, __event) -> None:
if __event.type == KEYDOWN:
print("key pressed")
else:
super().update_events(__event)
def main(self) -> None:
while True: # mainloop
self.update_display()
if __name__ == "__main__":
Main().main()