tags:

views:

59

answers:

2

hello! when i try to load a big map, the screen gets all black and frozen and when i ctrl-alt-delete it i found the following error : " XNA Framework Reach profile does not support 32 bit indices. Use IndexElementSize.SixteenBits or a type that has a size of two bytes. " . Any ideas ?

A: 

Yes. Do not put all that maps on the screen at the same time. That simple. Not in one batch.

TomTom
i got that .. the idea is how do i resolve it when i have a big map?
Badescu Alexandru
By loading it into your program and then generating meshes as needed. THis also allows you to do LOD (Level of detail). Tehre are complete books written on how to efficiently show terrain, so please do not expect me to repro them here ;)
TomTom
i didn't expect that , i just wanted to hear "then generating meshes as needed" . I thought that i should break the map into smaller maps. Thanks !
Badescu Alexandru
And consider getting off XNA - if you program for PC and not XBox, use SlimDx. FAster, better, DirectX11.
TomTom
thanks for the tip! i'll look into it
Badescu Alexandru
+2  A: 

Change from the XNA Reach profile to the XNA HiDef profile.

Here is a list of the differences.

And here is an explaination of how to switch between the two.

Alternately:

If you are loading models, use models with fewer polygons.

Or, if you are using the IndexBuffer class directly, construct your instances with IndexElementSize.SixteenBits or typeof(short) (depending on which constructor you use).

Andrew Russell
i'm going to go with HiDef. i would like to make the game also for windows phone so i think for wPhone i'll switch to Reach and load a lower polygon map. Thanks for being so explicit and for you time!
Badescu Alexandru
You're welcome :)
Andrew Russell