I tried making a simple game (a simple 2d remake of the classic Get Crushed By A Speeding Wall), and everything was working fine until I decided to playtest it for a bit longer. Then I realised that after literally 20 seconds of playing the FPS gradually decreases, and a second after the game freezes. The music is still playing, but nothing is moving, the background video is torn between two frames, and if you try to click on anything, the cursor freezes up. I have no idea what has happened to cause the freeze, could somebody help me? My game isn't using love.physics nor am I making a lot of calculations at once...I'm a newb who's working on a big project, and having thought about how big it actually is and how unexperienced I am, I decided to make a small game to get used to the love2d working sphere.
[SOLVED] Game freezes fatally after only 20 seconds of gameplay
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 6
- Joined: Thu May 09, 2024 3:54 pm
- Location: Russia, Podolsk
- Contact:
[SOLVED] Game freezes fatally after only 20 seconds of gameplay
- Attachments
-
- Be Crushed By A Speeding Wall.love
- the love file
- (3.8 MiB) Downloaded 182 times
Last edited by Stepanchicko on Fri Jun 14, 2024 2:06 pm, edited 1 time in total.
Re: Game freezes fatally after only 20 seconds of gameplay
The problem is, that you are loading the images thegovernment.jpg and textures/normal.png every frame. Load them once in love.load() like you do with the videos and music. This fixes the freeze for me.
-
- Prole
- Posts: 6
- Joined: Thu May 09, 2024 3:54 pm
- Location: Russia, Podolsk
- Contact:
Re: Game freezes fatally after only 20 seconds of gameplay
Thank you thank you and a million times thank you! Helped me out a lot.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 6 guests