Sign in to follow this  
  • entries
    235
  • comments
    509
  • views
    171832

Gooey GUI

Sign in to follow this  
SimmerD

307 views

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  


3 Comments


Recommended Comments

.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