Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Should I learn .NET for making design tools?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
23 replies to this topic

#1 Khatharr   Crossbones+   -  Reputation: 3040

Like
0Likes
Like

Posted 02 July 2012 - 02:40 PM

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. :)
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Sponsor:

#2 ChaosEngine   Crossbones+   -  Reputation: 2502

Like
1Likes
Like

Posted 02 July 2012 - 02:55 PM

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.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#3 6677   Members   -  Reputation: 1058

Like
1Likes
Like

Posted 02 July 2012 - 03:04 PM

.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.

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)

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, 02 July 2012 - 03:07 PM.


#4 Narf the Mouse   Members   -  Reputation: 318

Like
0Likes
Like

Posted 02 July 2012 - 03:19 PM

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. Posted Image

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, 02 July 2012 - 03:22 PM.


#5 Nypyren   Crossbones+   -  Reputation: 4818

Like
1Likes
Like

Posted 02 July 2012 - 03:56 PM

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, 02 July 2012 - 03:57 PM.


#6 mark ds   Members   -  Reputation: 1484

Like
0Likes
Like

Posted 02 July 2012 - 04:49 PM

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, 02 July 2012 - 04:58 PM.


#7 Khatharr   Crossbones+   -  Reputation: 3040

Like
1Likes
Like

Posted 02 July 2012 - 05:25 PM

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. :)
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#8 mark ds   Members   -  Reputation: 1484

Like
0Likes
Like

Posted 02 July 2012 - 07:22 PM

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.

#9 ChaosEngine   Crossbones+   -  Reputation: 2502

Like
0Likes
Like

Posted 02 July 2012 - 07:46 PM

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?
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#10 eFoDay   Members   -  Reputation: 300

Like
1Likes
Like

Posted 02 July 2012 - 08:26 PM

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++.

#11 Khatharr   Crossbones+   -  Reputation: 3040

Like
0Likes
Like

Posted 02 July 2012 - 10:06 PM

Ah. I'll take a look at it then.

Thank you, everyone. Posted Image
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#12 CyberRascal   Members   -  Reputation: 208

Like
0Likes
Like

Posted 04 July 2012 - 01:36 AM

I see many people here recommend winforms - but it is like the retarded uncle of WPF. If you want to easily make a good looking, and/or custom looking GUI, you should learn WPF instead, ESPECIALLY if you don't already know winforms.

It's databinding support is an ridiculous amount better than winforms, it separates view and logic ala HTML (but more app-centric, of course) via XAML, it is hardware accelerated among more things. On one occasion I made the backend in C++, made a wrapper library using C++/CLR, and made it available to end-consumers via WPF. Very smooth.

I should point out that for now WPF seems to be windows only - relying heavily on D3D etc, etc, it's probably hard to make a mono implementation. If I recall correctly, winforms also had a few problems running on mono.

On a final note, C# is a very pleasant language. :) It's not quite as powerful as C++ when it comes to templates among other things, but syntax-wise and ease-of-use it's very good.

#13 ChaosEngine   Crossbones+   -  Reputation: 2502

Like
1Likes
Like

Posted 04 July 2012 - 04:46 AM

I see many people here recommend winforms - but it is like the retarded uncle of WPF. If you want to easily make a good looking, and/or custom looking GUI, you should learn WPF instead, ESPECIALLY if you don't already know winforms.

It's databinding support is an ridiculous amount better than winforms, it separates view and logic ala HTML (but more app-centric, of course) via XAML, it is hardware accelerated among more things.


It's also slow, bloated and has a very uncertain future. I worked on a wpf app for 3 years and it really wasn't worth it. Even MS have stopped pushing it in favour of html5.

Winforms, on the other hand, might not be sexy, but it's stable, fast and has a user base that's an order of magnitude larger than any wpf app.

In fact, I've only seen two WPF apps in the wild. One is Visual Studio 2010 and the other was Evernote (and they eventually ditched it)
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#14 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 04 July 2012 - 01:19 PM

Winforms under mono is supposedly much more reliable now but they still recommend GTK# instead. GTK# though there isn't any reason why you can't use it on a .net application, you just loose visual studios graphical designer which is excellent IMO.

#15 CyberRascal   Members   -  Reputation: 208

Like
0Likes
Like

Posted 05 July 2012 - 01:31 AM

It's also slow, bloated and has a very uncertain future.


I'm not saying you are wrong, even though my experience is not the same, but do you have anything backing that up?

