Gooey GUI

Published January 02, 2007
Advertisement
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! ;)
Previous Entry GUI, etc.
Next Entry IMGUI Fun
0 likes 3 comments

Comments

FReY
Oh man, I was planning to look at using .NET for some of my own tools. But, er, now I think I won't :)
January 02, 2007 01:53 AM
SimmerD
.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!
January 02, 2007 10:16 AM
FReY
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 :)
January 04, 2007 01:31 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

1.2 Almost ready...

1119 views

Sound Paths

1336 views

Stately Progress

1138 views

State Lines

1288 views

Pulsing

872 views

Return to The Ship!

1012 views

Cameras & Boxes

1129 views
Advertisement