1
\$\begingroup\$

I have a 2D game made in XNA-4.0. I am brainstorming on how to implement a system of equipment where I can draw one Texture, and rotate/scale it to my character's current animation without haveing to create a seperate Atlas for each Weapon/Gear Piece.

Right Now I have a Default Character Sprite Sheet that I use, and For each Item I wish to incorporate into the game, I draw it onto the Sprite Sheet, remove the character from the sprite sheet, then draw the new Sprite Sheet with just the visible parts of the given piece of equipment. It works very well, and looks great... The only problem is that It requires a lot of work for each piece of gear I implement into the game.

Originally my hope was to Create one image, and have a system in place that can alter the texture as required to rotate and move with my hero's animations. Since I am in 2D, I am restricted to Scaling and rotation images.

Is this goal of creating one image even a possibility? If so I would love any direction to as how this might be achieved.

\$\endgroup\$
2
  • \$\begingroup\$ Are you wanting something like Terraria or Starbound have? wscont2.apps.microsoft.com/winstore/1x/… \$\endgroup\$ Commented Oct 2, 2014 at 19:51
  • \$\begingroup\$ I am doing an Isometric 2D Action RPG. Much like your traditional Path of Exile or Diablo II. \$\endgroup\$
    – Shroeder
    Commented Oct 2, 2014 at 20:21

1 Answer 1

1
\$\begingroup\$

If you are doing a classic 2d platformer (which you [the OP] are not [this answer is directed at people who are doing it]) then you could use something like DragonBones (open source). Even in your situation, you could make some considerations and implement something like this.

If you must have the tool look perfect from a lot of angles and can't compromise on the variety of angles and authenticity then you need to make the animation in 3d, attach the tool to the animated model and render away (this of course would result in the texture atlas you wanted to avoid).

To get one image of a 2d tool looking good, you have to keep it bound to one plain. This means it cannot be moved very freely and will only look good when it's viewed from the side while most 2d rpg let your see the character from 4 - directions, this looks best when you can see the character only from the left or the right side of it.

You can also make one tool of each type, i.e sword, staff, mace and etc. , then use different color color palettes to get multiple similar but slightly different results.

\$\endgroup\$
2
  • \$\begingroup\$ Hi @Shroeder, what you can consider is the following: Old games used color pallets a lot to save on work and memory. You could re-use the same sword many times by swapping the colors. \$\endgroup\$
    – AturSams
    Commented Oct 3, 2014 at 8:36
  • \$\begingroup\$ I currently swap colors and use Custom textures for Unique swords. My item schema requires that I have a different Item for each 24-32 Item level. For example, a two-hander you find at level 10 looks less significant that one that has an item level of 60 \$\endgroup\$
    – Shroeder
    Commented Oct 3, 2014 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .