Warscale - Turn starts
by Guimo · 04/07/2008 (10:49 pm) · 0 comments
Hi all,
One week has passed since my last blog. The tasks to complete these week were:
a. Create a new map specific for warscale
Finished. Its just a flat terrain with a small pond in the center but it completely serves my initial purpose.
b. Allow avatars to enter the 3D simulation
Finished. The Avatars enter the game in its correct positions.
c. Allow initial turn effects to show in the 3D simulation[/b]
Partial. The events are captured and passed to the simulation but no particles yet.
d. Hard: Receive a new unit in hand and load its resources on the fly
Finished. The units are received and the AIPlayers are created. All the unit resources are loaded at server creation for faster loading times but the game is able to handle other units that may appear during the game. I think that in the future this also can be improved.
e. Hard: Load arcaneFX datablocks on the fly
Not completed. Just because i find that there are still other things more important than showing effects at this moment.
f. New: Orbit camera
I included and adjusted the Advanced camera in the engine so that it rotates around the game central point. I fixed a problem with the Orbit camera in order to ignore collisions against the terrain. This was required because the central point of the game is located at (0 0 100) on the terrain but the target point had an offset of 10 units under the terrain (0 0 90) With that offset the advanced camera was fooled and collided against the terrain. I just removed the collision tests on the camera and all was fine. I also adjusted the stating distance so it always starts at 35 units from the central point giving a better view of the game board. Key input was changed in order to allow to zoom in/out, rotate around the center and change your angle of view.
g. New: Unit bars
In Warscale, each unit has two bars on its head in order to display its life and mana. I was wondering how to implement this when I found the gui3DProjectionCtrl
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12055
I had to update the code so the bars resize with the distance. I also had to implement the relative resize fix which I found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2224
It is working wonderfully now. Thats what I like of this engine. There is a good chance that somebody has already solved any problem you have, just make the appropiate adjustments and contribute back so maybe other programmer in need ma benefit from it.
h. New: Grid
In the original Warscale, the terrains have a fancy border around them. Unfortunately, the TGE just wont allow that level of detail. But of course there is always some way to solve your problems. One of the reasons to move to Torque was to be able to create a more detailed scenery but on the other hand I still wanted to be able to draw the game area. Of course the solution was in the awesome AFX with its Zodiacs. A zodiac is a texture projection so I decided to create a nice 1024x1024 texture with all my game grid and borders and project it. The result is a nice grid on the terrain. I spent some time trying to figure things out but almighty Jeff Faust is always there to help.
i. Bug fixing
The starting code frenzy is slowing down. Now that Im on the testing phase, I tend to find a lot of bugs in my code but they are completely expected so no surprises at all. Except for a couple of bugs that make me feel like a beginner like the clasical if(%a = 0) {...} bug or the for(%i = 0; %i = %list.getCount(); i++) {...}. I feel that on the end the code frenzy has served its purpose.
The plan for this week
a. Finish the unit drawing so that the new units appear in the correct place in the game. This is almost finished.
b. Fix the game starting procedure. Each player should draw 5 units when the game starts.
c. Delay the event startup. The event processing should begin when the playGUI is shown so that the players see the units appear.
d. Syncronize the unit bars with the unit actual HitPoints and Mana and allow for updates.
e. Show cost information for units in hand.
e. Create the player information controls to show each avatar basic info like hitpoints, mana, number of units in hand, number of dead units, number of army units.
f. Create the game chat controls.
And the screenshots?
Not yet... but soon. I hope I have something to show next week.
Thats all for now. Good luck with your own games.
Guimo
One week has passed since my last blog. The tasks to complete these week were:
a. Create a new map specific for warscale
Finished. Its just a flat terrain with a small pond in the center but it completely serves my initial purpose.
b. Allow avatars to enter the 3D simulation
Finished. The Avatars enter the game in its correct positions.
c. Allow initial turn effects to show in the 3D simulation[/b]
Partial. The events are captured and passed to the simulation but no particles yet.
d. Hard: Receive a new unit in hand and load its resources on the fly
Finished. The units are received and the AIPlayers are created. All the unit resources are loaded at server creation for faster loading times but the game is able to handle other units that may appear during the game. I think that in the future this also can be improved.
e. Hard: Load arcaneFX datablocks on the fly
Not completed. Just because i find that there are still other things more important than showing effects at this moment.
f. New: Orbit camera
I included and adjusted the Advanced camera in the engine so that it rotates around the game central point. I fixed a problem with the Orbit camera in order to ignore collisions against the terrain. This was required because the central point of the game is located at (0 0 100) on the terrain but the target point had an offset of 10 units under the terrain (0 0 90) With that offset the advanced camera was fooled and collided against the terrain. I just removed the collision tests on the camera and all was fine. I also adjusted the stating distance so it always starts at 35 units from the central point giving a better view of the game board. Key input was changed in order to allow to zoom in/out, rotate around the center and change your angle of view.
g. New: Unit bars
In Warscale, each unit has two bars on its head in order to display its life and mana. I was wondering how to implement this when I found the gui3DProjectionCtrl
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12055
I had to update the code so the bars resize with the distance. I also had to implement the relative resize fix which I found here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2224
It is working wonderfully now. Thats what I like of this engine. There is a good chance that somebody has already solved any problem you have, just make the appropiate adjustments and contribute back so maybe other programmer in need ma benefit from it.
h. New: Grid
In the original Warscale, the terrains have a fancy border around them. Unfortunately, the TGE just wont allow that level of detail. But of course there is always some way to solve your problems. One of the reasons to move to Torque was to be able to create a more detailed scenery but on the other hand I still wanted to be able to draw the game area. Of course the solution was in the awesome AFX with its Zodiacs. A zodiac is a texture projection so I decided to create a nice 1024x1024 texture with all my game grid and borders and project it. The result is a nice grid on the terrain. I spent some time trying to figure things out but almighty Jeff Faust is always there to help.
i. Bug fixing
The starting code frenzy is slowing down. Now that Im on the testing phase, I tend to find a lot of bugs in my code but they are completely expected so no surprises at all. Except for a couple of bugs that make me feel like a beginner like the clasical if(%a = 0) {...} bug or the for(%i = 0; %i = %list.getCount(); i++) {...}. I feel that on the end the code frenzy has served its purpose.
The plan for this week
a. Finish the unit drawing so that the new units appear in the correct place in the game. This is almost finished.
b. Fix the game starting procedure. Each player should draw 5 units when the game starts.
c. Delay the event startup. The event processing should begin when the playGUI is shown so that the players see the units appear.
d. Syncronize the unit bars with the unit actual HitPoints and Mana and allow for updates.
e. Show cost information for units in hand.
e. Create the player information controls to show each avatar basic info like hitpoints, mana, number of units in hand, number of dead units, number of army units.
f. Create the game chat controls.
And the screenshots?
Not yet... but soon. I hope I have something to show next week.
Thats all for now. Good luck with your own games.
Guimo