Thursday, May 15, 2008

Today’s (and yesterday’s) work.

Unit’s are now ”fighting” when they’re standing in the same box. The background color is changed to indicate the current player. Also, a new round won’t start before the player chooses to (it gives the opponent time to turn around). The fighting event took a bit longer to make than expected, but there was no major issues rly.

The game is now fully playable. However, there are still a lot of things that can (and will) be done, including this:
- Adding text, life, etc to the interface
- Adding sound
- clean up the “main menu”

Sincerely,
the programmer

Monday, May 12, 2008

today’s work

Today I’ve start working on the “battle event” in the game. A player’s moves are now restored until the next player has done his – and then they’re executed. Also, a unit is now only movable one step at the time and then it’s turning gray to mark its unavailability.

Tuesday, May 6, 2008

Technical progress

Yesterday I implemented the “take turn effect”. Players are now only able to move their own units, while the opponents are shown as a large question marks. It is no longer possible to cross terrains as mountains or rivers (I’ve made a special component for this). To finish your round, simply hit the large candy-button at the right side of the screen (which now has a very nice graphical push-in effect, thanks to Pelle). Anyway, all in game sprites are now 80×80 sized, and are giving a clearer appearance.

Today I’ve mostly been polishing last day’s work and programmed that switch player button. I’ve also written a function called isMouseAboveObject, which takes a T2DSceneObject as argument and returns true or false depending on whether the cursor is above the object or not. I could mainly reuse old code for this from the earlier written isClickingOnObject-function.

The main issue the past days has been to change the objects’ sprites. The mainly cause to this is the lack of documentation in the Torque manual about it. There’s one small hint though that lead me to a solution:

“T2DStaticSprite is derived from T2DSceneObject but adds the ability to render a static sprite. A T2DSceneObject holds a reference to an existing RenderMaterial.”

Well, from that we get that there’s a class named RenderMaterial (and it’s located in GarageGames.Torque.Materials.RenderMaterial by the way) and it’s used to store our sprite. What we want to do is to get our material from the TorqueObjectDatabase and mount it on our object. In a T2DComponent it could look something like this:

 ((T2DStaticSprite)Owner).Material = (RenderMaterial)TorqueObjectDatabase.Instance.FindObject(“material name in TBX”);

It’s not looking that hard does it? But well, it took me a while to figure out. Anyway, if you haven’t read the sections “T2D and T2DComponents” and “Component System” in the Torque X User’s Guide documentation as a programmer I suggest you do – and read carefully.

Well, that’s about it for now. See you! =)

Sincerely,
Jonas

Monday, May 5, 2008

Monday Meeting May 5th (MMM5)

Report of last weeks progress:

Sounds are almost finished, must be re-recorded due to a loud-ass-computer but the foundation is there, should be able to have them recorded by tuesday.

The second level has been designed and should be ready to use.

The collisiondetection for terrain has been finished.

All in all, a weak week, due to only three days (yeah, people were hungover the last two days).

This week:

Design:Manual mostly, lots of writing to be done.
Programming: Program the turns, so that players get their own tactical round, also continue as much as possible if there is time for it.

Have a enjoyable week!