Main menu preventing sprites from loading?

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
winkwonk
Prole
Posts: 2
Joined: Mon Aug 19, 2024 9:20 pm

Main menu preventing sprites from loading?

Post by winkwonk »

I'm trying to add a menu screen to my game, but seem to be running into problems with sprites loading upon exiting the menu.

In particular if I have the game state go from menu -> game, sprites don't load but the colliders (via windfield) do. Does anyone know what's wrong with it? Setting the game state immediately to game has everything load fine, but it's the transition from menu to game that causes sprites to not load.

I've attached the main.lua file and the player.lua file. If I need to attach anything else please let me know! :)
Attachments
player.lua
(1.73 KiB) Downloaded 113 times
main.lua
(4.71 KiB) Downloaded 114 times
winkwonk
Prole
Posts: 2
Joined: Mon Aug 19, 2024 9:20 pm

Re: Main menu preventing sprites from loading?

Post by winkwonk »

I figured it out! It turns out my current tester menu was creating a black screen over all the drawn images preventing anything from being seen. Resetting the graphics before drawing fixed the problem. I'm going to look into utilizing a UI library to hopefully simplify this
Post Reply

Who is online

Users browsing this forum: Bing [Bot], MummyTheTiger and 2 guests