Why C# and not VB for game tools

Started by
13 comments, last by theLoneCoder 14 years, 1 month ago
Quote:
More accurately, the development environment lacks some things that make it useful for tool development.

I was actually referring to real language features -- reflection, GC, et cetera -- that allow for either powerful mechanisms to write less code to cope with data (the former) or write less boilerplate management code (the latter). And so on.
Advertisement
Quote:Original post by jpetrie
Quote:
More accurately, the development environment lacks some things that make it useful for tool development.

I was actually referring to real language features -- reflection, GC, et cetera -- that allow for either powerful mechanisms to write less code to cope with data (the former) or write less boilerplate management code (the latter). And so on.


Sure, that makes sense. The standard library disparity is what always leaps out at me... it tends to obscure some of these other benefits.
I used Java for tool dev for the same reason one would use C# or VB.net. These languages are pushed for "Rapid Application Development" and if you know how to use them, they do exactly as it says on the tin.

C++ is supported on platforms you won't run your tools on and has performance advantages that do not apply to tools (or any amateur level games I've ever seen).

.NET offers Winforms which makes it easy to develop GUIs. It has managed memory which is a development time saver. These are things you need to make your tools.

Quote:how to make a simple mapeditor? will i be drawing a dx buffer inside a window(now whole window)?


I used the basic Java Graphics API to draw into a Component. Buttons and all these things are components. You can make most of your GUI in Winforms, then use a lower level graphics API (whatever it is in .NET) to paint your level visualization. You could use DX or whatever is quickest and easiest to do.
Quote:Original post by jtagge75
Back when I swung that way, I made my apps dialog boxes instead of standard windows. Then I could just use the resource editor to add my UI parts. Could do fairly complicated GUI apps this way (did lots actually).

I once worked with a tool that was built like that. The thing captured key combinations like Ctrl + S, disabling quick saving in any other program I had open at that time, and if I accidentally pressed escape while working with it, it would close immediately... not sure if that behavior is inherent to dialog boxes, but it sure was annoying. ;)


And yeah, for GUI apps, C# is a good first choice. Others said it already: it's easy to set up an interface and it's a nice language for tools. I prefer Python for most other tools though. Automated data-processing scripts, data visualizers, that sort of stuff.
Create-ivity - a game development blog Mouseover for more information.
I've made tools in C++ and C#. C++ using GDI allows you to do some things that .NET doesn't allow you to do easily, like a NOT Pen (changing the colour of the line you are drawing depending on the colour you are drawing over, ie drawing a line that is black over white and white over black), but it gives you so much control that unless you are very careful you run the risk of making something that reacts differently to any other program.
The advantage of a GUI is that you don't have to relearn a lot of different things to use a new program. Unless you are careful and put a huge amount of effort into making your tool comply with all of the little conventions you won't have that advantage and everyone who wants to use your tool will have to learn it. That is a huge problem and increases the difficulty of making a good tool.

The advantage of C# and other .NET languages is that it provides a huge amount of functionality that works the same way as everything else in the system. So it reduces the total amount of work required. Any language that provides similar advantages is good, pick the one you are most familiar with.

This topic is closed to new replies.

Advertisement