October 5, 2012

Combatics Evolution Movement Rules

I figure I should provide an update on the changes coming to the combat system. Since I'll be working on a 'block' like map system there are now a few new rules I need to consider for movement. Currently, the rules are fixed for all units, but I am considering the possibility of them becoming more dynamic in the future.

Below is an image showing the current ways a unit can move from a block to an adjacent block. Imagine the character is on top of the light blue block. They are able to move to any green block immediately beside them. This assumes there isn't a block in the way, as characters occupy two blocks above the ground.

Movement System post-0.1.4
I am about to begin the transition from the old map system to the new map system for combat. I have a few more things to tweak in order for this to happen, and I now have an excuse to create abilities using the 'builder pattern' (Software design terminology). All my current ability implementations will need to be updated to the new system, my current AI shouldn't require any changes (this is why modular code is awesome). If I don't complete the upgrade before my next update, then the old combat system will still be there (again, modular code rocks).

If you haven't gotten the picture yet, make sure your code is modular... my game is a perfect example of why you want to keep your code very flexible. Also, copy and paste is a sin when it comes to programming. I could probably rant for a few pages about why I feel sorry for companies who hire new graduates. Particularly the ones which have very little experience with good programming practices... something that seems to be completely overlooked in undergraduate degrees. Honestly, why universities give degrees in computer science and software engineering without making students take a course (or two) on 'clean code' baffles my mind.


No comments :

Post a Comment