
Tahapan selanjutnya yang telah dibuat adalah:
+ dialog UI untuk melakukan attack/defense/escape dari pertarungan.


$aimTarget = 0;
function GameConnection::AimTarget( %this )
{
if($aimTarget)
{
%player = %this.player;
%target = $aimTarget;
%playerTrans = (%player.getTransform());
%xPlayer = getWord(%playerTrans, 0);
%yPlayer = getWord(%playerTrans, 1);
%zRot = getWord(%playerTrans, 5);
%playerRot = getWord(%playerTrans, 6);
%targetPosition = (%target.getPosition());
%xTarget = getWord(%targetPosition, 0);
%yTarget = getWord(%targetPosition, 1);
%xDiff = %xTarget - %xPlayer;
%yDiff = %yTarget - %yPlayer;
// dont have to change it to degrees
// torque engine automatically change it to degrees
%rotToTarget = mAtan(%xDiff, %yDiff);
if(%zRot < 0)
%playerRot = (2 * 22/7) - %playerRot;
// multiply by -1 because the rotation in 3dspace is
// oppositing the guiobjectview rotation
%rotation = -1 * (%rotToTarget - %playerRot);
commandToClient(%this, 'SetDirection', %rotation);
}
%this.schedule(100, AimTarget);
}
new GuiObjectView(direction) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "bottom";
position = "244 94";
Extent = "149 149";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
applyFilterToChildren = "1";
cameraZRot = "0";
forceFOV = "0";
lightDirection = "-0.57735 -0.57735 -0.57735";
lightColor = "0.6 0.58 0.5 1";
ambientColor = "0.3 0.3 0.3 1";
emapAmount = "1";
};
function PlayGui::onWake(%this)
{
// Turn off any shell sounds...
// alxStop( ... );
$enableDirectInput = "1";
activateDirectInput();
direction.setObject("gb","mod/data/shapes/direction/arrow.dts","","");
// Activate the game's action map
moveMap.push();
}
function clientCmdSetDirection(%rotation)
{
direction.setRotation(0, %rotation );
}
visit http://www.herusan.com/xmas to try the game! ho ho ho

Main Menu
Host Game Menu
Join/Challenge Menu
Loading the game
before the game started
well the game started, start typing!!!
my first xna very simple game - space shooting, adopting from Beginning XNA game programming 2.0 with some modification on chapter 3.
here's the code http://www.geocities.com/herrudarmadi/WindowsGame1.zip feel free to modify and do some trial error
Sometimes you dont want your engine used by other, so why dont use watermark ?
add this snippet to your engine/gui/core/guicanvas.cc on void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */) exactly after
if (cursorON && mouseCursor && mShowCursor)
{
Point2I pos((S32)cursorPt.x, (S32)cursorPt.y);
Point2I spot = mouseCursor->getHotSpot();
pos -= spot;
mouseCursor->render(pos);
}
This is the code, and after adding this you should rebuild the engine.
// enable/disable watermark ?
bool WT = true;
if(WT)
{
// get the default profile for text
GuiControlProfile *mtProfile;
mtProfile = NULL;
// Ok lets check to see if that worked
if( !mtProfile ) {
SimObject *obj = Sim::findObject( "GuiDefaultProfile" );
if( obj )
mtProfile = dynamic_cast(obj);
else
return;
}
if(mtProfile)
{
// changed the text into your watermark text
const char* wtText = "TGE Licenced HD";
ColorF mForegroundColor;
mForegroundColor.set( 1, 1, 1, 1 );
ColorI mFillColor;
//Vars used:
//Screensize (for position check)
//Offset to get position of cursor
//textBounds for text extent.
Point2I offset;
Point2I textBounds;
S32 textWidth = mtProfile->mFont->getStrWidth(renderTip);
//Create text bounds.
textBounds.x = textWidth+8;
textBounds.y = mtProfile->mFont->getHeight() + 4;
//Offset below cursor image
offset.y = size.y - textBounds.y - 10;
offset.x = size.x - textBounds.x - 10;
// Set rectangle for the box, and set the clip rectangle.
RectI rect(offset, textBounds);
dglSetClipRect(rect);
mFillColor.set(0,0,0,255);
dglDrawRectFill(rect, mFillColor);
mFillColor.set(255,255,255,255);
dglDrawRect( rect, mFillColor );
// Draw the text centered in the tool tip box
dglSetBitmapModulation( mForegroundColor );
Point2I start;
start.set( ( textBounds.x - textWidth) / 2, ( textBounds.y - mtProfile->mFont->getHeight() ) / 2 );
dglDrawText( mtProfile->mFont, start + offset, wtText, mtProfile->mFontColors );
dglClearBitmapModulation();
// end hd watermark
}
// free the pointer ?
mtProfile = NULL;
}
#include "StdAfx.h"
#include "Testing.h"
#include "IntelGamingTDKAPI.h"
#define _CRTDBG_MAP_ALLOC
#include
#include
#include
#include
using namespace std;
#ifdef _DEBUG
#define SET_CRT_DEBUG_FIELD(a) \
_CrtSetDbgFlag((a) _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
#define CLEAR_CRT_DEBUG_FIELD(a) \
_CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
#else
#define SET_CRT_DEBUG_FIELD(a) ((void) 0)
#define CLEAR_CRT_DEBUG_FIELD(a) ((void) 0)
#endif
Testing::Testing(void)
{
Feature();
}
void Testing::Feature()
{
IntelLaptopGamingTDKInterface *IGT = IntelLaptopGamingTDKInterface::GetTDKInterface();
if(!IGT)
return;
/**
* Is this a laptop ??
*/
cout << "\nIS LAPTOP ? " <<>IsLaptop();
/**
* Get number of core on per physical processor
*/
cout << "\nCPU CORE ? " <<>GetNumCoresPerProcessor();
/**
* Get total number of processors as seen by OS
*/
cout << "\nCPU COUNT ? " <GetNumProcessors();
// and just try the other methods..
// Memory leaks checking
// 6 mem leaks because pointers on heap aren't deleted till function
// exits. We call this function before the pointers go out of scope.
_CrtDumpMemoryLeaks();
}
Testing::~Testing(void)
{
}
I use VC 2005 for the compiler.
Following are the steps to compile your code using this API.
Have fun and cheers.
Cheers!
Day 1 of makin my 3d office using torque constructor for the first time! its kinda fun hehe.. then adding some objects that i've created using milkshape (tables, cpu, and lcd). thx to FRP again for the wall textures. I love rabbids so there they are ^^. 
Day 2 changed lcd to crt monitors :D added some IFL(Image File Lists) animation for the screens. added chairs and put some pc's on the tables. and make the scene more toonish using outline mod.
Hehe cant wait till tomorrow !!
Veeery low poly !!!