Jump to content

Swapping and hiding images


jmcmorris

Recommended Posts

Hello and congratulations on your Kickstarter success. I have a question about swapping and hiding images in the current spriter beta. From what I understand this is a feature that was available in the old spriter and has not made it's way into the new spriter. Please correct me if I am wrong. I am looking into implementing spriter into my game engine but these two things are a must and I am wondering the best way to go about achieving this.

I have looked through the SCML format and from what I can see there is no reference to images beyond the frame that it is being used it. Consequently, my current plan is to use a placeholder image and then use this as a key to map to the images. This should give me means to gaining access to the images and modifying them (swap and hide). Any ideas? Is there a better way to go this?

Thanks,

Jasson

Link to comment
Share on other sites

Hi jmcmorris,

Thanks for the kind words. Yes, you are correct that CharMaps have not yet been added to the new Spriter, but the are a very high priority for us as well.

If you need to create custom support for Char Maps as quickly as possible, you can use the same logic that we used for the original Spriter.. Spriter swaps or hides images based on the folder they are in. So its simply a matter of checking whichg folder an image is from, and either not displaying it or swapping it with a same-naled image from a different folder.

So , you'd need to add an aditional data file, or add additional data to the Spriter file which is a list of Charmaps, which designate what to do in the case of specific folders for each Char Map.

I hope this helps. Of course Edgar will get these key Spriter features working in the new Spriter as soon as possible...the current hope is to get all the original Spriter features working in the new spriter in the 6 to 9 month range...of course updates will be released as he makes progress with each feature, so the wait for char maps should be considerably shorter.

cheers,

Mike@Brashmonkey

Link to comment
Share on other sites

Thanks Mike for the quick response. That is a good suggestion and if CharMaps are going to be implemented similarly in the new Spriter then hopefully my implementation wont have to change much once it is released. I definitely look forward to updates! Thanks again!

Link to comment
Share on other sites

Or you could just add code in your game to swap a certain image id with a specific image based on criteria. Just a thought. I have not had time yet to delve into the data files. Are there even image ids?

Link to comment
Share on other sites

The closest you have to an image id is the image file path. I have scripts (python) that define my entities, such as players, and in these scripts I create a mapping between nice image ids and the image file paths. This should give me everything I need. Also this is close to the CharMaps feature in Spriter, which means it will be easy to replace my map with the CharMaps when that feature is released.

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.

  • Recently Browsing   0 members

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