Sign in to follow this  
SlimTimmy

GUI for level editors

Recommended Posts

SlimTimmy    138
Hello, I am looking for a good framework to create a GUI for a 3D level editor (you should be able to move around and place objects directly in the 3D scene) The level editor should be based on the engine, which is implemented in C++. As a consequence it would be preferable if the framework was based on C++ as well. Another criterion which should be met: I want to implement a classic game loop in order to receive any keyboard or mouse events from DirectInput immediately. (The windows messaging system is too slow for that, the movement seems to be very choppy) The last time I tried out different configurations which weren't very satisfactory: MFC - leads to ugly code, huge amount of classes. I also had problems to create a game loop unmanaged C++ (Engine) and managed C++ (GUI) - better than MFC, but the managed code is also very messy. Passing arguments to the engine and vice versa is a nightmare as well. Another framework I was looking at, was the Qt framework. But I had problems installing it, as I am using the MSVC compiler, which is not supported by the free version of the Qt framework.

Share this post


Link to post
Share on other sites
iNsAn1tY    476
Well, I can solve one of your problems regarding MFC. Here's how to modify an MFC app to run continuously, so you can put a game loop into it, written by yours truly: Continuous Updating in MFC.

Most of the level editors I've come into contact with use MFC (Valve's Hammer editor, id's q3radiant, Remedy's MaxEd). However, many people dislike it intensely, and with good reasons. If you do choose to use it, don't forget that you're using MFC, not the other way round. You can use as much or as little as you like (within certain limits). There are many varied windowing systems that you can use, among them Qt, wxWidgets and WFC (the Windows Foundation Classes). Type any of these into Google for detailed information...

Share this post


Link to post
Share on other sites
Basiror    241
continously updating a MFC application isn t a good idea in my eyes
this reminds me of the busy waiting problem they had in earlier times before the developed decent schedulers


instead you could navigate around with your mouse

i have implemented the camera and the 2d navigation in my editor based on mouseevents and it looks pretty smooth when flying around

smooth enough for editing purposes

Share this post


Link to post
Share on other sites
ldeej    308
C# would be my choice for this.

Create a managed C++ wrapper that includes your native C++ stuff, this layer provides the interfaces for the communication between the front end and the engine (Note that this will force you to decouple the presentation and data layers). Implement the UI in C# which will make you more productive writing UI code.

If you still insist doing everything on C++, then take a look at the WTL (Windows Template Library) which is lightweight wrapper for the WIN32 API (cleaner than MFC but nicer than straight WIN32). Or you can take a look at Win32 Generics, which is work in progress by a guy that writes for the C++ Users Journal.

Google for WTL or Win32 generics for more info.

Share this post


Link to post
Share on other sites
MENTAL    383
I'm currently using wxWidgets (was wxWindows) and have never looked back. To get continuous updates, just capture the OnIdle events and call Refresh (which forces a draw event) and voilla, continious updating with no sync problems what so ever.

Share this post


Link to post
Share on other sites
iNsAn1tY    476
I'm seriously tempted to switch to wxWidgets. It's cross-platform (important, considering one of the projects I'm currently working on), and according to the website, it's similar to MFC.

Ah, something else to learn. I'll add it to the list [grin]

Share this post


Link to post
Share on other sites
Ravuya    135
I've seen some good editors made in GTK (you can even use GTK# if you're one of those people) and WxWidgets/WxPython.

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