Hello, I am quite new to both Love and Lua, and I am trying to make a little game. In this game, I tried to load the scope image from the assets folder, and I want it so that the black parts of the scope cover up everything else in the image. This way, the player has to "hunt" around for their target. Right now, even though the .png is completely black, when loaded onto the game, the scope is partially see-through.
What am I doing wrong?
NOTE: I am using someone else's menu library (w/minor changes), and my Multiplayer is not done yet, I am still working on singleplayer.
Love file is attached.
Thanks in advance.
[Solved] Need Help Loading Images
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 9
- Joined: Mon May 18, 2015 6:53 am
[Solved] Need Help Loading Images
- Attachments
-
- game.love
- Game
- (13.89 KiB) Downloaded 125 times
Last edited by .InsertNameHere on Mon Jun 08, 2015 1:35 am, edited 1 time in total.
- Guard13007
- Party member
- Posts: 134
- Joined: Sat Oct 25, 2014 3:42 am
- Location: Internet, USA
- Contact:
Re: Need Help Loading Images
I didn't look for very long, but I guessed correctly from the start what your problem is. Somewhere the color of the game is being set with transparency. Take a look at love.graphics.setColor to see. The quick and dirty solution is as follows in your main.lua:
BUT that is a quick fix which could lead to future bugs.
Like I said, I didn't look at everything in your game for very long, but I'm guessing you'll find a call to love.graphics.setColor somewhere in the menu.lua 's code. This call has a transparency value, and then everything after that point is drawn with some transparency.
BUT that is a quick fix which could lead to future bugs.
Like I said, I didn't look at everything in your game for very long, but I'm guessing you'll find a call to love.graphics.setColor somewhere in the menu.lua 's code. This call has a transparency value, and then everything after that point is drawn with some transparency.
-
- Prole
- Posts: 9
- Joined: Mon May 18, 2015 6:53 am
Re: Need Help Loading Images
Thank You!
- Guard13007
- Party member
- Posts: 134
- Joined: Sat Oct 25, 2014 3:42 am
- Location: Internet, USA
- Contact:
Re: Need Help Loading Images
No problem. ^^ Just glad to actually be able to help someone instead of just asking for help.
(On an unrelated note, perhaps edit the thread title to include [Solved] so people know the issue has been resolved?)
(On an unrelated note, perhaps edit the thread title to include [Solved] so people know the issue has been resolved?)
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Need Help Loading Images
BTW:
1. [wiki]love.draw[/wiki] doesn't take dt as an argument
2. You don't need to call love.graphics.clear() yourself. It's already called in the default [wiki]love.run[/wiki].
1. [wiki]love.draw[/wiki] doesn't take dt as an argument
2. You don't need to call love.graphics.clear() yourself. It's already called in the default [wiki]love.run[/wiki].
Help us help you: attach a .love.
Who is online
Users browsing this forum: No registered users and 5 guests