Page 1 of 1

pictures + pictures

Posted: Sat Nov 16, 2013 7:01 pm
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?

Re: pictures + pictures

Posted: Sat Nov 16, 2013 7:13 pm
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.

Re: pictures + pictures

Posted: Sat Jan 04, 2014 6:38 am
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???

Re: pictures + pictures

Posted: Sat Jan 04, 2014 6:41 am
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

Re: pictures + pictures

Posted: Sat Jan 04, 2014 11:29 am
by micha
Yes, I suggest using spritebatches and you can find code in the efficient tile-based scrolling tutorial, that I posted above.