Evrim wrote:Thanks Robin for explaining that, will that dot trick work on images too because I started adding loads of sprites and the folder is getting filled by images
No, that is just to remain compatible with modules. For images, you need to give the full relative path.
Evrim wrote:and a new problem, I found a tricky way for making a main - by re-moving (not remove) the images, I took them to very far away off the screen and screen gets cleared
You can also just not draw them.
Evrim wrote:But after I press S, screen clears supposedly but after I press Q, it quits the game even I set onMainMenu to false in S
That's because you set onMainMenu to true every time a key is pressed. You need to keep track of the state and use that.
Evrim wrote:Thanks Robin for explaining that, will that dot trick work on images too because I started adding loads of sprites and the folder is getting filled by images
No, that is just to remain compatible with modules. For images, you need to give the full relative path.
Example?
Robin wrote:
Evrim wrote:and a new problem, I found a tricky way for making a main - by re-moving (not remove) the images, I took them to very far away off the screen and screen gets cleared
You can also just not draw them.
How not draw them?
Robin wrote:
Evrim wrote:But after I press S, screen clears supposedly but after I press Q, it quits the game even I set onMainMenu to false in S
That's because you set onMainMenu to true every time a key is pressed. You need to keep track of the state and use that.
Evrim wrote:In case state changes, will draw entities will disappear?
Jup.
LÖVE doesn't have entities, actually. All love.graphics.draw does is copy the pixels from the image to the screen, and the screen is cleared between frames. (Actually there is more to it than that, but I think this explains it well enough.)