Game Development Community

Installing patches

by Brett Johnson · in Torque Game Engine · 11/10/2007 (9:31 am) · 22 replies

Does anyone know how to install patches? I've been trying to find a good upgrade for the water and I think I've found one, it's just I don't know how to install it.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10357

This looks very good but I still can't install it. For one, my computer doesn't know what kind of file type it is (RAR. is kind of an unknown) and I can't understand the directions. Can anyone clarify the directions to install because I don't understand.
Page «Previous 1 2
#1
11/10/2007 (3:19 pm)
A rar file is a zip file. Google winrar to unzip it.
As for applying a patch, you would need cgwin to use it, and then find someone kind enough to explain how to use it. (I haven't figured it out yet)
#2
11/10/2007 (3:50 pm)
Thanks for the info on rar files and also, don't you have to pay to use cgwin?
#3
11/10/2007 (4:44 pm)
I downloaded it for free from cgwins website.
#4
11/10/2007 (4:48 pm)
To find patch to donwload use google with this phrase: "patch windows" and it is the first hit.

To find out how to USE patch google with this phrase: "patch create" and it will be the first hit.

Yes, I understand that in the second step I tell you to search for the word "create" and not "use" and that the resultant site is information for Linux and not windows but the commands are the same....

Just in case it something like "patch -p0 -i " from the root folder that the patch is created from.


For every question, there is a one-line Google phrase that will lead to the answer on the first hit.
#5
11/10/2007 (4:58 pm)
Waht do you mean by that? I still don't know where to get cgwin.
#6
11/10/2007 (5:19 pm)
You don't need cgwin. Like I said, go to www.google.com and type in "patch windows" and go to the first site and download the BINARY version.


Better yet just click here gnuwin32.sourceforge.net/downlinks/patch-bin-zip.php
#7
11/10/2007 (7:33 pm)
Thanks! i would have never have found it! Ok i have the patch (but it a bunch of files 0.o), i have the gnuwin32, i have tha game engine, and finaly no experince. what do i do with it to get the stunning water effect i desire becuase the torque document isn't helping me.
#8
11/10/2007 (8:12 pm)
I just looked at that resource and it doesn't even use a patch file....


So... just unzip that file into your engine folder and make the changes necessary (as outlined in the resource). If you have any specific questions don't hesitate to ask. Most importantly. Read the ENTIRE resource (including all of the posts) and follow the directions carefully.
#9
11/11/2007 (6:15 am)
Don't mean to make it seem like you have to hold my hand through the steps but how do i add the files to the game engine?

"After installing it you must modify the TGE project to include the Cg/lib and Cg/include folders to the library paths and the include paths, respectively. "

I right now the biggest problem is i don't know where the file is or even its name. And do i add the information with a scripting program like codeweaver?
#10
11/11/2007 (6:44 am)
Ok, download WinMerge (it's free)

Winmerge has 2 windows side by side. One for the original file, and the other for the new one. (the mods file) It's super simple to use. Once you open both, the differences will be highlighted in yellow. To merge the files, simply click the arrow pointing to the original file and the new code will be added properly.

As for adding the Cg/lib and include folders to your project, you have to put the folders somewhere on your hard drive and point your compiler to them. Your compiler docs will tell you how to do this. It's a pita with 2005 express, but can be done if you follow the instructions exactly.

@ Brian, Thanks. I didn't know the patch had to be in the root folder. :blush: I'll have to give that a try next time I need to use a patch. :-)
#11
11/11/2007 (6:59 am)
As a note, usually the authors will create their patch one level above the engine folder.

For example if your project is setup like this:
MyProject
    Engine
    Game

Usually you will want to run the patch from the MyProject folder.
#12
11/11/2007 (7:08 am)
Ok im at C:\Torque\SDK

i see lib

OK, i now know where to place the files, but it's filled with so many folders
do i jsut drop the folder in with alll the otheres or is there somewhere it's suppose to go?
Right now im droping the file into the folders with the same name on them. Ok i dropped all the files into the files with the same name and deleted the scripts with the same name i was adding but nothing changed at all!

do i have to place the toolkit files into the torque library as well?
#13
11/11/2007 (11:55 am)
Thanks Brian. :-)

Brett, after you've installed the cg toolkit, (it should put the files on your C drive, you don't need to move them. You need to point your compiler to them.

If you are using microsoft visual studion 2005 express edition, open your project, then right click Torque Demo.
At the bottom of the popup, click properties. You'll get a new page with a bunch of stuff.
Click on C/C++ and the very top line in the right window will be your includes. Click the word includes and you will get a browse button on the far right. Click that and browse to your cg includes folder and click on it. That will add it to your project.

