JanZelinka

Hello,

Can you recommend how would you solve this?

We are building browser-based game developed in MEAN stack. We will have interactive battles (Phaser/Unity/depends what developer suggests).

Each player can change equipment of his hero in www page, but when you attack a player, it opens interactive battlefield. How can we implement Spine animations in the best way possible? Player character will be always built dynamically depending what he wear before battle.

Friend said, make 1 big atlas file and then just pick what you need. But this file has a limit. What if we reach it... and might be big for internet connection.

I would like to have separate file for each animation so we pick in code what should load.

Anyone who can help?
JanZelinka
  • 記事: 5

Harald

In general this seems like a rather standard use case, I can see nothing obviously problematic here.
It depends on the size and number of attachment images that you are talking about here.
JanZelinka さんが書きました:Friend said, make 1 big atlas file and then just pick what you need. But this file has a limit. What if we reach it... and might be big for internet connection.
If you reach the limit of the single large atlas, then you will have two or more atlas pages (created automatically), still no problem. Regarding internet connection, a few atlas textures should not be a problem. If they are, then you could create more smaller atlas textures and stream only those that are currently needed.
It also depends on how many items you need to show to the player at a single time - when you can choose from e.g. all character outfits or equipment items, then you will have to stream these to the player anyway, even if only a few are selected and displayed on the combined skin in the end.

When using spine-unity: If you only have few characters active at once, using only a small fraction of your atlas pages, you could repack the atlas at runtime, so the new atlas is only composed of used parts. The spine-unity runtime comes with some Mix and Match example scenes that demonstrate how you can do this.

For general information about combining skins and the new skin API, you could check out the links in this posting by Nate: Combining Skins
アバター
Harald

Harri
  • 記事: 2076

JanZelinka

Thanks for valuable post!
JanZelinka
  • 記事: 5


Return to Networking