Warscale 47 - Making it simple is not so simple
by Guimo · 09/19/2009 (6:39 am) · 4 comments
Hello to all the member of this wonderful community!
My last post was about three weeks ago (or it was four) and it has been completely hectic weeks. Starting from the event that my boss at work decided to upgrade the platform we were using for development in a move equivament to moving a TGE game to T3D but in this case involved moving ILOG 6.7 to ILOG 7, JBoss 4 to JBoss 5 and installing a dashboard in JBoss Portal and installing a secure transport. From these, moving to JBoss 4 to JBoss 5 was like entering labor work.
On other level, my wife was sent to the US for a conference. That means she left me with my son and I had to do all house chores, cook, take him to child care, spend a lot of time with him and also go to work. It was a lot of work but it also means that, after my son went to bed, I was free to do whathever I wanted... like (without anything better to do) programming my game.
As a reward, she got me the a luxury edition of A brief history of time and the Universe in a nutshell, illustrated and hardcover. THose are some of my favourite books. also she got me a history of Marvel... before Disney of course. And I think I will take that Wall-E and EVE figures she got for my son too.
On the Warscale front, I was forced to fix the magical system which led to rewriting of large portions of the code. Luky me I had all my test cases in place which were so useful for debugging. Also I had to fix a lot of things inside Torque in order to handle the rendering order to my convenience. Hard to analyze but is a quite straightforward solution.
So everything has come along and I hope things will be turning into a normal pace.
What was planned
New avatar
After cutting on all the equipment, one of the tasks was to change the avatar to the Dexsoft wizard. That model is quite interesting but unfortunately it has its defects. I had to code some transform solutions to handle some inverted mount points and the like but on the end it allows more flexibility in the model setup.
Wizard staffs
With less equipment to worry about, I was decided to add some interesting objects and for a Wizard the most interesting objects are the staffs. So I got this wonderful pack from Quotix.
[a]http://www.quotixsoftware.com/3dmodels_staves.htm[/a]
I also got some free models from Turbosquid.
So the first staff to implement was:
Staff of the Claw
All your creatures gain +1 damage.
This is a simple spell, when the staff enters play it generates an effect which makes all your creatures deal 1 extra damage on each attack.
The second staff proved way more complicated.
Staff of Bat Regeneation
Heal half of the melee damage deal on each attack.
This is a quite powerful staff because you will heal the damage dealt, not just the damage from the staff but all the damage. So if you have a steel broad sword in one hand (8-14 damage) and this staff in the other (1-8 damage) you may be dealing 9-22 damage on each attack and healing half that much.
But developing this was quite difficult as I had to account for so many different situations which werent handled in the previous magical system. In turn this led me to rewrite the spell and model editors.
Here is an image of the model store showing the wizard with a steel broadsword, the staff of the claw and the staff of bat regeneration in the top left corner.

The game board
Another thing which I found while working on the technical documents is that I was not using the game area in a proper way. There was so many things to gain from using the game board as an element of the game.
So I contacted a modeller and we ar enow working in making a proper game area. Here are some screenshots of the board using earth element tiles.



