Game Development Community

Update compilation to TGE 1.4.0 stock

by Kai Ludwig · in Torque Game Engine · 03/24/2006 (6:23 am) · 19 replies

THREAD DEPRICIATED: new information located at www.garagegames.com/mg/forums/result.thread.php?qt=42154#324687

Hi folks.

I just took the changes to the stock TGE 1.4.0 distribution I made myself or with the help of the forums and compiled them into a patch. It includes some smoothing, extending and bugfixing of the starter.fps example. There were also a few bugfixes and extensions made to the core engine.

Special features:
- RMB now toogles Mouselook
- RigidShape physics added
- Ingame object selection added (with LMB)
- Ingame object pushing of RigidShapes added (Key "b")
- Ingame object moving/rotating/scaling added (select object, press and hold keys y, x, c, ctrl y, ctrl x, ctrl c, alt y, alt x, alt c and move mouse left/right)
- Inventory added (Key "i")

I tested everything and it should work fine.

I put it now up as a resource. Learned about forum resources to late ...

Usage: You HAVE to take a stock TGE 1.4.0 installation to apply the patch on it. That's it.

For now: <---URL deleted--->

Best regards,
Kai.


Changes made to TGE based von stock version 1.4.0
=================================================

Author: K. Ludwig / Kai@talentraspel.de / www.talentraspel.de / 24.03.2006

