Page 16 of 37
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 5:50 am
by Robin
Jasoco wrote:I still need to do walking animations and for the player, attacking animations and other special animations. I don't know how game artists do it! Drawing people is very hard. I hope this is satisfying.
Oh, I agree completely. You have done a rather decent job with those sprites, though.
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 6:54 am
by nevon
Jasoco wrote:They're not the best thing ever, but they'll do. I kinda like them, because I made them myself instead of using already made "placeholder" sprites from other games.
I still need to do walking animations and for the player, attacking animations and other special animations. I don't know how game artists do it! Drawing people is very hard. I hope this is satisfying.
Sure is! The ones you've made are alright though, if a bit plain for the main character. You might want to change the orientation of the shadow on some of those, though. On half of them the light is coming from the right, and on the other half it's coming from the left.
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 7:07 am
by Jasoco
I'm planning on having the characters be like paper dolls. Or Barbie dolls. In that you start with a base character, like a naked Barbie, and add clothes and accessories. So I could have each actor change outfits throughout the game. Especially the player who would need a base character, a clothing layer and a weapon layer. And depending on how I do it, the characters might need 2 or 3 clothing layers. (Shoes, pants, shirt) Guess it all depends on how much I'm willing to draw.
I just wonder if there would be a way to paste all the layers into a separate image data, then use that image data as my sprites instead of drawing each character layer every frame which could potentially lower the FPS. And the FPS is already fluctuating around 45-60.
Here's a curious question...
Which would be faster:
Using 16x16 pixel sprites at 2:2 enlargement scaling in game (Which is what I am doing right now.)
Using 16x16 pixel sprites at 1:1 then using love.graphics.scale to scale the entire screen to 2:2
Using 32x32 double-pixel sprites instead (Which is what I used to use until I realized I could get more tiles into a 1024x1024 pixel sheet and save space. i.e. 1024 tiles vs. 4096 tiles.)
Is there any speed increase if I draw them at 1:1 then scale the screen as opposed to scaling each quad every frame? i.e. scale one image once vs. scaling hundreds of images every time. I ask because it would take a bit of work to convert it all over to this method if I choose to do so. I just want to know if it's gonna actually be worth it.
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 7:26 am
by Robin
Jasoco wrote:Or Barbie dolls.
I think bartbes will like that.
Jasoco wrote:like a naked Barbie
Yeah, bartbes will
definitely like that.
Jasoco wrote:I just wonder if there would be a way to paste all the layers into a separate image data,
As with
ImageData:paste()? Or doesn't that handle transparency?
Otherwise: how about SpriteBatches?
Jasoco wrote:Which would be faster:
Using 16x16 pixel sprites at 2:2 enlargement scaling in game (Which is what I am doing right now.)
Using 16x16 pixel sprites at 1:1 then using love.graphics.scale to scale the entire screen to 2:2
Using 32x32 double-pixel sprites instead (Which is what I used to use until I realized I could get more tiles into a 1024x1024 pixel sheet and save space. i.e. 1024 tiles vs. 4096 tiles.)
The last one would probably be fastest, but I don't think there is any difference between the first two. If you really want to know (and think there is a difference, you could benchmark it)
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 7:30 am
by Jasoco
You don't think drawing all the images at normal size, then doubling up the whole screen would be faster than doubling up all the images every frame?
I'll have to do some tests.
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 9:58 am
by nevon
Jasoco wrote:So I could have each actor change outfits throughout the game. Especially the player who would need a base character, a clothing layer and a weapon layer. And depending on how I do it, the characters might need 2 or 3 clothing layers. (Shoes, pants, shirt) Guess it all depends on how much I'm willing to draw.
Ooo, I love that!
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Fri May 07, 2010 10:36 am
by Robin
Jasoco wrote:You don't think drawing all the images at normal size, then doubling up the whole screen would be faster than doubling up all the images every frame?
Well, I don't know, but I though love.graphics.scale() and friends just added an offset to the drawing scale etc of each image drawn?
Jasoco wrote:I'll have to do some tests.
Yeah, do that.
[Response]Testing the Options
Posted: Sun May 09, 2010 10:27 pm
by rhezalouis
Jasoco wrote:I'm planning on having the characters be like paper dolls. ... . So I could have each actor change outfits throughout the game. ... .And depending on how I do it, the characters might need 2 or 3 clothing layers. (Shoes, pants, shirt) Guess it all depends on how much I'm willing to draw.
Great! I'd löve to see that feature. Keep up the good work, Jasoco!
Jasoco wrote:Which would be faster:
Using 16x16 pixel sprites at 2:2 enlargement scaling in game (Which is what I am doing right now.)
Using 16x16 pixel sprites at 1:1 then using love.graphics.scale to scale the entire screen to 2:2
Using 32x32 double-pixel sprites instead
For 10000iterations x 200samples, guess what:
Code: Select all
--sprite16 --> a 16x16 sprite; --sprite32 --> a 32x32 sprite;
love.graphics.draw(sprite16, 100, 100, 0, 2) --> 11.52µs/exec
[love.graphics.scale(2);] love.graphics.draw(sprite16, 50, 50) --> 11.65µs/exec
love.graphics.draw(sprite32, 100, 100) --> 11.77µs/exec
--maxDeviation = +/-10%.
Surprisingly, there's not much difference. I guess it's yours to decide which's easier to be implemented.
The love.graphics.scale would add another 0.30µs to the main loop (love.draw). Using this data, I think you could approximate your case where multiple images are involved.
Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)
Posted: Sun May 09, 2010 11:58 pm
by Jasoco
I guess it'd be easier to keep it at 16x16 sprites scaled individually to allow for future expansion (In case I decide to later make the graphics 32x32 high detail instead). I'll probably implement constants for the values eventually though so later I can specify the dimensions at load.
Like:
tileSize = 32, tileScale = 1, screenScale = 1
or;
tileSize = 16, tileScale = 2, screenScale = 1
or;
tileSize = 16, tileScale = 1, screenScale = 2
So I could make 48x48 pixel tiles if I wanted to.
[Reply]The Cute-y Dimension
Posted: Mon May 10, 2010 3:13 pm
by rhezalouis
Uhmm, btw, is is really possible to fit a visually distinguishable character inside a 16x16pixel-square? See this guy (double-scaled for visibility):
- 32pixel guy
- my16x2.png (2.88 KiB) Viewed 1902 times
even 32x32 is quite packed, nah?
- the same guy, doubled
- my32x2.png (3 KiB) Viewed 1902 times
But they're really charming for sure.
[imagining a 2x1 px-sq shoe, 3x1px-sq sword.
]