Jump to content
  • Advertisement
Sign in to follow this  
Khatharr

Should I learn .NET for making design tools?

This topic is 2136 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

Hello. I'm at a point where I'm starting to get tired of the ridiculous rectal discomfort that constitutes designing and coding a GDI window w/controls, etc. I need to be able to make design tools (map editors, file packagers, etc) for my games, but it seems like when I do I end up spending three times the effort on designing the interface as I do designing the functionality.

So I'm wondering if learning and employing .NET is something that would save me time in this area. Specifically, is it significantly easier to create/manipulate GDI based applications with .NET? The impression that I get from just glancing at it is that it's a sort of C'ish language for developing apps by using the same kind of underlying system that powers VB.

I guess what I really mean to ask is, is it really worth the time and effort to pick up this language just so I can crank out project-specific dev tools faster? I sort of don't want to spend the time trying to learn yet another MS API unless it's going to cut my design time by something like 25%.

Any advice/comments/suggestions much appreciated. :)

Share this post


Link to post
Share on other sites
Advertisement
Hard to say without knowing what you're using now, but my first instinct would be to say yes, you definitely should.

IMHO, C# is a much nicer language than C, C++ or java.

As long as you're comfortable writing windows specific tools, .Net is a great choice.

Share this post


Link to post
Share on other sites
.NET isn't a language on its own, its a framework that other languages run on top of much like javas virtual machine.
C# and VB.net are the main languages for it although there is a C++ dialect/port/superset/whatever and F# as 2 other microsoft made languages. There are several languages and ports of languages that are not made by microsoft aswell.

[quote name='Taken From Wikipedia']
Microsoft languages for .NET

  • C#
  • Visual Basic .NET (VB.net or just VB for short)
  • C++/CLI (C++ for .NET basically)
  • F#
  • J#
  • JScript.NET
  • Windows PowerShell <- Wikipedia lists this one although I can't find any language called powershell for .net

    Non Microsoft languages for .NET

    • Axum
    • A#
    • Boo (python like syntax)
    • Cobra
    • M
    • Oxygene
    • IronScheme
    • IronPython
    • IronRuby
    • Nermerle
    • Phalanger
    • P#
    • Scala

      The languages with iron preceeding them are essentially the language modified to run on .net, for example ironpython is python 2.x running on .net. It can be used as a standalone language or it is fully possible to embed it in another application (lets say written in C#) and use it as a python scripting engine for your application. Same goes for ironruby aswell but I don't think ironscheme can be used as a scripting engine (I dont know enough about it)
      [/quote]
      Using Visual C# Express (free version of visual studio with compatibility for C# only) is a pretty quick way of making windows applications. The built in forms designer works really well. There is also visual VB.net express and I believe one for C++. Otherwise you need to get the full version of visual studio (not free) to develop in multiple languages. An alternate IDE is sharpdevelop but I just don't find it as nice to use, it does however feature ironpython, ironruby, boo, C# and VB.net from a clean install.

      You haven't mentioned what language your using to develop your games but if its one of the ones ported or capable of running on .net then the transition should be minute.




      EDIT:
      I should also mention that .net isn't windows specific. There is an alternate implementation compatible with pretty much all the same languages called mono. Mono can run on mac, windows and linux aswell as a few more obscure OS'es out there, for now though focus on .NET then you can port your project later if you wish to reach these market segments. There are several guides on porting .net projects in any language to run on mono for cross platform support. Edited by 6677

Share this post


Link to post
Share on other sites

Hello. I'm at a point where I'm starting to get tired of the ridiculous rectal discomfort that constitutes designing and coding a GDI window w/controls, etc. I need to be able to make design tools (map editors, file packagers, etc) for my games, but it seems like when I do I end up spending three times the effort on designing the interface as I do designing the functionality.

So I'm wondering if learning and employing .NET is something that would save me time in this area. Specifically, is it significantly easier to create/manipulate GDI based applications with .NET? The impression that I get from just glancing at it is that it's a sort of C'ish language for developing apps by using the same kind of underlying system that powers VB.

I guess what I really mean to ask is, is it really worth the time and effort to pick up this language just so I can crank out project-specific dev tools faster? I sort of don't want to spend the time trying to learn yet another MS API unless it's going to cut my design time by something like 25%.

Any advice/comments/suggestions much appreciated. smile.png

C# is almost as fast, almost as functional and a lot easier to use.
C++ is faster, more flexible and much harder to use.

So, unless you love C++ and hate C#, it's probably worth using. C# can load C++ dlls; I don't know if C++ can load C# dlls (never looked into it).

Edit: Also, Visual Studio Express comes in more flavours than just C#: Microsoft VSE download page Edited by Narf the Mouse

Share this post


Link to post
Share on other sites
For GUIs, C# with WinForms is *incredibly* easier than C with Win32. I highly recommend it for tools.

WinForms is not fully supported on Mono. We had serious issues on Macs with multiple monitors (several UI widgets will not respond at all on a Mac's second monitor under Mono). For the project I worked on, I had to use GTK# to make it stable across platforms. Unfortunately GTK# is nowhere near as easy to develop with as WinForms is. Edited by Nypyren

Share this post


Link to post
Share on other sites
There is an alternative route which I'm taking.

I'm using opengl in my game which will [by design] support whatever I make, so it makes a lot of sense to incorporate an editor section 'in game'.

A standard game has: game mode; game menu; main menu. I've simply added a design menu.

It's literally accomplished via a floating toolbar rendered over a standard 3d game view, with some extras such top/front/left ortho views. It has (or will when it's finished!) all the benefits of an external editor, but simpler to code for.

Edit to add that a .NET language would also be ideal if you prefer the separate application approach. Edited by mark ds

Share this post


Link to post
Share on other sites
Firstly, thank you everyone for your advice so far.

Using C++. Sorry.

I've considered simply building in-game scenes to employ the needed functionality, but for some reason it just feels icky to me.

Mostly I'm just looking for something that will make it fast and easy to throw the window together, but still able to support whatever underlying code I want to use in it. I really prefer that the structs I use for packing data into a file are the same in both the reading and writing applications. Additionally, being able to use libs on both ends is sort of important, so that I can reliably make use of zlib for compression/decompression(for example).

If I were to use C# would I be able to use C libs normally or would I need to compile my functionality into a dll and then load that into a C# app? (Because that sounds like sort of a larger pain in the bum, tbh.)

Alternatively, is it worth messing with .NET if I only use it in C++?

Thank you again for your help here. :)

