Game Development Community

Issue with dso files

by Quentin Headen · in Torque Game Builder · 03/16/2011 (11:01 pm) · 10 replies

Hello everyone! I'm trying to package my game for my friends to test it. I don't want to give out the source code of my script files, but rather just the compiled dso versions of them. My game runs fine with the cs files in the source tree, but when I delete all of the cs files, and leave just the dso files, the game no longer functions correctly.

The GUI buttons look all wacky, and the car on the screen looks stretched. Also, the player's car doesn't collide with the traffic cars around it. When I bring back the cs file that contain the GUI profiles, the buttons go back to being normal. And when I bring back the cs files that handle collision responses, the car goes back to colliding.

What is going on here? The console isn't giving errors, and it is saying that it is loading the compiled scripts. Any idea what could be the problem?

Please respond as soon as possible. I need to get my game out to my friends for testing.

Thanks

About the author

Just your average programmer who tries to finish the projects he starts. :) I am currently focused on creating games with Torque engines. My website is http://phaseshiftsoftware.com


#1
03/17/2011 (12:25 am)
1. Are you sure that all of the *.cs generated a *.dso? You can use Torsion which will compile every *.cs file for you so you can be sure.
2. Are any of your *.cs files generating any kind of errors?
#2
03/17/2011 (4:04 am)
Yeah. All of my *.cs files are generated as *.dso; *.cs.dso to be exact. I even changed one of the files from a *.cs.dso to a *.dso, but still nothing.

There aren't any errors with my *.cs scripts, and there aren't any errors showing up for my *.cs.dso files either.
#3
03/17/2011 (5:38 am)
OK. I think I've pinpointed the problem. For some reason, when I have just *.cs.dso files, my game/gameScripts/guiProfiles.cs.dso file isn't being loaded. When I have my *.cs files in place, the file is loaded.

Any idea why this might be?
#4
03/17/2011 (7:23 am)
OK. I've found the exact problem. For some reason, the game will load the game/gameScripts/datablocks.cs and game/gameScripts/guiProfiles.cs files, but it won't load the dso versions of them.

Those files seem to be loaded when the _initializeProject function is called. I still have to figure out why it isn't being called when only the dso versions are there.

Has anyone else had this issue?
#5
03/17/2011 (7:34 am)
Did you delete all the dso files and let them get re-generated?

Are the dso files going to your Application data directory?

I've had issues before where the first set of dso files ended up in my working directory and everything after that went to the Application Data directory.
#6
03/17/2011 (3:00 pm)
@Chris Labombard
No, it seems that the correct dso files are there. I even used the TGB's Build Project utility that builds the project and places all of the needed files in a directory. And I am still having the same problem.

I resolved it by simply keeping the datablocks.cs and guiProfiles.cs files in their place, and I removed the rest of the cs files.
#7
03/18/2011 (2:33 am)
I have had a similar problem with .dso files not being generated. That turned out be caused by an error in my script code.
No error message was reported but no new dso-file was created. After a while I found the error in my script code and when I fixed it the dso-file was created as normal.
#8
03/18/2011 (4:23 am)
I've found this at the end of common projectManagement script:
if( isFile( %userGUIProfileFile ) )
      exec( %userGUIProfileFile );
Exec is just skipped if there is no guiProfiles.cs file. The same happens to datablocks file and a few others.
#9
03/18/2011 (5:43 am)
@Rpahut

Yup!! That's the problem. Is this a bug, or is it meant to be? It looks like a bug to me. I think I'm going to change the script code in order to fix this.
#10
03/21/2011 (5:35 am)
OK everyone. I fixed the issue. Like Rpahut said, the problem lies in the "projectManagement.cs" file that lies in the game/gameScripts directory.

I changed line 92 to
if( isFile( %userDatablockFile ) || isFile( %userDatablockFile @ ".dso") )
.

I also changed line 114 to
if( isFile( %userGUIProfileFile ) || isFile( %userGUIProfileFile @ ".dso") )
.

For some reason, it was originally coded to look for the .cs files only and not look for a .dso. So the whole thing went wacky when there was an absence of a .cs file. If anyone else has this problem, this is the solution.

Thanks for the replies everyone.