Page 1 of 1

Adding background to shooter game

Posted: Tue Apr 25, 2023 9:44 pm
by Wheelz
Hello.

I am working on a game project, and for some reason, when I try to add a background, the background shows up when I try to shoot bullets at the enemy. Is there a way I can add a background so the game plays normally, and I don't have to get rid of my current code and start over?

Re: Adding background to shooter game

Posted: Tue Apr 25, 2023 10:24 pm
by MrFariator
Löve draws things in the order that you tell it to draw things in. If your code draws the background only if when a bullet is active, that's how it will draw it. Presumably you want the background to go under everything else, in which case the best place to put it is at the start of your love.draw function.

If in doubt, post your code.

Re: Adding background to shooter game

Posted: Tue Apr 25, 2023 10:24 pm
by BrotSagtMist
You need to actually show us whats going on, either in a screenshot or with code or else no one has an idea whats this about.

Re: Adding background to shooter game

Posted: Thu Apr 27, 2023 7:40 pm
by dusoft
Also please use the support forum for this kind of questions.