Jump to content

Sprite sheet without JSON file


AntoniaChimp
 Share

Recommended Posts

If there's no rotation involved making a spritesheet parser for any tool is very easy even for people who hate math. It comes usually with a xml or json that lists frames with position, dimension, and names. You extract those names in a loop, create rectangles out of position/dimension, put everything in a dic and voila, now you can run another loop to create texture from the main texture and pass along those frames(rectangles) you created when parsing. NO MATH involved.

Link to comment
Share on other sites

NO MATH involved.

My nightmare.

Let me tell you about D8 Group! https://en.wikipedia.org/wiki/Dihedral_group It has 16 elements, all rotations of octagon. 12-th rotation will be FlipX, thus you can specify "texture.rotate=12" and all sprites that have that texture will be flipped horizontally! See? Its easy!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...