Thursday, May 31, 2012

Weapons and Armor

Hand...hurts...

Come to find out that 540 weapon sprites, all painstakingly drawn pixel by pixel, is actually kinda like work.


Now, you may notice that they all look almost exactly the same.  I did copy and paste the forms and then painted over them with the "Material" color.  The idea is that each weapon has stats that will be effected by the material that they are made from.  The same with armor.  Potions will work a little differently, where there will be "levels" of potions all having the same effect but with increased efficiency.  Magic, I'm still up in the air on.  I know that there will be crystals that are used to cast spells, but I still don't really know how you make the spells more powerful.  A dilemma for another evening, I do believe.

2 comments:

  1. Being a game developer myself I have to say that you need to follow the DRY (Don't Repeat Yourself) rule. Handling the different variations of each weapon (Wood Sword, Wood Sword with Enchant) isn't effective in neither code nor performance. Instead, store the enchant effect for swords, axes, hammers, maces etc, and the unenchanted versions of each weapon, and then just draw the enchant effect (appropriate to the weapon of course) upon the unenchanted weapon, when you want to draw the enchanted weapon.

    //Sillen from the Minecraft forums

    ReplyDelete
    Replies
    1. Wish I had thought of that. The code end of it is using a base then material then enchantment. It calls on the tilemap by row for the weapon then column for material, then it adds +10 to the column if the weapon is enchanted. It certainly would have been cleaner to do a separate sprite for enchantment glows. I'll definitely be referring to this comment when I do my post-development cleanup. Thank you :)

      Delete