Jump to content
  • Advertisement
Sign in to follow this  
Sgt slayer13

Help creating sprite sheet

This topic is 880 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a top down space shooter. To fly the ship i'm trying to create a sprite sheet that has 72 images of the space ship on it, each ship rotated by 5 degrees more than the last one until the ship does a whole circle.

 

The problem is when i load my finished sheet into Yoyo Games game maker engine, the preview shows the ship sliding across the screen, as well as spinning around.

 

Does anyone have any ideas on what i'm doing wrong as i only want the ship to spin and not slide. I've attached an example of what i've done.

Share this post


Link to post
Share on other sites
Advertisement

Image width: 1200px

Sprites count: 72 images.

Sprite width: 1200/72=16.6667 px

 

It's uncommon to have sprite size as fractional number.

I'm not familiar with Yoyo, but it sounds like actual sprite width differs from what Yoyo guesses from your pic.

It was either rounded, or you didn't specify sprite size in that sheet correctly.

Share this post


Link to post
Share on other sites

I have never used Yoyo Games maker before but it's not possible for you to have the sprite rotate itself?

I also made a top-down view game before but I only needed to draw the character facing one direction and it rotates itself in the game.

Share this post


Link to post
Share on other sites

I have never used Yoyo Games maker before but it's not possible for you to have the sprite rotate itself?

I also made a top-down view game before but I only needed to draw the character facing one direction and it rotates itself in the game.

I think rotating the sprite needs a licensed version of Game maker, it did back when I last used it.

 

Using sprite sheets is a cost heavy work around, you can also use code to rotate the sprites.

Share this post


Link to post
Share on other sites

I think rotating the sprite needs a licensed version of Game maker, it did back when I last used it.

 

 

 

Using sprite sheets is a cost heavy work around, you can also use code to rotate the sprites.

I checked the prices and it does seem expensive, especially the Master Collection option.

But I guess if you want to be able to do some real game-making, you may have to pay for it, unless you're skilled enough to code everything from scratch.

Share this post


Link to post
Share on other sites

The free version of GMStudio I believe handles the sprite rotating.  It appears now that they are more like Unity, with the free version being the complete engine, but forcing splash screen and not having all exports.  So, unless the lighting/shading is different on the sprite, you are better of just having the single frame(make it point right so it is at what GMStudio calls 0 degrees rotation), and then rotating it during gameplay.

 

I would have to see exactly what you mean by "sliding around."  If it was an issue with sprite offsetting due to rounding numbers or similar, then the ship would likely be jerky, shaking around instead of a sort of smooth sliding.  You might also run into issues with having it "split" into pieces due to it drawing the middle of the sprite.  Since I don't know exactly what is going on, it isn't easy to comment.

 

Another thing I can recommend that I always did when using GMStudio...I keep my sprite frames as separate PNGs, at least for the importing step.  If you are using some software that keeps all the sprite frames in a single file(like Pro Motion, Graphics Gale, and others), then when you export, export separate frames instead of a sprite sheet.  Just put them all into a single folder, and then when you import the sprite, select all the files.  This will ensure you not only have the hassle of checking what sprite offsets to use, saying how many frames it is, etc... because it is easy to simply select all files with Ctrl-A then to remember for each sprite how many frames it is.  And since GMStudio does texture packing on its own anyway, you aren't losing performance because the sprites are getting packed into atlas textures/sheets when you run the game(and when you build it).

Share this post


Link to post
Share on other sites
Maybe the location of the ship on the image is being copied to the screen location somehow. So as each frame is played and it moves Across the image this location is being transferred to the screen location. The place on the image will change based on the image you are drawing but the screen location its drawn to should always be the same for a still animation.

Share this post


Link to post
Share on other sites

Maybe the location of the ship on the image is being copied to the screen location somehow. So as each frame is played and it moves Across the image this location is being transferred to the screen location. The place on the image will change based on the image you are drawing but the screen location its drawn to should always be the same for a still animation.

I don't think that would be the case here.  GMStudio has the concept of "sprite center" which is the anchor point of the sprite, and then wherever the object is located, it draws it there.  It also serves for example to scale properly, say you want to anchor a sprite at the bottom, then if you scale it, it only goes up(and to the side if you scale that direction).  It scales and draws based on the anchor point.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!