Warscale 62 - Half life... or living between tiles
by Guimo · 03/31/2010 (4:45 pm) · 1 comments
Hi everybody!
Fortunately for you, this will be my last blog for at least a month. Im leaving on vacation with my family on Sunday and need to get everything ready for my trip... I plan to drink so much my code will not be able to find its way to the compiler...
So going directly to the point... Warscale. It has been a week since my last blog so my ego requests to give some updates.
What was planned
The game startup procedure has been improved, lots of packet transmission have been simplified so now I don't get that nasty bug where the avatar becomes transparent.
The 'A' key for attack and 'M' key for move now verifies if the unit has enough attack or movement points and prints some information accordingly.
The avatar name now appears in the middle of the change buttons in the avatar selection screen.
What wasnt planned
Do you know the feeling when something in your game is just not right? Sometimes you really dont want to implement some feature because it may be overtly complicated and you program a good enough solution and thats ok. On the end we are indies and we have to develop a lots of things.
But while everything is working fine the thing burns in your brain like an ice cream headache and even when you are working in other things your mind wanders back trying to solve the problem.
Warscale is a tile based game so it is expected that each unit is located in one or more tiles. The game can handle 5 creature sizes: medium, large, huge, gargantuan and colossal. Originally I implemented everything so that the center of a unit was always on a tile, so a small unit used a single tile, but a large unit looked something like this:
00000 00000 00000 00100 01110
00000 00100 01110 01110 11111
00100 01110 01110 11111 11111
00000 00100 01110 01110 11111
00000 00000 00000 00100 01110
sml med hug gar col
1 5 9 13 21
The benefit of this approach is that in all the cases, the center of a unit is always a tile coordinate and that simplifies the computations. The problem is that it becomes too complicated for the player to understand which areas are being occupied.
Now... enter D&D 4Ed or what I like to call D&D for Dummies (a friend calls it D&D Cookie Maker as all the characters get out of the oven with the same attributes). Granted, it is not the best RPG in existence but it has managed to simplify the rules so much that its become great for computer implementation. You can't deny some simplification is good.
In D&D 4th Ed the battles are run in a grid. The size of the creatures has been simplified to medium = 1x1, large = 2x2, huge = 3x3, gargantuan = 4x4, colossal = 5x5 which is simple to understand for everybody and follows a great mathematical curve. The only problem is that for a 2x2 and 4x4 creatures there is no central tile so everything becomes a little more complicated.
So, I was working on this problem during this week. In the process I was forced to clean a lot of functions, drop others and simplify a lot of code. Again the test cases came in my help and allowed me to cleanse a ton of bugs. The result, after adjusting the selectrons under the creatures, is this:
As you see, each creature has its area marked with a coloured square so it becomes easier to identify which squares are being used by each creature and the the creature team. The game has been updated to acceps a displacement on the game coordinates depending on the unit size allowing for half tile positions.
All in all a great plus and makes the engine easier to move to a D&D game table which I have planned in the future
Battle logs
Every action executed by the players is now recorded in a battle log. When the battle finishes, I have an exact execution of the game so I can rebuild the game from that information. I still need to build a compiler for the log so I can really rerun the game but its a good thing to have in order to debug.
The plan for this month
Eat and drink and party basically all the month. I will leave my son with his grandpareants so I will be flee with my wife and will be able to see Clash of the Titans for once.
Announcing Closed Beta
I really hope to have a closed beta in two months (give me one month after my vacations to recover from the debauchery). Interested people send me a mail to guimo at spritekin dot com
Luck with your projects and see you in a month!
Guimo

Associate Steve Acaster
[YorkshireRifles.com]