Game Development Community

Problems with porting missions to TSE...

by Jack Stone · in Torque Game Engine Advanced · 07/23/2005 (7:05 pm) · 8 replies

Hi,
I have been trying for the past couple of days to port the tutorial.base directory (which I have been basing my game on) over to the TSE. I followed the resource on this, and I got the actual mission itself to load fairly ok. I got some errors about things not being found, but thats understandable.
However the terrain didnt show up at all. I basically got dropped into a level with all my objects (except interiors, because I took them out) but no terrain.
So I did some reading and I assumed that it was because my level would have been using the old terrain (legacy??) while TSE is now using milestone 2's Atlas terrain. So I copied the terrain code from the mission file of the terrain and water demo, but it still didnt load.
I can get into my level, and in the mission editor it says there is a new atlas instance present, but when I go close enough to the terrain block for it to become visible, I get a windows error and the engine crashes.
I am guessing its because my level is missing some of the code required for atlas to work, and I have looked for a datablock declaring the atlas code, but I have only found references to it in shaders and materials.cs, both of which I have included. Also, I replaced the common files from TSE with the ones from TGE just to check if that would work.

So basically what ive got is a level loading perfectly, but no terrain. I cant seem to be able to add either normal or atlas terrain without a crash in the event of atlas, or a message to the effect of "terrain block not found" for normal terrain.
Is there a file or script im not copying over properly?
I guess this is a pretty basic question, but the reason I ask is that all of the resources Ive found are before MS2, so I am wondering if thats why theyre not working. BTW, I tried this with starter.fps as well, and got the same error, level loads perfectly, but no terrain.
Thanks.
JS

#1
07/23/2005 (7:16 pm)
The legacy terrain is staying in TSE.. I ported the starter.fps over a few days ago and the stronghold mission loads up (with terrain)

Only suggestions I have are try loading the stronghold mission (from starter.fps) or check the console.log for any errors.
#2
07/23/2005 (8:21 pm)
The legacy terrian uses shaders now so you *have* to move over the shaders folder and the appropiate parts of server/scripts/shaders.cs and server/scripts/materials.cs and the exec()'s that call these scripts.
#3
07/25/2005 (9:04 am)
Thanks for your help, I now have terrains working. However the game doesnt seem to be very stable, every couple of minutes I get a memory error, ("The instruction at XXX referenced memory at XXX, memory could no be read"). Also, I get these black blotches on my terrain, like it is being lit incorrectly, but relighting from the mission editor doesnt fix it.
THis only happens with the tutorial.base port, not the starter.fps one, so I'll probably start using the starter.fps as a platform from now on, unless theres an easy fix for these memory errors and terrain problems?
Thanks,
JS
#4
07/25/2005 (12:03 pm)
Do you have probems with any other prorams on your computer, especially other (recent) games? (HL2/Doom3/etc?)
#5
07/25/2005 (12:42 pm)
Actually I have had problems playing two demos I downloaded recently, Area 51, and Deus Ex 2, but I assumed that was just osme bug in the demo itself. HL2, doom 3, Far Cry, and every other game I have runs prefectly. Only game that ever ran a little slow was Medal of Honour Pacific assault, and that was solved by updating my GFX drivers.
My system btw is:
AMD FX-53 (940-pin), Geforce FX 5950 ultra, 1 GB pc 3200 RAM, and Windows XP SP2.
I fgured it was some script I had changed, since its just my modified tutorial.base that experiences errors, but since TSE is still EA, I figured id ask in case theres a fix.
I havent reformatted in a while, but other than that I do regular defrags, virus/spyware scans etc.

JS
#6
07/25/2005 (5:16 pm)
Hmm... I'd guess there's some fragile part of the code that you're touching with your changes. I strongly suggest running TSE in a debugger to find out the cause of the problem.
#7
07/26/2005 (11:16 am)
I think I figured out part of my problem. The blotches were caused by some textures not showing up. I reapplied them with the material painter and it fixed it. (I understand the terrian painter isnt actually working properly in TSE yet?) I made a new terrain heightmap and added that in to my level, and I havent had the crashing problem yet, so it might have been a coppupt terrain file or something. Anyway it seems pretty much ok now.
By running TSE in a debugger, do you mean compiling it in a debug build, or just using the -debug command line paramater?
Thanks for the advice.
JS
#8
07/26/2005 (12:04 pm)
I mean, running it from within an IDE like Visual Studio so that if it crashes you can see what it was doing at the time of the crash (what line of code, what function calls, etc.).