Image Layering/generating

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
CosmicFloppyDisk
Prole
Posts: 8
Joined: Sat Sep 12, 2015 12:34 am

Image Layering/generating

Post by CosmicFloppyDisk »

So probably a stupid question but I'm kinda new to love and 2d game making, but in simple game i want to create you "jump between planets" in your spaceship, now each planet I want to be randomly generated by having some base images like cloud cover and planet color and moons. Now I realize I could just save the data for that planet but is there anyway just to compile the images into one image just to refer back to when the player visits the planet again, and if this images saving technique is possible how would i go about that? thanks in advance to anyone who helps :)
User avatar
s-ol
Party member
Posts: 1080
Joined: Mon Sep 15, 2014 7:41 pm
Location: Milan, Italy
Contact:

Re: Image Layering/generating

Post by s-ol »

CosmicFloppyDisk wrote:So probably a stupid question but I'm kinda new to love and 2d game making, but in simple game i want to create you "jump between planets" in your spaceship, now each planet I want to be randomly generated by having some base images like cloud cover and planet color and moons. Now I realize I could just save the data for that planet but is there anyway just to compile the images into one image just to refer back to when the player visits the planet again, and if this images saving technique is possible how would i go about that? thanks in advance to anyone who helps :)
You can use canvases to do that, just draw the planet to it once and then draw the canvas instead of all the parts.

s-ol.nu

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
CosmicFloppyDisk
Prole
Posts: 8
Joined: Sat Sep 12, 2015 12:34 am

Re: Image Layering/generating

Post by CosmicFloppyDisk »

Ok ill try that thanks
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 6 guests