The idea is that each point in the board may change into other elements, so if you are using an army with lots of fire creatures, it may be beneficial to turn the terrain to fire. Basically each tile where a unit is standing and is from the same element provides 2 extra HP and 1 extra damage when attacking. An opposed element provides -2 HP and -1 damage when attacking. Also, some spells may use the terrain as a source for its power. So you can be sure there will be a lot of spells and creatures which play with the board element types and transform the shape of the game board.
Also, all the battle will take place inside a closed scenery like the table of a gods hall or a room in a wizard tower. This means the terrin wont be rendered at all.
What wasnt planned
Rewriting the magical system
As I mentioned, this was a major issue because it affected all the game and also the model editors. For me, it was very very hard to make everything work again. Fortunately my test cases were very useful. The moral is... ALWAYS have your test cases handy.
Game board rendering
The difficult part changing the board came when I learned that AFX 1.0.2 which I use wont project decals over TSStatic or StaticShapes. I will project only on interiors or terrain. After a brief conversation with Jeff Faust I learned that my options were to move to a higher AFX version or so some trick with the board. Switching AFX would be completely painful and if forced to do that I prefer switching completely to TGE which I dont want yet. So I chosed the second option.
The trick was to encase the board inside a completely transparent interior object. So I decided to implement the transparent DIF resource which allows to use a transparent texture on a DIF. Then I used a fully transparent texture and voila!!!... haha... you wish...
The problem is that even if the interior was not visible, the ZBuffer was still being filled so the board, which is a TSStatic inside the interior, was visible or not depending on the rendering order. And funny enough, the interior was always rendered first.
So in the end I decided to do something on the rendering order. I created two new rendering conatiners and a property called renderFirst. The containers were used one for images with transparency and the other for opaques. If an object has the renderFirst property active, it is sent into the appropiate container. After that, the scene is rendered so that the Sky goes first, the the terrain, then the first opaques, then the first transparents, then anything else. In m case this works beautifully and allows me to have zodiacs, decals, shadows and everything over the game board.
Removing the RTS creatures pack
I was using the RTS creature pack from Ori Cohen available in the Torque store but unfortunately there is some kind of problem between Warscale and the model animations so I had to remove those models. I have no explanation for this behaviour and trying to debug it was a PITA so I decided to remove them.
Now, dont take me wrong, I think those models are fantastic and in fact I'm using Ori's Orc model which has exactly the same setup but works flawlessly. Maybe its just somethin with one of my code changes which are numerous. I would really recommend these models to anyone.
The plan for this week (or weeks... depending on my schedule)
New tile elements
I will soon receive more elements for the tiles and I need to implement some way to switch the tiles datablock so that an earth tile transforms to anything else.
Adjust the items view
I after some bug fixes, the objects got a little out of position. I need to fix them so they show nicely in the model editor.
New staffs
I want to create the staff of fire bolts (1: deal 2-4 fire damage to target creature), and the staff of the pack (1:summon a wolf).
Thats all fow now. Thank you for reading all this.
Luck with your projects!
Guimo
My last post was about three weeks ago (or it was four) and it has been completely hectic weeks. Starting from the event that my boss at work decided to upgrade the platform we were using for development in a move equivament to moving a TGE game to T3D but in this case involved moving ILOG 6.7 to ILOG 7, JBoss 4 to JBoss 5 and installing a dashboard in JBoss Portal and installing a secure transport. From these, moving to JBoss 4 to JBoss 5 was like entering labor work.
On other level, my wife was sent to the US for a conference. That means she left me with my son and I had to do all house chores, cook, take him to child care, spend a lot of time with him and also go to work. It was a lot of work but it also means that, after my son went to bed, I was free to do whathever I wanted... like (without anything better to do) programming my game.
As a reward, she got me the a luxury edition of A brief history of time and the Universe in a nutshell, illustrated and hardcover. THose are some of my favourite books. also she got me a history of Marvel... before Disney of course. And I think I will take that Wall-E and EVE figures she got for my son too.
On the Warscale front, I was forced to fix the magical system which led to rewriting of large portions of the code. Luky me I had all my test cases in place which were so useful for debugging. Also I had to fix a lot of things inside Torque in order to handle the rendering order to my convenience. Hard to analyze but is a quite straightforward solution.
So everything has come along and I hope things will be turning into a normal pace.
What was planned
New avatar
After cutting on all the equipment, one of the tasks was to change the avatar to the Dexsoft wizard. That model is quite interesting but unfortunately it has its defects. I had to code some transform solutions to handle some inverted mount points and the like but on the end it allows more flexibility in the model setup.
Wizard staffs
With less equipment to worry about, I was decided to add some interesting objects and for a Wizard the most interesting objects are the staffs. So I got this wonderful pack from Quotix.
[a]http://www.quotixsoftware.com/3dmodels_staves.htm[/a]
I also got some free models from Turbosquid.
So the first staff to implement was:
Staff of the Claw
All your creatures gain +1 damage.
This is a simple spell, when the staff enters play it generates an effect which makes all your creatures deal 1 extra damage on each attack.
The second staff proved way more complicated.
Staff of Bat Regeneation
Heal half of the melee damage deal on each attack.
This is a quite powerful staff because you will heal the damage dealt, not just the damage from the staff but all the damage. So if you have a steel broad sword in one hand (8-14 damage) and this staff in the other (1-8 damage) you may be dealing 9-22 damage on each attack and healing half that much.
But developing this was quite difficult as I had to account for so many different situations which werent handled in the previous magical system. In turn this led me to rewrite the spell and model editors.
Here is an image of the model store showing the wizard with a steel broadsword, the staff of the claw and the staff of bat regeneration in the top left corner.
The game board
Another thing which I found while working on the technical documents is that I was not using the game area in a proper way. There was so many things to gain from using the game board as an element of the game.
So I contacted a modeller and we ar enow working in making a proper game area. Here are some screenshots of the board using earth element tiles.
The idea is that each point in the board may change into other elements, so if you are using an army with lots of fire creatures, it may be beneficial to turn the terrain to fire. Basically each tile where a unit is standing and is from the same element provides 2 extra HP and 1 extra damage when attacking. An opposed element provides -2 HP and -1 damage when attacking. Also, some spells may use the terrain as a source for its power. So you can be sure there will be a lot of spells and creatures which play with the board element types and transform the shape of the game board.
Also, all the battle will take place inside a closed scenery like the table of a gods hall or a room in a wizard tower. This means the terrin wont be rendered at all.
What wasnt planned
Rewriting the magical system
As I mentioned, this was a major issue because it affected all the game and also the model editors. For me, it was very very hard to make everything work again. Fortunately my test cases were very useful. The moral is... ALWAYS have your test cases handy.
Game board rendering
The difficult part changing the board came when I learned that AFX 1.0.2 which I use wont project decals over TSStatic or StaticShapes. I will project only on interiors or terrain. After a brief conversation with Jeff Faust I learned that my options were to move to a higher AFX version or so some trick with the board. Switching AFX would be completely painful and if forced to do that I prefer switching completely to TGE which I dont want yet. So I chosed the second option.
The trick was to encase the board inside a completely transparent interior object. So I decided to implement the transparent DIF resource which allows to use a transparent texture on a DIF. Then I used a fully transparent texture and voila!!!... haha... you wish...
The problem is that even if the interior was not visible, the ZBuffer was still being filled so the board, which is a TSStatic inside the interior, was visible or not depending on the rendering order. And funny enough, the interior was always rendered first.
So in the end I decided to do something on the rendering order. I created two new rendering conatiners and a property called renderFirst. The containers were used one for images with transparency and the other for opaques. If an object has the renderFirst property active, it is sent into the appropiate container. After that, the scene is rendered so that the Sky goes first, the the terrain, then the first opaques, then the first transparents, then anything else. In m case this works beautifully and allows me to have zodiacs, decals, shadows and everything over the game board.
Removing the RTS creatures pack
I was using the RTS creature pack from Ori Cohen available in the Torque store but unfortunately there is some kind of problem between Warscale and the model animations so I had to remove those models. I have no explanation for this behaviour and trying to debug it was a PITA so I decided to remove them.
Now, dont take me wrong, I think those models are fantastic and in fact I'm using Ori's Orc model which has exactly the same setup but works flawlessly. Maybe its just somethin with one of my code changes which are numerous. I would really recommend these models to anyone.
The plan for this week (or weeks... depending on my schedule)
New tile elements
I will soon receive more elements for the tiles and I need to implement some way to switch the tiles datablock so that an earth tile transforms to anything else.
Adjust the items view
I after some bug fixes, the objects got a little out of position. I need to fix them so they show nicely in the model editor.
New staffs
I want to create the staff of fire bolts (1: deal 2-4 fire damage to target creature), and the staff of the pack (1:summon a wolf).
Thats all fow now. Thank you for reading all this.
Luck with your projects!
Guimo
#2
09/19/2009 (9:18 pm)
Looks great, But In the Game board picture, I see how the aura around the bottom of the wizard extends to the terrain also..
#3
I have noticed the afxZodiacs project onto any interior or terrain in the same zaxis. Not a problem though because as I mentiones the board will be inside a closed scene so the terrain wont be visible and any projection against the scenery can be masked using some simple tricks.
ANother funny thing I found is that zodiacs are scaled with the interior they project onto. So if you project onto an interior and you scale the interior to be larger, then the zodiacs are scaled and look larger as well.
09/20/2009 (1:04 am)
Yes Michael! I have noticed the afxZodiacs project onto any interior or terrain in the same zaxis. Not a problem though because as I mentiones the board will be inside a closed scene so the terrain wont be visible and any projection against the scenery can be masked using some simple tricks.
ANother funny thing I found is that zodiacs are scaled with the interior they project onto. So if you project onto an interior and you scale the interior to be larger, then the zodiacs are scaled and look larger as well.
#4
As usual, it's great to see another progress update.
I have a couple of comments on the game board idea. For me, it has the visual affect of switching my perception to a battle between miniatures or avatars rather than a battle of actually creatures. For me visually, the game board decal on the ground was just a dividing of the game space, but the board forces me to perceive it as a chess match if you will.
This is not necessarily a bad thing. It just comes down to what you want the perception of the player to be.
If the board is what you want, then it frees you up to do some interesting things art-wise. Instead of having to have a background/surroundings to scale of the combatants, it can now be an out-of-scale representation of the environment. Even so much as a artistic interpretation or a caracature if you will.
Demigod comes to mind imdediately. Here's a couple of examples:


Anyway, good luck with the project and looking forward to more updates...
09/22/2009 (2:40 pm)
Hey Guimo,As usual, it's great to see another progress update.
I have a couple of comments on the game board idea. For me, it has the visual affect of switching my perception to a battle between miniatures or avatars rather than a battle of actually creatures. For me visually, the game board decal on the ground was just a dividing of the game space, but the board forces me to perceive it as a chess match if you will.
This is not necessarily a bad thing. It just comes down to what you want the perception of the player to be.
If the board is what you want, then it frees you up to do some interesting things art-wise. Instead of having to have a background/surroundings to scale of the combatants, it can now be an out-of-scale representation of the environment. Even so much as a artistic interpretation or a caracature if you will.
Demigod comes to mind imdediately. Here's a couple of examples:
Anyway, good luck with the project and looking forward to more updates...
Torque 3D Owner Steve YorkshireRifles Acaster