Textured sprites

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
lizard
Prole
Posts: 16
Joined: Wed Aug 04, 2010 6:38 pm
Location: Thailand

Textured sprites

Post by lizard »

Few weeks ago I found this article - http://habrahabr.ru/blogs/gdev/117420/ (sorry, russian only, but google translate can help ;) ).
Pro: for lots of 'skinned' sprites, only one animation sheet needed. Contra: I don't know how to create 'model map' without 3D-modelling :huh:
Here also a example with images from article (warning, map and resulting image is not po2-safe):
Attachments
textured_sprite.love
(20.94 KiB) Downloaded 177 times
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Textured sprites

Post by Lafolie »

Oh wow that's pretty incredible. I'd love to see a proper translation of that tutorial. Actually... google may have the answers.

EDIT: Studying the link a little more, it's pretty much explained by the images and source alone. This is really cool. I might use this in my next project.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: Textured sprites

Post by Taehl »

I think I can guess what's going on there. If my guess is correct, HOLY CRAP THAT'S BRILLIANT. I sure wish I could read it!

But since Love doesn't have shader support yet, I don't think we could do this quick enough to be used in games, could we?
Last edited by Taehl on Wed May 18, 2011 10:56 pm, edited 1 time in total.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Textured sprites

Post by vrld »

Taehl wrote:If my guess is correct, HOLY CRAP THAT'S BRILLIANT.
I guess your guess is correct.
Taehl wrote:I don't think we could do this quick enough to be used in games, could we?
Not in realtime, for morphing effects or stuff, but you can have one "model" and different textures which you combine to create sprites at game start. Neat way to reduce the .love filesize.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Textured sprites

Post by BlackBulletIV »

It took me quite a while to figure out what the benefit of this is, but I've finally got it. And now that I have, all I can say is: THAT'S REALLY COOL! But, it would be pretty hard to construct a placement map like that one, wouldn't it?
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Textured sprites

Post by Lafolie »

BlackBulletIV wrote:It took me quite a while to figure out what the benefit of this is, but I've finally got it. And now that I have, all I can say is: THAT'S REALLY COOL! But, it would be pretty hard to construct a placement map like that one, wouldn't it?
Not at all. It's a matter of working backwards really. You could write a function that draws an input texture map template and you're all set.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Textured sprites

Post by BlackBulletIV »

Working backwards? What do you mean? I was referring to having to set precisely the red and green values on the placement map to match the x/y coordinates on the texture.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Textured sprites

Post by Lafolie »

BlackBulletIV wrote:Working backwards? What do you mean? I was referring to having to set precisely the red and green values on the placement map to match the x/y coordinates on the texture.
You could use no input texture but instead have a function that takes these values and draws a template texture and works this out for you.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Textured sprites

Post by BlackBulletIV »

Ok, I'm still not getting it at all. :/ I think a code example my help my brain to figure it out.

Hey by the way, congratulations on 200 posts!
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Textured sprites

Post by kikito »

Lafolie wrote: You could use no input texture but instead have a function that takes these values and draws a template texture and works this out for you.
I'm sorry, but this doesn't help me to understand what you were saying neither. Right now it sounds to me like BlackBulletIV asked "how do I do xx?" and you answered "you have a function that does xx".
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests