Game Development Community

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.
#21
06/14/2008 (1:28 pm)
Wow thats great guys!! JohnT you are awesome, that fix also worked in the T2DShape3D class. We need these fixes in the engine stat!

Will-O
#22
06/14/2008 (2:40 pm)
I'm now testing out these changes. I should be able to post a new version of the engine .dll (Windows and Xbox360) on a new thread this evening.

John K.
#23
06/14/2008 (3:01 pm)
Cool. Will there be an update to the code for Pro users or shall I just go through and make the changes listed above somewhere?
#24
06/15/2008 (10:47 am)
Devon, are you able to run at full 1080p? I'm still seeing exceptions that kick the game out of XNA, but work fine at 720p.

John K.
#25
06/15/2008 (11:20 am)
@John K. - I as well cannot get the 1080p to function correctly. I am wondering if it could be related to a memory limitation on the 360 with the terrain. I have a game that I created using XNA only (not TorqueX) and it has a similar problem when I run it at 1080.

Unfortunately, I'm not sure how to debug a memory issue on the 360 without some of the more advanced tools that the 360 dev kit offers.
#26
06/15/2008 (1:33 pm)
Hmm... I wonder if reducing the clipmap stack or texture size will help reduce the memory consumption... maybe even have the scaling set automatically depending upon the display resolution.

John K.
#27
06/15/2008 (2:37 pm)
I actually cannot test 1080p. My TV only does 1080i, which works fine as long as I don't try to do split-screen. Someone on the XNA forums said they were able to review my submission at 1080p, but hinted they did see my BSOD at one point. Also, I did have to re-submit once to fix another crash from .SetData in the clipmap debug image.

Are you getting the exception about modifying stuff after it's been used in a tiling bracket? Or, are you getting one about no suitable device? I'm guessing it's one of the two...
#28
06/15/2008 (7:41 pm)
@Devon - Outstanding! I just tried your latest version at 1080i and 1080p and it works perfectly. I noticed your comment on the physics level about speeding up the math and was wondering if you could explain what you intended there. The physics on the Xbox is one of the really weak points at this time and I'm hoping you figured something out.
#29
06/15/2008 (8:32 pm)
It didnt work on mine. I tried on 720, and 1080i. I couldn't get past the start menu, though there was sound. I tried today, and it just went to black screen, and I coulnd't even go to my dashboard.
#30
06/15/2008 (8:39 pm)
Devon, I must still be missing one of the SetData() calls. Are you able to send me your modified engine project? My listed email address can take very large attachments. I'd like to grep through your modified engine source to compare. I'm still seeing predicated tiling exceptions, even at 720p.

John K.

This was actually directed at Devon ;)
#31
06/15/2008 (9:24 pm)
Thanks, JohnT. Were you able to try all the terrain "demo" buttons? i.e. x/b = clipmap debug image and a/y = wireframe. Just curious...

My statement to "File on Connect for faster Xbox math" is meant to get people to vote at connect.microsoft.com for better/native floating-point support on the Xbox.

It appears you have noticed how slow the math on the box is... That's because the Compact Framework on the Xbox does all its floating-point math in software. Apparently there are some problems supporting native FPUs with the IL and jitter for the Compact Framework in general. Some Microsoft documentation indicates it can never be fixed. (Having written software for the FPU on an ARM processor a few years ago, I can /almost/ understand why.)

The other sore point with math on the Xbox is the VMX unit which is completely unused by XNA. For those who don't know, the VMX unit is the PowerPC's version of MMX or SSE. It's a vector processing part of the CPU which performs four multiplications or additions at the same time.

There are a couple suggestions/bugs on the Connect site regarding Xbox math support. The last ones I saw had all been marked as closed externally, meaning they are being evaluated internally. It is still possible to weigh in on them. If Microsoft sees lots of interest, they'll work on it.

@Will: Are you sure you are running the latest version of the FPS Demo from Live? It has ".Updated." in the description.
#32
06/16/2008 (5:21 am)
Devon, from all my tests everything appears to be working. When I press x/b I get the white with red in the background and a/y I get the green/blue checkered pattern (I'm taking that as a wireframe). Best part is I have not had a single crash in the latest version.
#33
06/16/2008 (8:30 am)
That's really encouraging :)

The white/red/green/blue is supposed to be wireframe, but the Xbox is rendering it solid. On Windows it looks fine and I do seem to remember seeing wireframe on the box. It's neat because it shows the terrain LOD.

The checkered pattern is the clipmap debug image. The checkerboard is showing how the clipmap is laid out. If you watch carefully and move the camera slowly, you'll see it "allocate" the chunks at different LODs.
#34
06/16/2008 (9:49 am)
Devon's changes work very well, great job!!! I've uploaded the engine DLLs to the following locations:

Xbox360: www.envygames.com/tx/xbox/GarageGames.TorqueX.Framework.dll
Windows: www.envygames.com/tx/win/GarageGames.TorqueX.Framework.dll

You should be able to replace your local engine DLL with one of these, depending upon your target platform. These changes have also been worked into the main branch and should roll out with the next patch update to Torque X. I don't know exactly when that will be, but hopefully very soon.

John K.
#35
06/16/2008 (11:19 am)
I'm sure I am doing something really stupid here but this is what I'm getting when I substitute the dll for the old X86 version.

Could not load file or assembly 'Torque, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
#36
06/16/2008 (2:00 pm)
Strange, I'll check on it.

John K.
#37
06/17/2008 (5:48 pm)
John, could you also please update line 549 in the 2Dshape3D to include this

if (OnAnimationTrigger != null)
#38
07/14/2008 (6:08 pm)
Is there a new version of the FPS project to download? I can't get the xbox solution to compile. The windows one works fine. I thought I read there'd be a fix posted soon, but I don't recall where. It's been several weeks and I was hoping to get started using the FPS sample as a baseline for an xbox game I want to prototype.

Thanks
#39
07/14/2008 (10:37 pm)
John,
Using the new dll's provided above I get the following error recompiling the FPS sample on windows (it was working prior on windows)

at _myGame.Run(); in Game.cs

MissingManifestResourceException was unhandled

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "GarageGames.Tourque.EngineData.EngineData_x86.resources" was correctly embeded or linked into assembly

Any suggestions? If I flip back to the original dll it works fine.
#40
07/17/2008 (2:49 pm)
Devon,

I understand you got the TorqueX FPS demo to deploy and run on the xbox? I used info from this post and from Josef's post:

http://www.garagegames.com/mg/forums/result.thread.php?qt=73881

and I got it to compile and deploy to the xbox, but it's failing with:

I followed the directions, and it seems to work but is erroring at runtime. I used the FPS demo as a test, it's failing on loader.Load(_currentLevel);

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

_currentLevel = data\\levles\desertLevel.txscene

Any ideas what might be wrong?

I'm wondering if you might have any suggestions on what I might be doing wrong?

Thanks