Jump to content
  • Advertisement
Sign in to follow this  
macmoy

Why C# and not VB for game tools

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

Why use C# rather than VB in making game tools? for C#, how to make a simple mapeditor? will i be drawing a dx buffer inside a window(now whole window)? making a tool in C# meaning you'll use the tools in the toolbox such as buttons, textboxes, etc? or you'll make them by coding it? Please give some tips on how do professional game developers make their game tool in C#.. I made a tool once but I used VB6 not even VB.net. Thanks..

Share this post


Link to post
Share on other sites
Advertisement
Quote:

Why use C# rather than VB in making game tools?

Why not? As long as you're talking about VB.Net, they both offer basically equivalent language features. If you're just doing Windows Forms stuff and you know VB better than C#, VB would be fine.

Quote:

for C#, how to make a simple mapeditor?

That's really too involved of a question. You'll have to break it down.

Quote:

will i be drawing a dx buffer inside a window(now whole window)? making a tool in C# meaning you'll use the tools in the toolbox such as buttons, textboxes, etc? or you'll make them by coding it?

With managed APIs for DirectX, such as SlimDX, you can set things up so that you are rendering to a specific control -- often, people using Windows Forms use Panel controls, and pass the Handle property of the Panel control to the Direct3D setup routines.

The other parts of the tool -- buttons, list boxes, et cetera -- that are not the "engine viewport" (renderer) are generally done with the windowing API being used. This is usually Windows Forms or WPF.

Quote:

Please give some tips on how do professional game developers make their game tool in C#

Hundreds of different ways, most of which are irrelevant to you because you're not a professional game developer. What matters is what your needs are, not theirs. So figure out what you need from your editor and work from there.

Share this post


Link to post
Share on other sites
Ah i see.. Another question. Since some(including me) use C++ for game development, why not also use C++ for the tools?

Share this post


Link to post
Share on other sites
Quote:
Original post by macmoy
Ah i see.. Another question. Since some(including me) use C++ for game development, why not also use C++ for the tools?


C++ is used for tools. There is no specific language for tool development. Work with what best suits your needs.

Share this post


Link to post
Share on other sites
ahh okay.. thanks guys.. the only thing that confuses me is that my professional game developer friends always suggest me to use C#. anyway, thanks again ^_^

Share this post


Link to post
Share on other sites
C++ lacks some language features that can be extremely useful for tool development. Some of those can be provided in libraries, others can't. In the end you need to look at your requirements, your available skillset (and how that measures up against your requirements) and choose the toolchain that works for you. What other people use is largely irrelevant.

Share this post


Link to post
Share on other sites
Quote:

C++ lacks some language features that can be extremely useful for tool development.


please give example.. thanks..

Share this post


Link to post
Share on other sites
Quote:
Original post by macmoy
Why use C# rather than VB in making game tools?

for C#, how to make a simple mapeditor? will i be drawing a dx buffer inside a window(now whole window)? making a tool in C# meaning you'll use the tools in the toolbox such as buttons, textboxes, etc? or you'll make them by coding it?

Please give some tips on how do professional game developers make their game tool in C#.. I made a tool once but I used VB6 not even VB.net.

Thanks..


I wrote my map editor in C#, but that was simply because I feel more comfortable using C style syntax. It could have been done just as easily in VB.NET I suppose. Both use a Windows Forms editor to place controls. But either way you will likely need to write custom user controls that suit your needs. Use whichever you feel more comfortable in, or whichever one you want to learn/get better at.

Your friend may want you to use C# because the C style syntax is more common than the.... somewhat esoteric... VB syntax.

VB6 though... don't get me started. I could write a 10 page diatribe on that.


Edit: I just thought of something else. I think VB tries to hide the things going on under the hood from the developer, where as C# it's a bit more transparent. This would encourage a developer to delve a bit deeper and get a better understanding of the framework, instead of VB developers who like to remain blissfully ignorant. VB may be more appealing to beginners for this reason, but if you're courageous enough to jump into C# you'll likely end up a better programmer IMO.

An example that come to mind is using delegates for events in C# which I think better illustrates how they work as function pointers vs. using the WithEvents keyword in VB which illustrates nothing but "POOF, MAGIC!".

Of course, making things easier isn't necessarily a bad thing. If it was we would still all be using assembly language. But like most things, it's a trade off, and I think C# makes a great balance between making things easy, and revealing enough detail about what is actually going on in the code.

[Edited by - CandleJack on February 23, 2010 10:54:56 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by macmoy
Quote:

C++ lacks some language features that can be extremely useful for tool development.


please give example.. thanks..


More accurately, the development environment lacks some things that make it useful for tool development. WinForms for example make setting up a basic UI dead simple (and quick) compared to what you need to do in C++.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
More accurately, the development environment lacks some things that make it useful for tool development. WinForms for example make setting up a basic UI dead simple (and quick) compared to what you need to do in C++.


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). Not a lot more effort then it would take to do it in C#. But today its just much easier to do it all in WinForms and be done with it.

I use C# because the syntax is very similar to C++ so its easy to go back and forth. I've been doing some ActionScript programming lately and if I don't watch it when I go back to C++ I start declaring variables and functions the ActionScript way. Going back and forth from C# to C++ doesn't cause this problem. Probably the reason why most other people do it as well.

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!