Posts tagged Torque
TGB 1.7.5 – Multiple Animations for Sprite
It seems that once again I’ve heard the call to write a one-shot tutorial (and strangely enough, this one is also one related to animations). This time, the call for help comes from a user on the GarageGames forums, from a user jumping into the Torque engine line with Torque Game Builder 1.7.5. I have a great amount of respect and love for the Torque engines, and the GarageGames team and community have a lot of people that are really fun to be around (in contrast to my experience with the Unity boards, which seems to have no shortage of elitists).
Once again, we will be writing up a Zelda-like animation, because the file’s on-hand and already formatted and somewhat optimized for our use. And so, if you don’t have it from following previous tutorials, here it is again:
(more…)
iTGB #include Case Sensitivity Fix
iTGB, the iOS version of GarageGames’ Torque 2D game engine (also known as Torque Game Builder), has some case-sensitivity issues within its #include directives. For default installations of Mac OS X, this isn’t going to cause any problems. But for people (like me) that chose to format their Mac’s hard drive as case-sensitive, there will be some initial build errors. Here are the ones I ran into with iT2D 1.4.1 and iT2D 1.5 Preview 1:
File: t2d/t2dParticleEffect.cc
Replace:
#include "math/mrect.h"
With:
#include "math/mRect.h"
File: platformiPhone/platformGL.h
Replace:
#include "platformIPhone/iPhoneGL2ES.h"
With:
#include "platformiPhone/iPhoneGL2ES.h"
File: platformiPhone/iPhoneProfiler.h
Replace:
#include "core/TorqueConfig.h"
With:
#include "core/torqueConfig.h"
File: platformiPhone/iPhoneUtil.h
Replace:
#include "game/net/tcpobject.h"
With:
#include "game/net/tcpObject.h"
File: platformiPhone/iPhoneConsole.h
Replace:
#include "Platform/event.h"
With:
#include "platform/event.h"
File: platformiPhone/iPhoneFont.mm
Replace:
#include "Math/mRect.h"
With:
#include "math/mRect.h"
File: platformiPhone/iPhoneMutex.mm
Replace:
#include "util/safedelete.h"
With:
#include "util/safeDelete.h"
File: platformiphone/menus/popupMenu.m”
Replace:
#include "platform/menus/popupmenu.h"
With:
#include "platform/menus/popupMenu.h"
TGB Editor Fix (Windows/Aero/OpenGL)
Anybody who runs TGB on Windows Vista/7 and has an ATI card has noticed this problem. (For some reason, I don’t think it happens on nVidia cards, but this will likely fix it there as well, if the problem does exist). This fix will allow you to maximize, resize, and minimize your Torque 2D editor window without having the offset problem, and this does not harm any other aspect of the editor that I have noticed.
Note that to do this fix, you will need to have the Pro edition, as it requires modification of the T2D source code. First, open “T2D SDK.rc” and create a new menu. You need to make sure that you add at least one menu option to it (I just entered a space) so that it will render the menu bar (which is the entire base of this fix). After doing this, you will need to update game/resource.h to include the menu identifier, since winWindow.cc includes that file rather than the root resource.h created by the Resource Editor.
File: game/resource.h
Find:
#define IDI_ICON1 107
Add After:
#define IDR_MENU1 108
File: winWindow.cc
Function: CreateOpenGLWindow
Line: Approx 1369 (1.7.5, unmodified)
Replace:
return CreateWindowExW(
exWindowStyle,
windowClassName,
windowName,
windowStyle,
0, 0, width, height,
NULL, NULL,
winState.appInstance,
NULL);
With:
return CreateWindowExW(
exWindowStyle,
windowClassName,
windowName,
windowStyle,
0, 0, width, height,
#ifdef TORQUE_TOOLS
NULL, LoadMenu(winState.appInstance, MAKEINTRESOURCE(IDR_MENU1)),
#else
NULL, NULL,
#endif
winState.appInstance,
NULL);

