The best GUI

Started by
22 comments, last by _mark_ 12 years, 1 month ago
Muhammad: I have merged your two threads into a single discussion (previously there was one copy in Game Programming and one in General Programming). In the future, please do not post multiple copies of the same topic in different forums.

Thanks!

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Advertisement

Muhammad: I have merged your two threads into a single discussion (previously there was one copy in Game Programming and one in General Programming). In the future, please do not post multiple copies of the same topic in different forums.

Thanks!


I'm sorry for doing that, it's just I didn't see the General programming section at the first. So I'm sorry again,and thanks for the merging.
I never coded a single bit of C# in my life, however I do have quite some experience with GUI coding (in C++) using wxWidgets, which I think totally rocks. But since I can't compare from own experience: what makes coding GUIs in C# a better choice over C++ with wxWidgets?

I never coded a single bit of C# in my life, however I do have quite some experience with GUI coding (in C++) using wxWidgets, which I think totally rocks. But since I can't compare from own experience: what makes coding GUIs in C# a better choice over C++ with wxWidgets?


the simple fact that you can use a language that has the constructs needed for nice event handling built in the language itself (ie. delegates) as opposed to a language where these constructs have to be simulated using preprocessing hacks (QT) or some other convoluted system simply to use a member function as a callback.
Also the built in reflection and metadata in C# makes it much easier to build a visual gui editor.
But the real answer to your question is 3 clicks and 15 minutes of coding away.. that is.. download Visual C# and see yourself... it really just takes 10 minutes and a simple 1 button application (WinForm) to convince yourself there is no real comparison.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

Would a C# project also work (i.e. be compilable) for other platforms than Windows? And more specifically, does it give native controls (i.e. Windows look & feel on Windows, OS X look & feel on OS X, etc) on the supported platforms?

the simple fact that you can use a language that has the constructs needed for nice event handling built in the language itself (ie. delegates) as opposed to a language where these constructs have to be simulated using preprocessing hacks (QT) or some other convoluted system simply to use a member function as a callback.
Also the built in reflection and metadata in C# makes it much easier to build a visual gui editor.

The same goes for Objective-C/Cocoa, or Python/Kivy. Of course, all these options place certain limitations on portability.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


Would a C# project also work (i.e. be compilable) for other platforms than Windows? And more specifically, does it give native controls (i.e. Windows look & feel on Windows, OS X look & feel on OS X, etc) on the supported platforms?


a simple WinForm application will run, without recompiling, under Mono on lots of different platforms.

Having said that, I dont see the issue of portability raised by the OP. The typical usage of a GUI application in the game development industry is for tools, and who really cares about portability of a tool? Hardly a show stopper for these kind of applications where the main discriminant is productivity and robustness, and rightly so.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

I've used wx quite a lot and it's pretty good, but it will look businessy and not 'cool'. If you're making games, you maybe don't need to use a standard GUI framework at all - you might do all your GUI in-game.

A note on MFC; it sure is ugly under the hood but I actually quite like developing with it and apps will look nicer than with wx since you can access the fancy Windwos-only controls. Of course if you want to go cross-platform, not an option.
I agree, for beginners C# forms is the way to learn. For C++ QT is very good, and it supported by all major platofrms; even mobiles. GTK+ is quite good, but more lower level and harder to understand at the beginning. With these GUI APIs you can create some really useful tools, which will aid you in the future when you develop games (making your own game editors, etc).

Get to grips with raw C++; bare in mind as ApochPiQ mentioned isn't GUI development friendly. So write some console apps, and when you are ready and you have covered not only C++ programming; you have also learned the structure of a program. Once you get to writing GUI applications, knowing about message queueing, events, input, GUI interaction will come with patience and most importantly persistance.

Agree with the previous posts MFC is absolutely terrible, do not bother. I've heard good things about WX as well. To be honest, there are plenty of alternatives; These GUI's are good bases to learn when you are ready. Just to add, a lot of in-game menus (HUDs) and GUI are usually done with Crazy Eddie's GUI, which not only uses C++, but also easier languages like C#, Python, and many more . Look at the video demos for now, once you get more acclimatised to more graphical programming, remember it and give the code examples a try.
Dave 'Kit' Wilson - Reliant Code
IMO, the best GUI is one you roll for yourself.

I have a GUI system in place for my own app that I am working on. Rolled it in less than a day. There is nothing that I can't do with it. So, it is good for what I want (currently games programming).

This topic is closed to new replies.

Advertisement