Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Gooey GUI

Sign in to follow this  


Well, looks like the old level editor has finally given up the ghost. I used the Managed C++ with Windows Forms included in Visual Studio .net 2003. Mainly I went with this instead of C# in order to avoid porting over most of my code to C#, like for geometry manipulation, etc.

It actually worked fairly well at first, once I had figured out how to workaround the nasty hang bugs and auto-genned gui code showing up in the improper files. I was able to write a clunky but very functional editor and update it over time.

A couple months ago one of the team members started reporting out of memory errors with the level editor, and I did a quick pass over the code and got rid of some unneeded fluff, but was unable to reproduce the issue on my end at first. Eventually, after adding some more GUI tabs to the editor, and starting to edit larger levels, I started getting the out of memory error when performing certain tasks, like, I don't know - saving the level - which was only 24 mb in size when written out.

This code was not managed so it wasn't a garbage collection issue, and it was pretty baffling. I'm not the sort to have memory leaks or pointer errors. I ended up reducing geometry memory usage by ~33%, but only slightly postponed the issues.

We are now just entering the full production phase of the game so it is high time to have a functional editor again.

I spent the past couple of days investigating & weighing our options, from using an off-the shelf tool like blender, to recoding the editor or editor interface using CEGUI, d3dx gui, or something else.

Using blender or similar apps have the problem that no-one on the team is familiar with them yet, and it seems challenging to add some version of the entity system to many of the 3d and game level editors out there. That is the key thing that our editor does well - placing & tweaking entities, specified in .csv files. Our levels are also triangle soup, so no heightfield, bsp or sub-d modeller would serve as a good system.

The good news is that the editor main code is completely oblivious of the user interface used to drive it, and the user interface only hooks into the code in a few dozen places, and only in about a dozen different ways, so it looks like just recoding the GUI is the way to go - it's cheap, should be quick, and I can make the new editor gui similar enough to the old one.

We are already using CeGUI for the game & facet editor, but I'm wanting some controls it doesn't offer, and I find it still somewhat overwhelming to do seemingly simple things at times.

The in-game UI is done with an IMGUI, so I have extended the IMGUI to support windows, buttons, sliders and menus.

Tomorrow I'll start converting the level editor to use these controls instead of the .net bloat of death. Wish me luck! ;)
Sign in to follow this  


Recommended Comments

Oh man, I was planning to look at using .NET for some of my own tools. But, er, now I think I won't :)

Share this comment

Link to comment
.NET itself is probably fine. I believe the main issue is that the managed c++ mixed with unmanaged c++ is not the highest priority and is buggy and messy. I'm sure using visual studio 2005 with C# would be a dream...

BTW, still cranking on the IMGUI tip, and I'm really digging it!

Share this comment

Link to comment
Well I *was* just planning to just link my C++ engine into managed code. I guess I'll just experiment a bit before I commit to any hardcore development in that line :)

Share this comment

Link to comment

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
  • 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!