Windows Forms will not have any future development.


I know it's just a wrapper for the Win32 API, and support isn't going to be dropped for it, but still.

Admittedly, I haven't tested WPF on computers older than about 6 years, but I've never noticed anything sluggish.

Bloated is a somewhat weird notion. A bloated UI is obviously bad, since it is very cluttered, hard to get an overview. Some people call C++ bloated. Other people call it feature rich. Other people say that it has a too small standard library. In WPF you can just use what you want.

I've also worked on a commercial WPF app, but very small. I found it comfortable to use. YMMV.

Edited by CyberRascal, 05 July 2012 - 01:32 AM.


#16 Amr0   Members   -  Reputation: 1157

Like
1Likes
Like

Posted 05 July 2012 - 04:05 AM

In my opinion pure windows GUI programming (win32) needs some getting used to, but it's not really as hard as everybody seems to believe. It's incredibly powerful once you get the hang of creating your own custom window types (controls). If you don't like GDI, go HW-accelerated and draw everything yourself with Direct3D or OpenGL. You also get to stay close to your engine and within C++ without having to muck about with interoperability with .NET.
Also, you can always check some of the available win32 C++ wrapper libraries like win32++ or DWinLib.

Edited by Amr0, 05 July 2012 - 04:40 AM.


#17 MichaBen   Members   -  Reputation: 481

Like
0Likes
Like

Posted 05 July 2012 - 12:14 PM

In my opinion pure windows GUI programming (win32) needs some getting used to, but it's not really as hard as everybody seems to believe.

True, but not hard to use doesn't make something efficient. It's not hard to make a hole for a pool in your garden using your hands either, still most people would rather use a shovel instead. Same with win32, trying to make a advanced GUI application in pure win32 will take you twice as long as it would with any decent GUI toolkit, or even longer if you want to use special GUI widgets that win32 doesn't natively has but you have to make yourself first. However there is no reason that using C++ means using win32, in fact the main reason why C++ has a bad name when it comes to GUI is WIN32. However there are several decent GUI toolkits available for C++ that are just as good or even better then stuff like Winforms.

Personally I'm using Qt for tools as well as prototype applications, it comes with an extensive library of not just GUI widgets but also a powerfull application framework. It also has a decent form designer, not just for placing GUI elements but also setting up the events. It's very easy to make a GUI in it, and it can easily be integrated with your c++ game engine by having a custom widget to which your engine can render.

#18 ChaosEngine   Crossbones+   -  Reputation: 2502

Like
0Likes
Like

Posted 05 July 2012 - 03:57 PM


It's also slow, bloated and has a very uncertain future.


I'm not saying you are wrong, even though my experience is not the same, but do you have anything backing that up?


I don't have any hard numbers at the moment (I left that job 18 months ago), but the WPF app was using nearly 10 times the memory of the equivalent winforms app and took 2-3 times as long to start up.


Windows Forms will not have any future development.


I know it's just a wrapper for the Win32 API, and support isn't going to be dropped for it, but still.


Agreed, winforms isn't ideal, but it's still better than WPF. No-one is using it. It utterly failed to get any traction in the marketplace.


Bloated is a somewhat weird notion. A bloated UI is obviously bad, since it is very cluttered, hard to get an overview. Some people call C++ bloated. Other people call it feature rich. Other people say that it has a too small standard library. In WPF you can just use what you want.


When I say bloated, I was referring to the memory usage.

I've also worked on a commercial WPF app, but very small. I found it comfortable to use. YMMV.


The company I worked for bet on WPF as the successor to winforms and committed to using it for an enterprise LOB app after a few experiments with smaller apps. And for small apps, it was great, but it just doesn't scale well at all.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

#19 eFoDay   Members   -  Reputation: 300

Like
0Likes
Like

Posted 06 July 2012 - 02:57 PM

I just installed Windows 8 Release Preview and Visual Studio 2012 RC. The UI for your app is now developed with either XAML or HTML. The .NET forms designer is gone and in its place is an XAML designer. So if you are interested in the future of Microsoft GUI development you may want to investigate XAML.

#20 szecs   Members   -  Reputation: 2185

Like
0Likes
Like

Posted 07 July 2012 - 08:00 AM

I think it depends heavily on the goals. Are you talking about generic, fancy tools or just stuff to make specific things to specific games?

I made a specific map editor that only had keyboard input and was perfectly enough. I'm also making an editor that I want to release, and I think I will try Qt for that or some other powerful stuff.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS