Adding background to shooter game

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Wheelz
Prole
Posts: 1
Joined: Tue Apr 25, 2023 9:41 pm

Adding background to shooter game

Post 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?
MrFariator
Party member
Posts: 521
Joined: Wed Oct 05, 2016 11:53 am

Re: Adding background to shooter game

Post 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.
Last edited by MrFariator on Tue Apr 25, 2023 10:25 pm, edited 1 time in total.
User avatar
BrotSagtMist
Party member
Posts: 636
Joined: Fri Aug 06, 2021 10:30 pm

Re: Adding background to shooter game

Post 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.
obey
User avatar
dusoft
Party member
Posts: 523
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Adding background to shooter game

Post by dusoft »

Also please use the support forum for this kind of questions.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests