Forum C# Is the System.Drawing was executed in production

Is the System.Drawing was executed in production

Postby SteelBattle » December 27th, 2010, 12:20 am

Hi,

(I am french so sorry for my bad english)

I want to use System.Drawing for rectangle collision detection (with http://msdn.microsoft.com/en-us/library/y10fyck0.aspx). I see that the library is available and works for creating the debug image on the developpement server.

But, is the library is still available on production ? (for my rectangle collision check)

Thanks you !

EDIT : I saw that when we use your default code for generating debug image on developpement server there are many ressources used (garbage collector free 100Mb of ram each 5sec and 400Mhz was used constantly on CPU)... So i suppose you disabled the Draw library... Am I right ?

Cordially.
SteelBattle
 
Posts: 7
Joined: December 8th, 2010, 2:01 pm

Re: Is the System.Drawing was executed in production

Postby Benjaminsen » December 27th, 2010, 3:48 pm

Hi there,

The drawing library is available for use in the development and the production server.

However, only the development server will call the GenerateDebugImage() method after you call RefreshDebugImage(). The production server will just ignore calls to RefreshDebugImage().

You can use the system.drawing methods from outside the GenerateDebugImage() methods, but most likely you'll run into the CPU or Memory limitations. In short, i would not advise that you use the system.drawing classes for collesion detection etc... it's probably better to do you own thing.

- Chris
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Is the System.Drawing was executed in production

Postby SteelBattle » December 27th, 2010, 4:44 pm

Thanks you for your response.

So I have to apply another method, do you have any suggestion for any technology to use in C# for collision detection ? AABB (Axis Aligned Bounding Box) and OBB (Oriented Bounding Box).

Cordially.
SteelBattle
 
Posts: 7
Joined: December 8th, 2010, 2:01 pm


Return to C#