Share this post


Link to post
Share on other sites
Forget about the syntax... c++, c# or vb under .NET essentially share the same programming model. The data structures can be completely compatible and reusable - but it's up to you to make it so.

As for integrated editors being 'icky'!!! That's for you to decide. But many companies are going down that road because of the natural integration between similar systems.

If a particular approach doesn't suit your prefered method, that's fine - we all code in different ways. But from *your* viewpoint, considering the easiest/fastest method of incorporating many different elements should be based on what works best for *you* - not others. Only you can decide that.

Share this post


Link to post
Share on other sites

If I were to use C# would I be able to use C libs normally or would I need to compile my functionality into a dll and then load that into a C# app? (Because that sounds like sort of a larger pain in the bum, tbh.)



When you say "use C libs normally", I'm guessing you mean static linking to a .lib? In that case, no you won't be able to do that from c# and you will need to put it in a dll.


Alternatively, is it worth messing with .NET if I only use it in C++?


It's not as nice as C#, but it's probably still an improvement over raw C++. Winforms is a much nicer api than Win32.

It really depends on how big your C api is. If don't you have a lot of C functions, it will certainly be cleaner to wrap them in C++/CLI and call that from C#. Whether that's maintainable will depend on you. Potentially you could look into some sort of code generation from your .h files?

Share this post


Link to post
Share on other sites
You could use C++/CLI and Visual Studio Express.

Visual Studio has a Windows Form editor so you can drag and drop and visually create the window itself and then just program the underlying functionality in C++.

From my experience C++/CLI is basically C++ except it runs on .NET and includes a garbage collector.

Normally you would do this:
MyClass* myClass = new MyClass();
delete myClass;

In C++/CLI you would do this:
MyClass^ myClass = gcnew MyClass();
// no delete since GC cleans it up for you

Alternatively you could look into Qt SDK and the Qt Creator.

The Qt Creator allows you to visually drag and drop and create the window just like in Visual Studio and then you just program it in normal C++.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!