Changes to core engine:
- bugfix: Canvas setCursorPos() does not work (http://www.garagegames.com/mg/forums/result.thread.php?qt=19875)
- bugfix: World editor Axis Gizmo (http://www.garagegames.com/mg/forums/result.thread.php?qt=24825)
- bugfix: guiTextEditCtrl (http://www.garagegames.com/mg/forums/result.thread.php?qt=37002)
- Select-Object funtionality added (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7335)
- guiObjectView added (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4063)
- Script Array added (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4711)
- Some fixes for Script Array
- RigidShape added (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5495)
- RigidShape fakeMaskType added

Changes to game "start.fps":
Conveniance / Small bugs:
- Duplicate columnheading "Server Name" in joinServer.gui removed
- Changed a GuiControl in chatHud.gui to GuiModelessDialogProfile, to keep it from disturbing the object selection
- CrossHair in playGui.gui changed to GuiModelessDialogProfile
- Jumpdelay set to 0
- Toggle 1st/3rd-person changed to "v"
- Toggle Camera changed to "alt v"

Toggle Mouselook:
- Cursor now visible after start (playGui.gui)
- "Toggle Mouselook" on RMB added
- "Toggle Mouselook" keeps cursorposition when executing ToggleConsole (Bugfix: K. Ludwig)
- "Toggle Console" keeps cursorstate and cursorposition (Bugfix: K. Ludwig)

Ingame Object Selection
- Object Select added

Ingame Object Movement
- Object Push added (New: K. Ludwig)
- Object Move/Rotate/Scale added (New: K. Ludwig)

RigidShape
- Consolefunction "createRigidShapeBoulder" added
- rigidshape.cs added
- Rigidshape Body2Body Collision added (New: K. Ludwig)

Inventory
- Inventory added (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7514)

#1
03/24/2006 (10:28 am)
This does not install correctly at all. I have my 1.4 SDk installed at E:/Torque/SDK/

Now when I run the patcher and browse to E:/Torque/SDK/ the patcher errors out and tell me I have chosen the wrong folder
#2
03/24/2006 (1:25 pm)
Ok. Weird problem with the installer, but solved:

The patcher wants to start something after patching. That's not useful for torque, so I added an empty file "dummy.bat" in the TGE/TLK base directory and let the patcher execute the file after patching. I thought that solved the issue.

But the problem is that the patcher also looks for "dummy.bat" before patching. If this file was not found, the patcher assumes "wrong folder". I have overseen that problem while testing.

Solution: Just create an empty "dummy.bat" in your TGE/TLK base directory before patching. It works now, I tested it.

Regards,
Kai.
#3
03/24/2006 (4:01 pm)
Ok Added dummy.bat to the stock TLK directory and tried patching. some of it patched and some of it did not. heres the log

changes TGE 1.4.0.1.txt
- Attached file added successfully!

dummy.bat
- File updated successfully!

engine\console\arrayobject.cc
- Attached file added successfully!

engine\editor\worldEditor.cc
- Original file CRC error occurred, it has been skipped.

engine\game\fps\guiShapeNameHud.cc
- File updated successfully!

engine\game\gameConnection.cc
- File updated successfully!

engine\game\gameConnection.h
- Original file CRC error occurred, it has been skipped.

engine\game\gameTSCtrl.cc
- File updated successfully!

engine\game\gameTSCtrl.h
- File updated successfully!

engine\game\rigidShape.cc
- Attached file added successfully!

engine\game\rigidShape.h
- Attached file added successfully!

engine\game\shapeBase.cc
- Original file CRC error occurred, it has been skipped.

engine\game\shapeBase.h
- Original file CRC error occurred, it has been skipped.

engine\gui\controls\guiTextEditCtrl.cc
- File updated successfully!

engine\gui\core\guiCanvas.h
- File updated successfully!

engine\gui\core\guiObjectView.cc
- Attached file added successfully!

engine\gui\core\guiObjectView.h
- Attached file added successfully!

engine\platform\platformInput.h
- File updated successfully!

engine\platformWin32\winInput.cc
- File updated successfully!

example\main.cs
- Original file CRC error occurred, it has been skipped.

example\starter.fps\client\init.cs
- Original file CRC error occurred, it has been skipped.

example\starter.fps\client\scripts\client_commands.cs
- Attached file added successfully!

example\starter.fps\client\scripts\default.bind.cs
- File updated successfully!

example\starter.fps\client\scripts\optionsDlg.cs
- Original file CRC error occurred, it has been skipped.

example\starter.fps\client\scripts\playGui.cs
- File updated successfully!

example\starter.fps\client\scripts\serverConnection.cs
- File updated successfully!

example\starter.fps\client\ui\chatHud.gui
- File updated successfully!

example\starter.fps\client\ui\InventoryGui.gui
- Attached file added successfully!

example\starter.fps\client\ui\joinServerGui.gui
- File updated successfully!

example\starter.fps\client\ui\playGui.gui
- Original file CRC error occurred, it has been skipped.

example\starter.fps\data\missions\stronghold_d4bdd417.ml
- Attached file added successfully!

example\starter.fps\data\missions\stronghold_f4d4221.ml
- Attached file added successfully!

example\starter.fps\data\shapes\boulders\boulder.dts
- Attached file added successfully!

example\starter.fps\data\shapes\boulders\MossyRock02.png
- Attached file added successfully!

example\starter.fps\server\banlist.cs
- Attached file existed, it has been overwritten.

example\starter.fps\server\scripts\commands.cs
- File updated successfully!

example\starter.fps\server\scripts\game.cs
- Original file CRC error occurred, it has been skipped.

example\starter.fps\server\scripts\inventory.cs
- File updated successfully!

example\starter.fps\server\scripts\player.cs
- File updated successfully!

example\starter.fps\server\scripts\rigidshape.cs
- Attached file added successfully!

example\torqueDemo.exe
- Original file not existed, it has been skipped.
#4
03/24/2006 (4:53 pm)
Ok. I just tested a bit more and I think I found it:

You have TGE (Torque game engine) 1.4.0 and probably use the patch "tlk_update_1.4.0.1.exe" with is only for TLK (The ligthing kit from Synapse gaming) 1.4.0.

Please download the correct patch <---URL deleted---> and try again. Works fine for me.


BTW - If you get it to work try the following:

- Walk to a hut, select a medipack then press and hold for example "X" and move the mouse ... the medipac moves !!!

- Open the console and type "createRigidShapeBoulder(5,2);". There will be a boulder dropping at your CAMERA position (try "alt v"). If you walk over to the boulder and select it, try "b". It will push the boulder. And try shooting the boulder ...

Controls are a bit weird for now. I'll optimize them with my next patch that brings PERSISTANCE.


Regards,
Kai.
#5
03/24/2006 (5:36 pm)
Actually Both Worked I installed into a stock SDK install and into a stock TLK install and they installed with out a hitch
#6
03/24/2006 (8:11 pm)
How do you install this, what folder do i point it to in the TLK?
#7
03/25/2006 (12:06 am)
@Michael:

Glad to hear. Have fun with the changes. Please tell me, if you find any errors caused by them. And please excuse the poor/missing documentation, it would take so much time and I'm just programming for hobby.

The basic keys are:
- RMB now toogles Mouselook
- Ingame object selection added (with LMB)
- Ingame object pushing of RigidShapes added (Key "b")
- Ingame object moving/rotating/scaling added (select object, press and hold keys y, x, c, ctrl y, ctrl x, ctrl c, alt y, alt x, alt c and move mouse left/right)
- Inventory added (Key "i")

@Allyn:

You have to use a fresh version of TLK, because the patch assumes unchanged files. Next you have to create an empty file "dummy.bat" in the base directory of your TLK to calm down the god of patching. Then just start the patch, point it to your TLK installation and your done.

And please have in mind:
- Torque game engine (TGE) -> <---URL deleted--->
- The lighting kit (TLK) -> <---URL deleted--->


Regards,
Kai.
#8
03/25/2006 (6:41 am)
Kai what version are you compiling this with? I am having tons of problems compiling the TLK with Visual Studio 2005 Profesional and Visual Studio 2005 Express.
#9
03/25/2006 (6:44 am)
How do i make a dummy.bat and whats the name of the folder that i point the patcher to for TLK?
and does this require a re-compile?
#10
03/25/2006 (8:32 am)
@Allyn: *quote* "... point it to your TLK installation and your done."
This means the base directory of your installation, eg. "C:\Torque\TGE".

You don't need to compile. But to be able to compile, you have to read my comment for Michael.


@Michael:
I compile with Visual Studio 2003, but you should be able to migrate the project to Visual Studio 2005 Express. But it could also be that there are some settings missing in the vc7 folder.

Try this for TGE: <---URL deleted--->.
Try this for TLK: <---URL deleted--->.

Just replace your vc7 folder with it. I think i forgot to include this folder in the patch - sorry. But with your help and patience I can hope to get the next patch to public without errors.


Regards,
Kai.
#11
03/25/2006 (9:22 am)
Problem is, a clean install of the SDK dosnt create that folder.

Im assuming this patches part of the SDK also, (IE:.cc .h .etc..) i have tryed every folder in the stock install.

and i dont know how to create a "dummy.bat".

The download and extract makes (respectivly)

C:\Documents and Settings\Allyn\Desktop\synapseGaming_lightingPack-1.4.0

With all the various folders that come with it.

synapseGaming_lightingPack-1.4.0\SynapseGaming\contentPacks\LightingPack (lightingpack containing all the bin, exampile, mk ETC...)

Just a little more instructions for us non-profesinal coders please.

Im looking forward to seeing what you have done.
#12
03/25/2006 (11:11 am)
@Allyn:
"C:\Torque\TGE" is just an example. Just point at the folder, you installed the SDK to ("C:\Documents and Settings\Allyn\Desktop\synapseGaming_lightingPack-1.4.0").

To create the file "dummy.bat" just go into the SDK-Folder, and press right mosue button. In the pop up menu select New->Text File. Rename it to "dummy.bat" and you are done.

Try again, now the patcher will work. If not, don't mind posting the next question :-).


Regards,
Kai.
#13
03/27/2006 (12:26 pm)
Kai,

Patch worked great. I then used WinMerge to add your features to my current project. Everything worked fine except the RMB feature. When I opened an inventory window and then closed it I would have to right click to actually show the mouse again, this was also the case when I hit escape and then cancel back into the game. If I didn't right click it would function like the normal FPS style. I rigged up a temp hack until I can look further into it.

It just appears that the function GuiCanvas::checkCursor in the file common\client\cursors.cs was still being used when any dialog box would close. Causing the canvas.CursorOff(); command to execute. I have just change my if statements to just turn on the cursor no matter if the dialog box is telling not to. The function starts around line 42 of my cursors.cs file.

Thanks for a good resource. I look forward to seeing what else you have to share :)

Since I haven't really looked through all your modifications just yet, where are you specifying the bounding box for the selections feature? Is that scripting base or coded into the engine? The reason I ask, is I plan to replace the box with another method of showing selection.

Thanks again

-- Chris
#14
03/28/2006 (6:53 am)
Kai,

With your object selection, what is the variable the object is set to? The reason I ask is because I have compiled in projectile tracking. I want the crossbow to track what I select, but I need to specify a target. I have tried, $Character::targetedObject; but that isn't working.

Sorry if this is such a noob question, I am still fairly new to Torque.

Thansk for your help,

-- Chris
#15
03/28/2006 (10:18 am)
Hi Chris,

you can get the currently selected object with %targetObject = %client.getSelectedObject();

Example:
%targetObject = %client.getSelectedObject();
if (%targetObject)
{
<... some code ...>
}

I can't follw the problem with the RMB mouselook. On my system this feature works fine. Please try it with the unmodified patchted (1.4.0->1.4.0.1) system. There it should work. It could be an interference with something in your project code.


Regards,
Kai.
#16
03/29/2006 (9:00 am)
Hi Kai,

I was trying to use the projectile tracking resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6778 and in the crossbow.cs file I am trying to assign the selected target.

I was trying to use

target = %client.getSelectedObject();

and in the console I get the following message:

Mapping string: Kork to index: 14
Received info request from a master server [IP:216.116.32.49:28002].
Mapping string: use to index: 3
Mapping string: SelectObject to index: 4
bin/server/scripts/crossbow.cs (924): Unable to find object: '' attempting to call function 'getSelectedObject'

do you have any ideas on how to resolve this?

Thanks for your help

-- Chris
#17
03/30/2006 (12:06 pm)
Hi Chris.

If line 924 is "target = %client.getSelectedObject();" then the error says that %client is undefined. Please check your code for porper initialisation, because %client is a local variable.


Regards,
Kai.
#18
03/30/2006 (1:37 pm)
Hey Kai,

After messing around with it some more. It must be a messed up installation. I talked with someone else who installed your patch and then recompiled using the same projectil.cc and .h file and their projectile tracking works just fine. I am just going to have to roll back my code a little. I was trying to modify your selection code to use a green circle on the ground like in WoW instead of a bounding box. I was sucessful. But in tinkering around with trial and error I must have messed something else up.

Thanks for your help Kai,

-- Chris
#19
03/30/2006 (10:33 pm)
Hi Chris,

nice to hear that everything works fine now.

Would you like to share the code for the green cirle selection marker? I would like to use it in my system instead of the boring bounding box. I develop a persistent game with world and inventory database and the possibility to create/modify/interact with everything in the game. Supports multiplayer and works without editor.

I'll publish the thing shortly as patch.


Regards,
Kai.

THREAD DEPRICIATED: new information located at www.garagegames.com/mg/forums/result.thread.php?qt=42154#324687