Heya guys, for the first time i want to try and develope a 2D platform fight game.
For the code im using the AnAL library for the animation, but the issue im having is with the sprites.
For instance this animation
The width isnt the same for all the frames, so i was wondering how do people usually deal with this. Do u use any programs or do you work manually and create a new sprite sheet?
Working with sprites
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Working with sprites
Well, either make the areas for each of the sprites the same size and move each image into the correct position, or add some x and y offset to the animation metadata to offset it correctly. It really depends on the game and the maximum size of the sprite overall when all frames are stacked on top of each other.
I don't know if AnAL allows for the offset so you might need to just make each quad the same size.
I don't know if AnAL allows for the offset so you might need to just make each quad the same size.
Re: Working with sprites
I +1 this, That would be so awesome if we could actually specify each frame's dimensions
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Working with sprites
If you write your own solution, you can though. And if space is tight, you need all the "compression" you can get, ie. not waste pixels on empty space just for equal frame sizes. But if it isn't, then you might as well make them the same size.Ulydev wrote:I +1 this, That would be so awesome if we could actually specify each frame's dimensions
Me and my stuff True 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.
Re: Working with sprites
Not really what you want but just screwing around waiting for a fix for my messed up computer - a result of upgrading to Windows 10 (drivers overwritten).
- Attachments
-
- testSprite.love
- (6.64 KiB) Downloaded 73 times
Re: Working with sprites
*cough self-advertisement cough*
You could try out my animation library, which allows you to use different sized images, among other things. It's not really tested yet, so you might be better off with Kikito's anim8.
You could try out my animation library, which allows you to use different sized images, among other things. It's not really tested yet, so you might be better off with Kikito's anim8.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Working with sprites
If no existing library suits your needs, don't feel afraid to implement your own. It doesn't have to be difficult, and you get precisely the behaviour you want.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: No registered users and 1 guest