Hello,
My name is Kirk. I have just started playing around with Love2D, maybe for 2 weeks or so now. I was impressed at how quick I was able to put something together and completed a small shooting gallery game in a single evening.
(Crosshair attached to mouse hidden in screenshot for some reason)
I am now going to complete a slightly bigger project in which it has multiple images used as the background to create a parallax effect. I seem to be having problems of the bat just loading these images. I have attached the 2 of the 4 layers I am using for the background 1-4 in which the order they should be drawn.
I am getting a black background and no errors. After further investigation it looks like image 1 loads and can be drawn just fine but the other 3 do not load at all.
Is there some issue with loading images which have alpha?
Multi-layer Background
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Multi-layer Background
There is no problem with loading and drawing images that have alpha transparency. Just use the normal image loading function love.graphics.newImage(filename). You can take a peek at my example if you like (big thanks to PWL for the images).
- Attachments
-
- parallax_background.love
- Example of parallax background.
- (245.37 KiB) Downloaded 251 times
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Multi-layer Background
If the images are too big, you might be running out of texture memory; sadly, without you sharing all the necessary information (code and assets, but preferably as a .love file of a minimal example where it still happens), the only thing we can do is just guess.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Bing [Bot], Brotein and 5 guests