Jump to content
  • Advertisement
Sign in to follow this  
Amma

[.net] Advantages by using C# for a game editor?

This topic is 4874 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, My current game editor is written in C++ using QT. However, lately I've gotten very tired of the lack of 'windows' feel/look of QT. I've been seriously thinking of using MFC again (in wrapper classes of course). Then I read somewhere that C# is the made for UI design. Can someone ellaporate on this? How is it easier and are there any problems with integrating an C# editor with my game engine written in very high level C++?

Share this post


Link to post
Share on other sites
Advertisement
The main advantage I can think of would be a shorter development time. C#, or more generally .Net in Visual Studio, uses a WYSIWYG approach to form design where you drag-and-drop widgets and set their properties using the IDE. Of course, you can then add functionality using the code which sits behind the form. If you're familiar with earlier versions of Visual Basic and to some extent FoxPro, then you shouldn't have any problems picking it up.

As for how easy it would be for you to integrate it with your engine, I guess that would depend. If your game editor will be used to create levels, for example, and you want to create the levels with an editor made with C# .Net in Visual Studio, the only thing connecting your game engine in C++ to the editor in C# is the file format.

zdlr

Share this post


Link to post
Share on other sites
Emphasizing what the above poster said, you'll save hugely on development time, and the language's ease-of-use will leave you with a warm fuzzy feeling in your stomach. :)

Share this post


Link to post
Share on other sites
I just switched to using C# to rewrite my level editor, an aside from some short problems setting up openGL to work in C#, it has been smooth sailing. Its amazing how many things that I had code written out for in my old editor are practically automatic in C#. Also, things like including openGL in a window are simplified greatly versus plain C++ with MFC/Win32.

-Shane

Share this post


Link to post
Share on other sites
If you need to compile in a lot of the C++ classes/structs/functions/etc from your game engine, I recommend using Managed C++ and use the .Net System::Windows::Forms stuff the same way that you would in C#. Slightly more cumbersome than C#, but C# is far more cumbersome if you need to import a bunch of C++.

What I mean is, say you've got all your loading/saving code for a bunch of game objects written in C++. You can't just say #include in C# and have them available - you'd have to either write the same functions again in C#, or compile the C++ stuff into a DLL that exports the classes/functions properly, and DllImport them. If you used managed C++, you *could* just say #include, but you'd have to learn a few nasty things about managed C++. My experience has only been with the Visual Studio 2003 version of managed C++, apparently 2005 is a lot different (using the ^ instead of * for managed pointers?! whoa!) :)

If you don't need to use very much stuff from your engine, use C#. It's glorious for Windows UI tools.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!