Game Development Community

Problems compiling for Windows

by Jeffrey Sweeney · in Technical Issues · 10/09/2008 (6:49 pm) · 5 replies

Me again. First I'd like to thank the people that helped me resolve my issues earlier on these forms, for since then I've bought TGB.

Anyway, this is probably the wrong thread for this (again), but the problem is when building my project to run on Windows (I'm on a mac, OS 10.5.5), it's not only slower, but some basic behavior code (such as jumping) doesn't work properly. This was tested on a Windows 2000 OS, and it doesn't even load on Vista at all.

Is there a specific reason this happens, and if there is, is there some way to fix it?

#1
10/10/2008 (7:10 am)
It should be working on Vista. Make sure you disable Aero and have your video drivers up to date.
#2
11/18/2008 (4:11 pm)
It seems the reason it wasn't working had something to do with the fact it was behavior code. I have since rewrote the code and put it in the gamescripts folder, and it's worked, for the most part. There's a few residing problems, but I think I can handle them. And thanks for the tip David, I'll keep that in mind if it ever fails to start again.
#3
11/24/2008 (7:30 pm)
That's definitely a good idea if you're running from the editor.
#4
12/03/2008 (3:33 pm)
The problem with the former game seems to have something to do with the castCollision $= "" function always evaluating to true (or almost always) on Windows. I'm am working on a workaround from using this function.




I got another problem though. For this particular game I'm making, it won't even load at all on Windows XP at all (I haven't tested it on Vista yet). I took some notes, hoping I would spot the issue, but to no avail...





----------
Problem: Game crashes on startup when running on Windows XP. On OS X, the game functions fine.



Notes:
The game's images are placed in the same image folder path that other games that executed properly

The datablock file in the managed folder is close to identical to similar games that ran successfully on Windows.

There is no behavior code (behavior code won't work when building for Windows)

Game functions in the gameScripts folder are similar to other games that have been successfully compiled to run on Windows

The console log's last message before crashing is it loading the datablocks.cs file in the manage folder




What I've tried:
Creating a similar game that used custom datablocks (a possible problem that has caused crashes for me before)
result: new game functioned fine

Disabling and deleting the contents in the custom datablocks file
result: the same error occurred

Creating a new game, only copying over brush code, .png files, and .cs files (playercontroller.cs and scorpion.cs) required for the game
result: the same errors occurred that occurred in the original game

Modifying the 'main.cs' file to not execute faulty code ("_initializeproject();")
result: all datablocks failed to load

Copying the common folder from another game into this game (just for the heck of it)
result: error message, perhaps the same problem that has been happening?






What I assume:
I'm guessing the problem is the game can't find the function "_initializeproject();", and therefore is forced to shut down. Ironically, it can execute the "initializeproject();" function just fine

Although less likely, the game's graphics are too large.

Either the .png file, the brush code, or, less likely, the gamescripts code that runs the t2dsceneObjects causes problems for some reason.
----------



And, just curious. Would my torque ignition key also work for windows version of the builder? If these problems are only based on compiling issues for the mac version, wouldn't copying the resources and building the game on Windows resolve all of these cross-platform problems?
#5
12/04/2008 (12:20 pm)
I found out why the game wouldn't load on Windows. After installing a windows version of TGB, the problem seems to have something to do with one of the images. It's a fairly large image, and for whatever reason, Xp cannot upload or use it. I'm sure I can fix this problem, it's just a tad odd...


As far as the castCollision function dilemma, it is indeed Windows only, in TGB and executables. Are there any more functions that tend to differentiate on different platforms? I want to do my best to avoid them.