Can I use spritesheets with löve

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
WortWal
Prole
Posts: 1
Joined: Tue Jun 16, 2020 6:02 am

Can I use spritesheets with löve

Post by WortWal »

Can I use spritesheets with löve ? I hadn't found anything in the docs :cry:
User avatar
Stifu
Party member
Posts: 106
Joined: Mon Mar 14, 2016 9:53 am
Contact:

Re: Can I use spritesheets with löve

Post by Stifu »

WortWal wrote: Tue Jun 16, 2020 6:08 am Can I use spritesheets with löve ? I hadn't found anything in the docs :cry:
Yes, but you have to code the whole thing.
Example: https://github.com/thomasgoldstein/zabu ... r/rick.lua
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Can I use spritesheets with löve

Post by zorg »

https://love2d.org/wiki/SpriteBatch <- This is what you want.
Me and my stuff :3True 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.
User avatar
steVeRoll
Party member
Posts: 138
Joined: Sun Feb 14, 2016 1:13 pm

Re: Can I use spritesheets with löve

Post by steVeRoll »

zorg wrote: Wed Jun 17, 2020 5:07 am https://love2d.org/wiki/SpriteBatch <- This is what you want.
I think they meant sprite sheets, as in drawing parts of an image.

You can do just that using Quads. First, you create the quads, then you draw the original image with the quad as the second parameter.
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: Can I use spritesheets with löve

Post by D0NM »

WortWal wrote: Tue Jun 16, 2020 6:08 am Can I use spritesheets with löve ? I hadn't found anything in the docs :cry:
This nifty tool could help u to obtain sprites quads (regions) from the spritesheet and
generate a ready to use .lua file

https://github.com/25A0/Quadtastic

Image
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
hoistbypetard
Prole
Posts: 26
Joined: Fri May 22, 2020 7:00 pm

Re: Can I use spritesheets with löve

Post by hoistbypetard »

D0NM wrote: Sat Jun 20, 2020 6:33 pm This nifty tool could help u to obtain sprites quads (regions) from the spritesheet and
generate a ready to use .lua file

https://github.com/25A0/Quadtastic
Wow. Thank you for sharing that. That's great.
Post Reply

Who is online

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