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
Here also a example with images from article (warning, map and resulting image is not po2-safe):
Textured sprites
Textured sprites
- Attachments
-
- textured_sprite.love
- (20.94 KiB) Downloaded 182 times
Re: Textured sprites
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.
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.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Textured sprites
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?
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+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Re: Textured sprites
I guess your guess is correct.Taehl wrote:If my guess is correct, HOLY CRAP THAT'S BRILLIANT.
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.Taehl wrote:I don't think we could do this quick enough to be used in games, could we?
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Textured sprites
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?
Re: Textured sprites
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.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?
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.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Textured sprites
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.
Re: Textured sprites
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.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.
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.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Textured sprites
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!
Hey by the way, congratulations on 200 posts!
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Textured sprites
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".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.
When I write def I mean function.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests