Alternative to Overlapping of Sprites

Asked

Viewed 112 times

1

You’ve probably seen/played a game where you can change your character’s outfit/outfit/appearance.

I’m building a little game for Android that provides this function, and currently I get it using the technique of Overlapping sprites, which is basically having the character, and having the equipment drawn in a layer above. However, this makes me, every time I have a new idea of equipment (unique equipment, with different characteristics), I have to draw this piece of equipment in all existing positions (walking, using magic, jumping.. ). I’m also beginning to suspect that it consumes a huge amount of RAM (which can be a real problem on less powerful phones).

When I did some research, I saw a Reddit user suggesting to make the models in 3d, render and then use it as 2d, but I have no idea where to start doing it, and I’d like to see if there are other alternatives before trying this.

I was wondering if you could point me to an alternative to Overlapping, which would also allow me to create an efficient character customization.

Remembering I’m in a 2D environment

  • For a 3d model, wouldn’t it just be changing the texture of the object? Instead of using Overlapping?

  • @Matheus I think so, but my game runs in a 2D environment, I’ll put it more clearly in the question

  • One of the techniques I use to try to optimize performance is to create separate sprites for each situation. In your case it would be 1 Star for each armor and its sequence of movements. There is also another way demonstrated in this tutorial: https://www.youtube.com/watch?v=4qE8cuHI93c

  • @Matheus yes, I have separate sprites for each piece of armor/clothing and their situations. But for example, if the player equips a helmet of one set, a breastplate of another, a leggings of another and a glove of another, will be several sprites in memory :(

1 answer

1

I believe there are two possibilities, one of them similar to the one you said.

  1. Using a free plugin provided by Unity Technologies: https://www.assetstore.unity3d.com/en/#! /content/79840
  2. Imitate what the plugin mentioned above does: create a 3D model of sprites, with the character parts and animate in 3D. Then place the pieces of armor fixed to the respective Ones(bones). You can make specific bones for armor movement to look better.

In Unity you only have to hide the armor as needed.

  • Thank you very much, I’ll take a look

Browser other questions tagged

You are not signed in. Login or sign up in order to post.