Wednesday, December 4, 2013

Heart Realm Update #009

Since the last update, I haven't had a lot of time to work on Heart Realm. I'm actively searching for work so that's been taking up a lot of my time.

This past week I've focused on reworking how data is imported into the game. I was using XML files to store all the necessary attributes of the various item/equipment types and enemy types but figured it was unnecessary to store any redundant data of similar objects. For example, there's no point in having multiple data objects of two similar Goblin enemy types when I could just make one Goblin base then create variations off that, inheriting all it's parent's attributes and simply changing whatever I need. Here's an example of what I mean:

<enemy id="goblin">
  <name>Goblin</name>
  <health>100</health>
  <damage min="15" max="20"/>
  <attackSpeed>140</attackSpeed>
  <armor>12</armor>
  <speed>105</speed>
</enemy>

<enemy id="goblin_warrior">
  <base>goblin</base>
  <name>Goblin Warrior</name>
  <damage min="18" max="24"/>
</enemy>

The point is, I don't have to re-enter all that same data multiple times, the game will just load the base object then make any necessary adjustments.

So that change in how I stored these pieces of game data will help keep the data files smaller, getting rid of any unnecessary redundancies. This past week I also looked into implementing Lua scripting into the game, again focusing on the game's data. I figured I could create various little scripts for a wide variety of things, from AI code, to spells and items. The point being it'll be much more flexible than creating a Java class for every spell type or AI type. Sure, I created an abstract class for something like attack effects like, Life Steal, Mana Burn, Armor Penetration, etc. but this will allow for more complex stuff so I don't need entirely new classes for all of these things. Each script can be almost entirely unique with a few necessary input functions.

That's about it for this update. I haven't really accomplished anything that's visually different, except adding the armor's data to the inventory screen now, so it displays that. Oh yeah, I also created a new enemy type, an Orc, though I'm not sure if I did this before the previous update or not, either way, here's a couple screenshots.



~ Rogue Templar

No comments:

Post a Comment