-
Website
http://tirania.org/blog -
Original page
http://tirania.org/blog/archive/2008/Nov-03.html -
Subscribe
All Comments -
Community
-
Top Commenters
-
Max "WorldMaker" Battcher
7 comments · 1 points
-
psantosl
18 comments · 1 points
-
whitemice
8 comments · 1 points
-
barrkel
6 comments · 3 points
-
Ed Ropple
27 comments · 13 points
-
-
Popular Threads
-
C# Support for Tuples - Miguel de Icaza
1 day ago · 27 comments
-
C# String Interpolation - Miguel de Icaza
4 days ago · 62 comments
-
Nine Months Later: Mono 2.6 and MonoDevelop 2.2 - Miguel de Icaza
1 week ago · 46 comments
-
Releasing Moonlight 2, Roadmap to Moonlight 3 and 4 - Miguel de Icaza
1 week ago · 31 comments
-
New Moonlight Covenant has been posted - Miguel de Icaza
2 days ago · 6 comments
-
C# Support for Tuples - Miguel de Icaza
Please let us know if there are some helper methods that you think would be useful to have, I suspect we are going to need a dot product method (even if it is only available on SSE4 systems).
There are several methods defined like this:
public static unsafe Vector4f operator | (Vector4f v1, Vector4f v2)
{ ... }
AFAIK, unsafe methods are not CLS-compliant, so theseeither need a [CLSCompliant(false)] attribute or they need the unsafe keyword removed (an unsafe block inside the function should be enough).
I'm sorry if this is not the correct place to make suggestions / feature requests - maybe this should go to the mono-dev list instead?
That is what I get for typing it from memory; Will fix as soon as I get back to work where my blog software is.
Best Regards, Nikolay
There is already a project that does CUDA integration at least.
Great stuff! In your presentation, there's a few things that are slightly off, related to the game development stuff:
The part about AI taking up a large amount of the "frametime" of a game. It's actually a bit more general
The parts that are traditionally written in "slowy" languages include:
- indeed AI
- steering behaviour for those birds that fly around in the island demo
- reading mouse input, and deciding where the camera should go
- deciding when to play sounds, when to start this or that animation
- checking if a player is close enough to a powerup that he should actually pick it up,
- keeping score of the game
- dealing with the server communication in case of multiplayer games
- much more that depends on what kind of game you are making.
The total often gets referred to as "scripting" (since it is often done in a non c++ programming
language. this term might change as very slowly more and more parts of a 3d engine get doable
in nicer languages that c++), or as "game code". (a term engine programmers often use when
they mean "all that stuff that I don't write")
So not only is mono able to speed up my ai, it brings the performance of my entire gamecode up
like 20x from the performance I had in previous engines where I had to do all this stuff in a very slow
proprietary scripting language.
Mono greatly enhances the amount of stuff I can do in a game, and I love it.
Read the Makefile and see rkf.cpp (the original is in rk.cpp)
Miguel.
All in all, the C++ code looks like written a novice (an argument against C++, I guess). But this is a good direction to take. Keep up the good job!
The source code for C# is just a straight forward port with no tuning or performance improvements attempted. It could also be tuned up and improved (for example, using unsafe code would boost its performance).
As I mentioned in the talk and elsewhere, C++ SIMD intrinsics would give you a major boost over plain C++ just like it did for Mono. But our research direction was on improving Mono to the point that it would satisfy the needs of game developers that would like the safety and productivity of a managed language without having to pay the high price of going to C++.
And why do you use a for-loop to compute the sum of two vectors? The compiler better has a good loop-unroll functionality because otherwise it makes the comparison even more meaningless.
The same would happen if you use Mono.SIMD on a platform without SIMD support, for example a 486 computer, the code would continue to run just fine, but it would not get any hardware accelerated benefits.
When we showed the code at the PDC the code was already live, and the performance tests were all done with the code that was available at the time on SVN. We just did not go out of our way to advertise it.
Notice that improvements to the API and to the JIT code since the PDC have improved Mono's performance on these tests.
Itai.
Do you plan to rewrite advanced functions with SIMD support? Ln, Exp, Sqrt, Pow just to mention some of them...
The best thing is to discuss this on the mailing list or check our SVN release.
I am very interested in suggested SIMD support and just finished speed measurments in my particular environment: SuSE 11 running in VurtualBox 2.1. Detailed description of my results is in the following post: http://kyta.spb.ru/monosimd.aspx
Briefly speaking, I could win 100% of speed for mono with -O=simd switch, and at the same time I could loose 50% of speed for mono with -O=-simd switch.
That is not what I expected from your presentation, but 100% are still 100%... The other point is VirtualMachine environment. I think this could break everything. I will try to execute this snippet in "real" environment asap.
Best Regards,
Anton.
http://cristianadam.blogspot.com/2009/01/mono-2...
Why are the Vector structs are not Serializeable?
(I've tried to write a dotNet to Mono Runtime Bridge using .Net Remoting, which is working but I cant use e.g. Vector2d directly)
Please design the feature, code it, and post it to the mailing list, we will be happy to review it/integrate it.