• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Khatharr

Should I learn .NET for making design tools?

23 posts in this topic

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. :)
0

Share this post


Link to post
Share on other sites
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.
1

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[list]
[*]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
[/list]
Non Microsoft languages for .NET[list]
[*]Axum
[*]A#
[*]Boo (python like syntax)
[*]Cobra
[*]M
[*]Oxygene
[*]IronScheme
[*]IronPython
[*]IronRuby
[*]Nermerle
[*]Phalanger
[*]P#
[*]Scala
[/list]
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
1

Share this post


Link to post
Share on other sites
[quote name='Khatharr' timestamp='1341261634' post='4955039']
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. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
[/quote]
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#: [url=http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express]Microsoft VSE download page[/url] Edited by Narf the Mouse
0

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
1

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
0

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. :)
1

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

Share this post


Link to post
Share on other sites
[quote name='Khatharr' timestamp='1341271529' post='4955104']
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.)

[/quote]

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.

[quote name='Khatharr' timestamp='1341271529' post='4955104']
Alternatively, is it worth messing with .NET if I only use it in C++?
[/quote]

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?
0

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

Share this post


Link to post
Share on other sites
Ah. I'll take a look at it then.

Thank you, everyone. [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img]
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='CyberRascal' timestamp='1341387385' post='4955552']
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.
[/quote]

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 [url="http://blog.evernote.com/2010/10/26/evernote-4-for-windows-is-here/"]ditched it[/url])
1

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='ChaosEngine' timestamp='1341398804' post='4955586']
It's also slow, bloated and has a very uncertain future.
[/quote]

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

[quote name='Fábio Franco GFT(Partner) at Microsoft (MSDN)']
Windows Forms will not have any future development.
[/quote]

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
0

Share this post


Link to post
Share on other sites
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 [url="http://www.google.ps/url?sa=t&rct=j&q=win32%2B%2B&source=web&cd=1&ved=0CFIQFjAA&url=http%3A%2F%2Fwin32-framework.sourceforge.net%2F&ei=4mb1T7SQNoKY8QP7rIyfBw&usg=AFQjCNFo3JN02gRgocmfiAVv75sIc0hCcQ"]win32++[/url] or [url="http://www.google.ps/url?sa=t&rct=j&q=dwinlib&source=web&cd=1&ved=0CFIQFjAA&url=http%3A%2F%2Fwww.codeproject.com%2FArticles%2F10360%2FDWinLib-A-minimal-Windows-API-wrapper&ei=H2_1T6GyFoXO8QOWkpWsBw&usg=AFQjCNEUaUi-hq-JU6_bOJVZRj4fuKNueQ"]DWinLib[/url]. Edited by Amr0
1

Share this post


Link to post
Share on other sites
[quote name='Amr0' timestamp='1341482741' post='4955914']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.[/quote]
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.
0

Share this post


Link to post
Share on other sites
[quote name='CyberRascal' timestamp='1341473479' post='4955877']
[quote name='ChaosEngine' timestamp='1341398804' post='4955586']
It's also slow, bloated and has a very uncertain future.
[/quote]

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

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.

[quote name='CyberRascal' timestamp='1341473479' post='4955877']
[quote name='Fábio Franco GFT(Partner) at Microsoft (MSDN)']
Windows Forms will not have any future development.
[/quote]

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

[/quote]

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.


[quote name='CyberRascal' timestamp='1341473479' post='4955877']
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.

[/quote]

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

[quote name='CyberRascal' timestamp='1341473479' post='4955877']
I've also worked on a commercial WPF app, but very small. I found it comfortable to use. YMMV.
[/quote]

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

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
I've gone a slightly detoured route where I link .net into an unmanaged c++ exe via late loaded dlls. and bound .net into the scripting language. This has the benefit of being able to use .net to write your tools directly into the game, while the game is running - with complete access to everything bound to the scripting language.

The most practical example is being able to use .net's PropertyGrid with any object in the game with minimal effort, but has been taken much much further into providing editors for various parts of gameplay, and writing custom data viewers. The binding of the .net libraries was done using managed c++ solely so the dll could have unmanaged exports, but every other tool library we write is in C#.
0

Share this post


Link to post
Share on other sites
Aaaah. I was away for a while and the tread got bigger. Thank you everyone for your advice. I started looking at the MSDN docs for the .NET framework and after a little while it set off my "do 3 weeks of work to save 5 minutes of time" sensors, so I aborted pending better documentation or a more significant need.

As for what kinds of tools I'm looking to develop, I finished the editor tool and moved the project out of beta. I posted it in the 'breaking in' forum asking for advice about making it acceptable for a portfolio project.

Here be the thread, if you wanna peek at the tools. In the solution they're the 'rpak' and 'stage editor' projects.

http://www.gamedev.net/topic/628222-looking-for-feedback-concerning-code-for-a-portfolio/

It's not really the difficulty of working with GDI in terms of not understanding it or something. It's just the overwhelming rectal discomfort caused by managing it. I was actually thinking of making a GDI wrapper class, but I'll check out some of the ones mentioned first.

Thank you everyone! :)
0

Share this post


Link to post
Share on other sites
[quote name='Khatharr' timestamp='1342731946' post='4961063']
It's not really the difficulty of working with GDI in terms of not understanding it or something. It's just the overwhelming rectal discomfort caused by managing it.
[/quote]

Thats the main reason for all the alternative GUI libraries out there to exist(and quite alot of other libraries aswell), Win32 isn't difficult, it is tedious and timeconsuming and that really is far worse than being difficult. (Things that are difficult become easier as your skills improve, the tedious and timeconsuming things however remains tedious and timeconsuming forever)
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0