Now, for the lib, in the same properties page, click on linker.
Then additional libraries. (You'll get the same browse button you got with the includes)
Browse to your cg/lib folder and click on it to include it.

Important!! Make sure to click "Apply" after each change and save your project.

Once that's done, open the cg includes folder and find the file named "cgGL.h". Open it and make a line change. (It will be at the top of the file) You are changing the line that says "#include " and changing it to read "#include ". Save the file.

If you are using tge 1.4, you can overwrite the files in the engine folder with the new ones included in the resource, otherwise, use winmerge to merge the changes into 1.5,

Hope that gets you going.
#14
11/11/2007 (4:42 pm)
Which part is messing you up? Never give up.
What I do before making changes to my engine is to copy it to another folder, renaming the project file and change the copy. That way, if I mess it up, it's as simple as deleting the folder and recopying it back.

Now, if you would tell us exactly which part you are having problems with, we can give you specific answers to help you. All of us here have been where you are. It's not a problem answering when someone is trying.
#15
11/12/2007 (7:59 am)
0k i added the files to the many folders that torque requires but the was no place to place the CG so i placed it in the example folder. When i change all the files nothing happens. I think im suppose to get torque to recognise the CG files but i don't know how. At this point i've never used my c++ compiler to do anything becuase it was so old and i could edit files with code weaver (a free version of torsion). I'm using visual C++ .net 2003 so it doesn't realy let me do much.

also i don't have my own project or a folder, right now im modifying the FPS example. Is there a file i could manualy go to and place the location of the CG file or even just place the CG file in the torque Lib?

update: i got visual c++ express edition 2005 so what do i do with it, most of the options that are suppose to be there i don't see.
#16
11/12/2007 (4:16 pm)
Ok, first, let's get torque compiling, then we can tackle the rest.

Since you are using the express version, the platform sdk isn't included. Open the compiler and click on the link to download the microsoft platform sdk (for windows server) and install it. (the link will be in the bottom window called "getting started". It's called "psdk".)

Once that's installed, you'll be able to compile stock torque.

Open the torque sdk folder and look for a folder called "vs2005". Inside that folder is a file called "Torque1.5.2sdk.sln". Click on that and it will open visual studio for you. Everything should be there and ready for you, eccept you need to tell it to compile the release version of the exe. To do that, look in the left window, and right click on torque demo. At the bottom of the popup, click properties to open the properties window.
In the top left corner, it says configuration. Next to that, it says active debug. Drop the window and click on all configurations. Then, in that same top pane, click on configuration manager. scroll down that window and find "torque demo" and change it to release. Click apply and close the window. Now you are setup to build torque in release mode.
In the top navagation panel, click build, then in the drop down, click on "clean torque demo". Then after it's done, do the same thing, but click on "build torque demo". Wait till it's done, and you should see a new torquedemo.exe in the example folder.

I know I've taken you by the hand here and completely walked you thru compiling torque with vs2005, but hey, at least you don't have to learn it the hard way like I did. Once you have torque compiling, then we can start adding in the new cg stuff.
#17
11/14/2007 (9:11 pm)
Ok i understand that now (i feel very slow), now how do i do cg?
#18
11/15/2007 (4:15 am)
I'm going to assume you have the cg_toolkit installed somewhere on your hard drive. It doesn't matter where, as long as you know where it is. Then, these instructions apply.



If you are using microsoft visual studion 2005 express edition, open your project, then right click Torque Demo.
At the bottom of the popup, click properties. You'll get a new page with a bunch of stuff.
Click on C/C++ and the very top line in the right window will be your includes. Click the word includes and you will get a browse button on the far right. Click that and browse to your cg includes folder and click on it. That will add it to your project.

Now, for the lib, in the same properties page, click on linker.
Then additional libraries. (You'll get the same browse button you got with the includes)
Browse to your cg/lib folder and click on it to include it.

Important!! Make sure to click "Apply" after each change and save your project.

Once that's done, open the cg includes folder and find the file named "cgGL.h". Open it and make a line change. (It will be at the top of the file) You are changing the line that says "#include " and changing it to read "#include ". Save the file.
#19
11/16/2007 (10:39 pm)
Sweet! Everythings worked so far! OK what ealse do i do?
#20
11/17/2007 (5:35 am)
Now comes the fun part. (getting your hands dirty)

The resource used tge 1.4 and you have stated you are using tge 1.5, so the code is not compatable. (in other words, you can't just dump his new pages into torque). So what you are going to have to do is to merge the 2.
In the cg resource, there are 2 folders. Engine, and starter.fps. He's set it up so that all you have to do is follow the folder path to find where the changes are made. If you open up one of his changed files, look for
Quote://------------------------
// PRLD_WATER_SHADER
//------------------------

He has that at the top and bottom of his changes. You can manually add his code in the right places, or use winmerge to find the changes. I suggest using winmerge as it is faster, but you have to be very careful. There are a whole lot of changes between 1.4 and 1.5 source code. In winmerge, look for the highlighted changes that have the above and simply right click, and click "copy to..." to move the changes. Just be careful to only change what he's marked.
Once you've made those changes, do a test compile and see if it works. If not, you may have one more step to do. (as outlined in the resource)
I'm on vacation this week, so may even add this to a test to see if I can get it to work. (that's after todays work which I'm late to)
Page «Previous 1 2