Eclipse, it looks sweet.
I wish you good luck, mate!
BTW, C# question.. Is the reason's C# is so slow compared to C++ is because of the additional interpretation layer (the JIT)?
Hey Orestes ;)thank you!
Let me clarify this before some C# fan hit me with a club
first, the JIT doesn't know anything about the processor in which it is running, so there are no specific machine code optimizations, on the pc it just runs fine, on xbox is a pain in the a** for that.
Second, C# can't inline anything. That's mean that even the simplest of the operators does a lot of jumps and copy just like you're calling a funcion, for example:
Vector3 pos=pos2;
That stuff will do something like Add(x, y, z, x2, y,2, z2), i mean, it will call a funcion and do the copies, in this case calling the function is even slower than simply copying 3 floats.
If this simple code is inside a loop called a lot of times every frame (for example inside the stuff that checks for collisions)it will considerably slow down your game.
To fix that you have to manually copy all the stuff avoiding the operators like:
pos.x=pos2.x; pos.y=pos2.y; pos.z=pos2.z;
you can undestand better the problems around the impossibility to inline code and the stupidity of the JIT compiler here
http://creators.xna.com/en-us/tutorial/optimization_highfrequencyAnother possible problem, but this time on Xbox only, is caused by incrementing class variables inside a loop. It causes what is commonly named a "load-hit-store" problem, you can read more about it here
http://www.gamasutra.com/view/feature/3687/sponsored_feature_common_.phpAnd all that stuff is C# (or better any .NET language) fault, not XNA one..
So yes, C++ is way faster than unoptimized C#, and to optimize your code you have to write a lot of dirty stuff and even make it unsafe, for example i had to activate the unsafe flag to do some optimized math functions which uses bit shift operators. If you can avoid C#, don't fuckin' use it, it offers anything more C++ and there are not so much good libraries too.
@muku i dubt those tests were made using some specific code that slow down C#, in a normal application it is just fine but try do to that stupid code inside your main gameplay loop and you will see:
for (int i=0; i<200; i++)
Vector2 pos=pos2;