Chapter 4
by Ken Finney · in Torque Game Engine · 07/05/2004 (12:57 pm) · 27 replies
If you type in the emaga4 code from the book, it will work correctly as written.
However, there is a naming error in the CD copyable code for chapter 4 - an early prototype name was left in. To fix:
1. Copy the root main.cs plus the control folder with its contents over to your emaga4 folder on your hard drive, then make the changes:
2. Rename control/game.cs to control/server.cs.
3. You then have to locate the Exec("./game.cs"); line in control/initialization.cs and change it to Exec("./server.cs");
Everything then works correctly.
(This error was previously addressed here, and also reported here, and here.)
However, there is a naming error in the CD copyable code for chapter 4 - an early prototype name was left in. To fix:
1. Copy the root main.cs plus the control folder with its contents over to your emaga4 folder on your hard drive, then make the changes:
2. Rename control/game.cs to control/server.cs.
3. You then have to locate the Exec("./game.cs"); line in control/initialization.cs and change it to Exec("./server.cs");
Everything then works correctly.
(This error was previously addressed here, and also reported here, and here.)
About the author
#3
As a former Mac person, some windows preferences are not all that familiar to me. Windows will not show the '.cs' extension unless the windows prefs are set to show extensions. I encountered problems trying to add the '.cs' to the filename. It became confusing when the exec() function called for a literal file string with the '.cs' extension - It found the file even though windows didn't show the extension.
It becomes especially confusing when the tge compiles the files and the compiled files appear with a .cs.dso extension showing in the window. Why is shows the compiled extensions...
anyway, for us newbies, go into control panels and change your folder view preferences to show all extensions.
08/18/2004 (2:32 pm)
Newbie note. re: View extensionsAs a former Mac person, some windows preferences are not all that familiar to me. Windows will not show the '.cs' extension unless the windows prefs are set to show extensions. I encountered problems trying to add the '.cs' to the filename. It became confusing when the exec() function called for a literal file string with the '.cs' extension - It found the file even though windows didn't show the extension.
It becomes especially confusing when the tge compiles the files and the compiled files appear with a .cs.dso extension showing in the window. Why is shows the compiled extensions...
anyway, for us newbies, go into control panels and change your folder view preferences to show all extensions.
#4
The emaga5 install does not install all folders necessary for the chapter additions. You'll notice when you compare your install to figure 5.1. The control/weapons and control/vehicles are not installed.
server/misc or server/players doesn't make it either - can't remember just now. Either way, just be prepared to add the folders to the tree and then copy files there as you go.
08/18/2004 (2:38 pm)
Pg. 187The emaga5 install does not install all folders necessary for the chapter additions. You'll notice when you compare your install to figure 5.1. The control/weapons and control/vehicles are not installed.
server/misc or server/players doesn't make it either - can't remember just now. Either way, just be prepared to add the folders to the tree and then copy files there as you go.
#5
Loading the Scorched Earth mission does not put you in the hut (fig. 8.23) that shows the textures one creates in this chapter. Don't know where the hut is.
08/27/2004 (6:56 am)
Pg 284Loading the Scorched Earth mission does not put you in the hut (fig. 8.23) that shows the textures one creates in this chapter. Don't know where the hut is.
#6
The exercise calls for manipulating the GG logo on the menu screen of the fps demo. Oddly enough, the images in the folder I got from the cd had already been manipulated - specifically, the gglogo150 already had a transparency doodle taken out of it when I opened it! Yet nothing on the splash screen showed what was supposed to be the effect of that doodle.
It turns out that there is no isolated graphic for the gglogo. Instead it's the full background. The graphic I had to open was 'background.jpg'. It's not even a png that you are supposed to be experimenting with.
08/27/2004 (10:11 am)
Pg 290The exercise calls for manipulating the GG logo on the menu screen of the fps demo. Oddly enough, the images in the folder I got from the cd had already been manipulated - specifically, the gglogo150 already had a transparency doodle taken out of it when I opened it! Yet nothing on the splash screen showed what was supposed to be the effect of that doodle.
It turns out that there is no isolated graphic for the gglogo. Instead it's the full background. The graphic I had to open was 'background.jpg'. It's not even a png that you are supposed to be experimenting with.
#7
re: "3D Game Programming ALL IN ONE" (by Kenneth C. Finney)...
After completing the "emaga4" demo *exercise* in chapter 4, I expected to be able to control the model using the mouse -- as well as the keyboard. ("free look", etc)
But, my logitech USB mouse has no effect on the model, however.
Do I need to use a ps2 mouse, instead, in order for the mouse controls to work?
sd
08/24/2005 (7:19 pm)
Hire: "3D Game Programming ALL IN ONE" (by Kenneth C. Finney)...
After completing the "emaga4" demo *exercise* in chapter 4, I expected to be able to control the model using the mouse -- as well as the keyboard. ("free look", etc)
But, my logitech USB mouse has no effect on the model, however.
Do I need to use a ps2 mouse, instead, in order for the mouse controls to work?
sd
#8
09/17/2005 (3:49 pm)
Hello I try to run the Emaga4 game but it does not do anything. Just the Black console window opens and thats all. Im I suppose to compile each script?
#9
09/17/2005 (3:52 pm)
Never mind I got it to work LOL
#10
02/02/2006 (9:47 am)
Dwayne: I am having that problem now. Just the black window is loading. What did you do to fix it?
#11
02/02/2006 (10:06 am)
It has been a while since I figured that out and kind of forgort but if you copy the basic folders from the CD it should run. I think that something is different from the install vs whats on the CD folders but I am not sure.
#12
I don't suppose you or anyone else has the entire folder tree they could email me so I can get it to work?
02/02/2006 (10:20 am)
I did as this post suggested. I copied the main.cs and the control folder. The file did not need renaming, there was already a game.cs already in that folder.I don't suppose you or anyone else has the entire folder tree they could email me so I can get it to work?
#13
02/02/2006 (11:03 am)
That folder tree is on the CD itself.
#14
I need someone's code to get it right.
02/02/2006 (11:07 am)
Yes but it doesn't work. That's why there is an error in the first place. It says to copy the folder from the CD into the folder the game installed itself into. I did that but something is wrong.I need someone's code to get it right.
#15
02/02/2006 (11:44 am)
What happens when you copy the whole thing?
#16
The black commandline window appears but nothing else. No errors, no messages, no log files. Just a blank screen.
02/02/2006 (12:01 pm)
The whole thing doesn't have the files I need to manually create. But when I transfer the files from the CD over as it says above, the same result happens.The black commandline window appears but nothing else. No errors, no messages, no log files. Just a blank screen.
#17
02/02/2006 (1:06 pm)
When I get off of work tonight I will give it a try and see what I come up with.
#18
The console.txt shows the following:
Loading compiled script common/main.cs.
Loading compiled script common/presets.cs.
*** Activating common package ***
Loading compiled script control/main.cs.
--------- Loading Add-ons ---------
Engine initialization complete.
--------- Initializing module: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
My server.cs was already named correctly.
02/11/2006 (7:11 pm)
Same problem here. Just the console window.The console.txt shows the following:
Loading compiled script common/main.cs.
Loading compiled script common/presets.cs.
*** Activating common package ***
Loading compiled script control/main.cs.
--------- Loading Add-ons ---------
Engine initialization complete.
--------- Initializing module: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
My server.cs was already named correctly.
#19
03/22/2006 (2:35 pm)
Same problem as described by previous posts. Can anyone tell me how they got it to work?
#20
I never went back to figure out what was wrong with chapter 4.
03/23/2006 (6:07 pm)
If it's any comfort, I never got Emaga4 to run. I just went on and did emaga5 which did work.I never went back to figure out what was wrong with chapter 4.
Torque Owner Robert Clegg
pg. 106
- 8. wrong object number. Should be 1359 in the instruction not 1353.
- Also. There is no '-' in the function call. Error returns "no funtion Transform".