FPS demo problem on 360
by JohnT · in Torque X 2D · 06/09/2008 (2:54 pm) · 60 replies
I have tried to run TX2 on the Xbox360 and am having a couple of issues when running 3D apps.
1. First the terrain is showing black sections where details are coming in and out.
2. The app completely crashes when I try and go into anything other than Terrain from the main menu.
To make sure that this was not an issue with how I compiled the engine I have reinstalled using the binary version and still have the exact problem. Also I tried debug and release versions but did not make a difference.
1. First the terrain is showing black sections where details are coming in and out.
2. The app completely crashes when I try and go into anything other than Terrain from the main menu.
To make sure that this was not an issue with how I compiled the engine I have reinstalled using the binary version and still have the exact problem. Also I tried debug and release versions but did not make a difference.
About the author
#42
Has anyone created a new/updated version with all the corrections? I thought I read somewhere that GG was going to have a patch of some sort to fix this? Would anyone be willing to zip up their clean working copy for us to download? It seems kind of silly for everyone to have to make all these edits when they've already been fixed and we're all anxious to get into our own variations of the framework.
thanks
07/17/2008 (6:42 pm)
Interesting, thanks for the quick response. I'll go through this post with a fine tooth comb and make sure I'm not missing anything.Has anyone created a new/updated version with all the corrections? I thought I read somewhere that GG was going to have a patch of some sort to fix this? Would anyone be willing to zip up their clean working copy for us to download? It seems kind of silly for everyone to have to make all these edits when they've already been fixed and we're all anxious to get into our own variations of the framework.
thanks
#43
I just purchased pro, and applied all of the fixes (please review for accuracy) - I think....
with two questions - devon your version on creatorsclub working in HD (1080)- however the fixes I list below must not be complete - as I cannot run it in HD (1080) - what am I missing.
Also a dumb question - how do I turn off the splitscreen?
for those who are interested:
in file CllipMapBlenderImageCache.cs
replace two instances of
find
find
find
find
In File T3DTSRenderComponent.cs
find
08/11/2008 (8:42 pm)
Hey Guys,I just purchased pro, and applied all of the fixes (please review for accuracy) - I think....
with two questions - devon your version on creatorsclub working in HD (1080)- however the fixes I list below must not be complete - as I cannot run it in HD (1080) - what am I missing.
Also a dumb question - how do I turn off the splitscreen?
for those who are interested:
in file CllipMapBlenderImageCache.cs
replace two instances of
#if XBOXwith
#if XBOX && XNA_1
find
if (GFXDevice.Instance.Device.CreationParameters.Adapter.VendorId == _nvidiaVendorID)modify to look like:
//added Environment.OSVersion.Platform == PlatformID.Xbox ||
if (Environment.OSVersion.Platform == PlatformID.Xbox || GFXDevice.Instance.Device.CreationParameters.Adapter.VendorId == _nvidiaVendorID)
{find
_sceneViewport = device.Viewport;replace with
_sceneViewport = device.Viewport;
//added
_sceneDepthBuffer = device.DepthStencilBuffer;
//endfind
device.SetRenderTarget(0, _renderTargets[mipLevel]);replace with
device.SetRenderTarget(0, _renderTargets[mipLevel]);
//added
device.DepthStencilBuffer = null;
//endfind
private SceneRenderState _toTexRenderState;replace with
private SceneRenderState _toTexRenderState;
//added
private DepthStencilBuffer _sceneDepthBuffer;
//endIn File T3DTSRenderComponent.cs
find
ShapeReader reader = new ShapeReader();replace with
//Added
//FileStream fs = new FileStream(_shapeName, FileMode.Open);
FileStream fs = new FileStream(_shapeName, FileMode.Open, FileAccess.Read);
//end fluidImages
ShapeReader reader = new ShapeReader();
#44
when I try to compile the Torque windows project now - I am getting
this error:
Error 83 'System.PlatformID' does not contain a definition for 'Xbox' C:\Program Files (x86)\GarageGames\Torque X 2.0 Pro\v2.0.0.0\Engine\Materials\ClipMap\CllipMapBlenderImageCache.cs 146 66 Torque
what would cause that?
did I do it incorrectly?
08/11/2008 (8:45 pm)
One last item - when I try to compile the Torque windows project now - I am getting
this error:
Error 83 'System.PlatformID' does not contain a definition for 'Xbox' C:\Program Files (x86)\GarageGames\Torque X 2.0 Pro\v2.0.0.0\Engine\Materials\ClipMap\CllipMapBlenderImageCache.cs 146 66 Torque
what would cause that?
did I do it incorrectly?
#45
John K.
08/11/2008 (8:55 pm)
I'll have to re-read this to answer the coding questions, but for the splitscreen question, set the number of players to 1. I think it is in Game.cs and the variable is named: PlayerCount. If it goes from 2 to 1, then the splitscreen is gone.John K.
#46
You had been talking about releasing a new version with all the xbox fixes in it. How's that coming?
08/12/2008 (6:56 am)
John,You had been talking about releasing a new version with all the xbox fixes in it. How's that coming?
#47
Thanks
A little more progress, Yeah!!
Replaced the line mentioned above with:
FileStream fs = new FileStream(_shapeName, FileMode.Open, FileAccess.Read);
Apparently the Xbox requires ReadOnly access in order to open files for security reasons. I'm getting closer and see the player dropping into the world but still have a crash something to do with BlobShadows.
Update: Finally there! Last problem with BlobShadow was attributed to the resources not reflecting the BlobShadow image. All I had to do was include it in the *.resx file. From what I can tell, everything is now working except for the 1080 mode as mentioned above.
Edited on Jun 12, 2008 16:24
Devon James
Member Posted: Jun 12, 2008 16:35
That's great! I had fixed the .dts problem by wrapping everything inside the if (File.Exists()) with
using (Stream fs = File.OpenRead(_shapeName))
{
...
}
and got rid of the fs.Close(); line. I find "using" to be cleaner, but either way it does need to be read-only. The only way to write files on Xbox is via the StorageContainer.
The blob shadow was another place I had to call "GFXDevice.Instance.Device.Vertices[0].SetSource(null, 0, 0);" before calling .SetData. It should go at line 239 in T3dBlobShadowCasterComponent.cs - after adding a bracket on line 238 for the "if" - then the closing bracket on line 241.
Looking at a file-comparison between my running version and the original source, I think that's all there is to get it running on the Xbox (assuming you found all the .SetData calls in the clipmap code and obviously handled the resx stuff). You'll probably notice other "features" running on the Xbox, but I don't think you'll crash anymore ;)
08/12/2008 (1:12 pm)
Hi All, I have got lost along the way, could you explain what i am supposed when I get to the point described in these two posts below.Thanks
A little more progress, Yeah!!
Replaced the line mentioned above with:
FileStream fs = new FileStream(_shapeName, FileMode.Open, FileAccess.Read);
Apparently the Xbox requires ReadOnly access in order to open files for security reasons. I'm getting closer and see the player dropping into the world but still have a crash something to do with BlobShadows.
Update: Finally there! Last problem with BlobShadow was attributed to the resources not reflecting the BlobShadow image. All I had to do was include it in the *.resx file. From what I can tell, everything is now working except for the 1080 mode as mentioned above.
Edited on Jun 12, 2008 16:24
Devon James
Member Posted: Jun 12, 2008 16:35
That's great! I had fixed the .dts problem by wrapping everything inside the if (File.Exists()) with
using (Stream fs = File.OpenRead(_shapeName))
{
...
}
and got rid of the fs.Close(); line. I find "using" to be cleaner, but either way it does need to be read-only. The only way to write files on Xbox is via the StorageContainer.
The blob shadow was another place I had to call "GFXDevice.Instance.Device.Vertices[0].SetSource(null, 0, 0);" before calling .SetData. It should go at line 239 in T3dBlobShadowCasterComponent.cs - after adding a bracket on line 238 for the "if" - then the closing bracket on line 241.
Looking at a file-comparison between my running version and the original source, I think that's all there is to get it running on the Xbox (assuming you found all the .SetData calls in the clipmap code and obviously handled the resx stuff). You'll probably notice other "features" running on the Xbox, but I don't think you'll crash anymore ;)
#48
(v, 0, idx);
Please can anybody help me or maybe even post the modified engine source files?
10/06/2008 (12:28 pm)
I have added all these changes, but the calls before SerData() only in CllipMapBlenderImageCache. Where else in the engine is it also necessary? If I run in debug on the Xbox the menu shows nicely, but then when I choose any of the menuoptions it crashes with ""System.InvalidOperationException" ist in Microsoft.Xna.Framework.dll aufgetreten". It is in the function _UpdateRenderQuad; where I added GFXDevice.Instance.Device.Vertices[0].SetSource(null, 0, 0); just above the call _renderQuadVB.Instance.SetDataPlease can anybody help me or maybe even post the modified engine source files?
#49
Error 83 'System.PlatformID' does not contain a definition for 'Xbox' C:\Program Files (x86)\GarageGames\Torque X 2.0 Pro\v2.0.0.0\Engine\Materials\ClipMap\CllipMapBlenderImageCache.cs 146 66 Torque
Please could anyone who can run TX on XBOX360 in 3d please send me their changed engine files? Or the compiled dlls so I could try these? I really would like to get going, in the end i bought the engine specifically to develop for the 360.
10/07/2008 (9:10 am)
Also with the changes applied I can't compile for windows anymore....i get this error:Error 83 'System.PlatformID' does not contain a definition for 'Xbox' C:\Program Files (x86)\GarageGames\Torque X 2.0 Pro\v2.0.0.0\Engine\Materials\ClipMap\CllipMapBlenderImageCache.cs 146 66 Torque
Please could anyone who can run TX on XBOX360 in 3d please send me their changed engine files? Or the compiled dlls so I could try these? I really would like to get going, in the end i bought the engine specifically to develop for the 360.
#50
Should be 720p or below - and it should run.
also the other issue is your project config....i am not at home right now, but will post the correct settings that stops that error.
Sean
10/07/2008 (10:22 am)
Andy - what resolution are you at?Should be 720p or below - and it should run.
also the other issue is your project config....i am not at home right now, but will post the correct settings that stops that error.
Sean
#51
Thanks
10/07/2008 (10:30 am)
I actually thought at one point a GG employee said they'd make the corrections and put up a new build? Is there an update on this? I'd really like to use try the engine but I only have the Indie license so I can't even make the code changes myself.Thanks
#52
10/07/2008 (10:35 am)
Sean, thanks for jumping in. I am running 720p....but i have to check again, as TX uses the TV's resolution, correct? I mean I can't set it in the game?
#53
I think that some DLLs might have been posted from John that have the corrections in them.
Andy,
for 360 deployments, it, by default, uses the 360 display settings.
Part of Johns book goes into detail on how to check for resultion - thus you could have different images (menus) for different resolutions.
10/07/2008 (11:16 am)
Laurence, I think that some DLLs might have been posted from John that have the corrections in them.
Andy,
for 360 deployments, it, by default, uses the 360 display settings.
Part of Johns book goes into detail on how to check for resultion - thus you could have different images (menus) for different resolutions.
#54
10/08/2008 (2:14 am)
Yes, John posted the dlls, but for me on the XBOX I have the same problems still.
#55
10/09/2008 (7:31 am)
I am still not able to run anything 3D on the XBOX on 720p, unfortunately also not with John's dlls. I would really appreciate if someone on who's Xbox it runs could post the dlls. Also I think GG really should adress this issue; at least an official statement regarding this would be nice. For sure a lot of the customers bought TX Pro thinking that they can actually use it for 3D Xbox development, and it looks like out of the box, TX does not deliver that feature.
#56
10/09/2008 (12:09 pm)
John Kanalakis is working on bringing an updated 3D Builder to you as soon as possible. I'm in contact with him and will talk to him about these issue and see what's up. Really hoping to have this new build out very soon; there are a good number of fixes in it.
#57
10/09/2008 (12:17 pm)
Ok this is very good news, thanks a lot kenneth! But does the update to the 3d builder also include TorqueX? Because as said, I can't even run a template StarterGame 3D, just as it comes out of the box when TX (Pro) is installed?
#58
10/09/2008 (12:26 pm)
I'm not sure why that would be happening, but I will look into it and query John on it. I don't have that problem :(
#59
10/09/2008 (12:33 pm)
Ok kenneth, much much appreciated anyways ;-). I will try again....are you using a TX Pro build or a TX binary build?
#60
10/09/2008 (2:27 pm)
I just want to add that I have the indie license, so binary only, not pro. I'm not able to run anything 720 or 1080 on xbox. I too tried the dll's from a few months ago but had no luck. I thought you guys said you were going to provide a new binary build several months ago? I had wanted to use it for the dream/build/play but that's done now. I hope you guys will be releasing a new build soon because I am anxious to start working on it.
Torque Owner Devon James
That sounds like the .dts problem we've all encountered. See JohnT and my posts from June 12. Hopefully, it should be a matter of opening the file readonly...
Devon