Sign in to follow this  
Zoma

Unity [.net] Best way to go for game tools?

Recommended Posts

I'm going to write an editor for an existing game engine. The engine is written in as a Windows C++ program written in MFC (although there's very little windows code involved). I need to make a decision as to how I'm going to write the editor within the next few days. My original thought was to do it with MFC, as I'm vaguely familiar with it and can probably get up to speed fast enough to get it working. But I have the opportunity to move to either managed C++ or C#. I've been told by a knowledgeable friend NOT to use managed C++, as it can be a hastle and will not save me much. If I go with C#, I'll obviously have to learn it and have to figure out how to get the game engine to integrate with C#. Anyone want to give me opinions on C# vs Managed C++ vs MFC for this instance? Thanks

Share this post


Link to post
Share on other sites
I'd recommend using the same code base from the game render-engine for the editor, so you will always be synched. So I'm guessing the easiest way is to stick with the original language.

Share this post


Link to post
Share on other sites
I think you could use C++ with some parts being managed ie. garbage collected. I use c++/mfc/stl/win32/gl and that's plenty good for me. MFC can be a pain sometimes to work with but you do have the source code and there is lots of info on the net/msdn. It's my understanding that .net comes with lots of features built in that you would have to do in mfc by hand like colored buttons for example so in that sense .net is probably better windowing api. If I were starting over I would probably use .net api with C++ for maximum flexibility and speed. C# is fully managed and might be slow for real-time feedback editor.

Share this post


Link to post
Share on other sites
The benifit of (and reason for even having) managed C++ is so that you can import your existing C++ code and have it "just work".

My current project shares actual C++ files between the unmanaged C++ engine and the managed C++ editor. This is the only way to do it, particularly because when you add something to one, it works right away in the other (almost halving the time it takes to program). Don't even think of having seperate but equivelent code in C# and in C++ (or in the editor and the engine, not matter what language).

I am not sure if you could share in the C++ code when using C# to write the editor/Windows Forms stuff itself, but I suspect you can. If this option is available, then I'd take it.

Using Windows Forms/managed C++ is very easy, the code is just somewhat less pretty looking than C# (but practically equivelent).

I'd avoid MFC. I have not had much experiance with it at all, but I'm almost positive that programing with Windows Forms will get your program written faster.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this