pictures + pictures

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
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

pictures + pictures

Post by pielago »

Okay so far i can work with multiples images
but i want to clean some space to many images and i really don't want that!
is there a way to just use one image and have many in it?
example have house ,well, sprite-sheet itself and just use a code that will use that image inside that big image?
it will be less work for me as well to make images and images all time..
can someone share some code example?
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: pictures + pictures

Post by micha »

Have a look at the tutorial in the wiki. What you are looking for is probably explained in the tutorial on Tile-based Scrolling or Efficient Tile-based scrolling.
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

Re: pictures + pictures

Post by pielago »

okay i hear some squad will work for multiple pictures inside a big picture ..
not sure how to use it wiki show it but not tell from where?? but the question is do i need the batch as well ???
and if i make a batch the squad will read it from there or am i confuse???

i just have so many houses and want to store them in one picture and make the game size smaller >.>
and i see squad can help me but i don't know how both of them works??? a.k.a order...

can someone show me a example with squad and batch to see how it works???
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: pictures + pictures

Post by Davidobot »

pielago wrote:okay i hear some squad will work for multiple pictures inside a big picture ..
not sure how to use it wiki show it but not tell from where?? but the question is do i need the batch as well ???
and if i make a batch the squad will read it from there or am i confuse???

i just have so many houses and want to store them in one picture and make the game size smaller >.>
and i see squad can help me but i don't know how both of them works??? a.k.a order...

can someone show me a example with squad and batch to see how it works???
Well first off, they're called quads, not squads.
And here is the wiki page: https://www.love2d.org/wiki/Quad
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: pictures + pictures

Post by micha »

Yes, I suggest using spritebatches and you can find code in the efficient tile-based scrolling tutorial, that I posted above.
Post Reply

Who is online

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