load.load gets "called exactly once at the beginning of the game." How are the game assets loaded afterwards? I've been looking at the code from "Dave Gone Apeshit" and it doesn't call love.load after state changes.
if menuMode == "main" then
function menu.draw()
...
if menu.button("NEW GAME", 475, 310) then
game.load()
state = game
end
...
state is now game if you click "New Game" good so far. But now, since love.load only runs once how is game.load called since love.load will never be called again and state.load is in love.load?
Wouldn't the loading for the load function for state be called in love.update or something when a state changes? If you need to load assets after the game starts up, you would most likely to so in the update stage, i.e. when love.update is called.
Anyway, this is just a game's use of love.load. love.load is called exactly once at the start of the game (you can call it again manually of course); that's all.
Okay, I thought assets had be loaded in love.load. I didn't realize - despite looking right at the code - that assets can me loaded at any point. Thank you, sometimes it just takes an explanation. This helps a lot. Each time I call love.load the screen disappears for a moment which I really disliked.
Calling love.load isn't a good thing, unless you want a complete reset (this relies on you doing all start up inside love.load) with some sort of delay. If you want to reset a game without delay, you should probably manually do it, by reseting player positions, removing enemies, or something like that.
love.load usually consists of two parts: loading resources and setting up state (player position, enemies, whatever). You can separate those, put the setting up part in another function and call that when you want to reset the game.