Post news RSS Progress Update #4

As promised the second weekly devlog of the summer. This week was all about fixing our combat system.

Posted by on

Hey all, last week was about fixing the combat system. We ended up redoing and refactoring the entire system. It took us about a week and a half of fulltime work to complete but now it is here. The new system fixes all of our old bugs, which were quite a lot.

We originally started the project by writing the combat system, because of this we made most of our programming mistakes here. It also turns out that the type of turn based combat we’re doing is much more complex than we anticipated. Back then, with our limited experience, we somehow got the combat working and then we just started adding new features, like items, abilities, etc. After working with an ever growing “CombatController” class that kept growing in complexity we reached a point at which we simply couldn’t fix the bugs anymore. The code had become to hard to understand and changing a small thing would introduce a few new bugs.

HB Battle

The old system, it worked, but barely.

The CombatController had grown to about 1200 lines, but all code relating to the combat system was closer to 2500 lines all interwoven with each other. Our fix was to refactor and rewrite the whole system. The combat controller now is a neat 250 lines and code is written in a cohesive way, that actually allows us to add new features without Arjen growing more gray hairs. We’ve split most of the old functionality of the CombatController in new classes. The new system is a big upgrade and our old bugs are gone now.

Combat still looks like a mess but at least it is working as it is supposed to.

Currently our combat is very similar to other turn based RPGs. Pokemon was our initial inspiration, the thing our system allows players to do that you cannot do in pokemon is stack effects and abilities. Players can customize their demons making them stronger but also changing their attacks. For example certain abilities allow the player to lifesteal when using certain types of skills while others deal true damage on top of the used skill. There is a total of 14 abilities now which still need a lot of work and balancing, but the groundwork is there.

Next week we’ll focus on improving the combat graphics and working towards a demo. We’ll have a bit less time to work with but it’ll be alright.

Take care,
Jop and Arjen.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.