Sprite Sheet Resulting on Unwanted Horizontal Motion
Posted: Fri Dec 21, 2012 5:23 am
These are probably noob questions and it's my first sprite sheet. I mashed up the following in GIMP, which is suppose to be the top view of a soldier walking.
This worked fine at first and the animation played in Game Editor as though the soldier was walking on the same spot. I then adjusted the layer sizes and cropped the edges of the canvas a bit (what you see above is the latest version, i.e., after the canvas cropping). When I load this in Game Editor, the animation moves horizontally and then restarts at the initial position. It looks like Game Editor is assuming that each frame is horizontally displaces a bit further than the previous one, resulting in a horizontal motion.
I performed this cropping because I wanted to center the individual layers in GIMP so that each soldier image in the sprite could be rotated around the central axis (so it looked as though he was actually turning and not jumping to a different position). I now have 16 sprite sheets (each containing the above animation but with each soldier rotated by an additional 22.5 degrees). Can I combine all these into a single sprite sheet and use this instead? It would help reduce the number of files in my "data" folder. How would I let Game Editor know which range of pictures to play at a given point of time? I'm guessing something on the lines of animpos, but would I need to write code to loop through each range of animations each time? Or is there a simpler way?
This worked fine at first and the animation played in Game Editor as though the soldier was walking on the same spot. I then adjusted the layer sizes and cropped the edges of the canvas a bit (what you see above is the latest version, i.e., after the canvas cropping). When I load this in Game Editor, the animation moves horizontally and then restarts at the initial position. It looks like Game Editor is assuming that each frame is horizontally displaces a bit further than the previous one, resulting in a horizontal motion.
I performed this cropping because I wanted to center the individual layers in GIMP so that each soldier image in the sprite could be rotated around the central axis (so it looked as though he was actually turning and not jumping to a different position). I now have 16 sprite sheets (each containing the above animation but with each soldier rotated by an additional 22.5 degrees). Can I combine all these into a single sprite sheet and use this instead? It would help reduce the number of files in my "data" folder. How would I let Game Editor know which range of pictures to play at a given point of time? I'm guessing something on the lines of animpos, but would I need to write code to loop through each range of animations each time? Or is there a simpler way?