Game freezes fatally after only 20 seconds of gameplay

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Stepanchicko
Prole
Posts: 1
Joined: Thu May 09, 2024 3:54 pm
Location: Russia, Podolsk
Contact:

Game freezes fatally after only 20 seconds of gameplay

Post by Stepanchicko »

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.
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... :cry:
Attachments
Be Crushed By A Speeding Wall.love
the love file
(3.8 MiB) Downloaded 54 times
Xugro
Party member
Posts: 112
Joined: Wed Sep 29, 2010 8:14 pm

Re: Game freezes fatally after only 20 seconds of gameplay

Post by Xugro »

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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests