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 ?
views:
59answers:
2
A:
Yes. Do not put all that maps on the screen at the same time. That simple. Not in one batch.
TomTom
2010-10-28 18:26:39
i got that .. the idea is how do i resolve it when i have a big map?
Badescu Alexandru
2010-10-28 18:28:53
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
2010-10-28 18:32:24
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
2010-10-28 18:38:35
And consider getting off XNA - if you program for PC and not XBox, use SlimDx. FAster, better, DirectX11.
TomTom
2010-10-28 18:50:50
thanks for the tip! i'll look into it
Badescu Alexandru
2010-10-28 18:56:18
+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
2010-10-29 02:03:54
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
2010-10-29 07:44:06