\$2

### Image of the Day Submit

IOTD | Top Screenshots

## Begining an editor

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

8 replies to this topic

### #1Deortuka  Members

Posted 03 January 2013 - 03:27 AM

I have made a lot of progress with my engine and now it is time to get started on the editor. I originally wanted to go with wxWidgets for the interface but couldn't get it to compile for x64 in Visual Studio 2012. It compiled just fine as 32-bit and the 64-bit pre-built binaries are for 2010 and previous versions of Visual Studio.

I looked at qt next but there is also no 64-bit version available for Visual Studio 2012. I then decided to just use MFC but quickly realized that the learning curve is huge and I would rather spend my time getting the editor working in conjunction with the engine.

After some research I came across WPF and Windows Forms. I tinkered with it and creating an interface literally took a few minutes, but I only know C++ and learning C# just to program the inner workings of the editor would have an even worse learning curve than MFC for me. (My engine is in C++ and I have no clue how it would even be able to interact with a C# application as well)

Having wxWidgets 64-built pre-built binaries for VS2012 would be a dream come true. Instructions on how to compile it as such would be just a good. I am open to any other advice.

### #2aavci  Members

Posted 03 January 2013 - 04:14 AM

64-bit pre-built binaries of Qt for VS2012 is on its way

### #3brx  Members

Posted 03 January 2013 - 04:35 AM

Building Qt (4.8.4, didn't try 5 yet) 64Bit with VS2012 works without problems (if you disable webkit - if you need/want webkit, there's some work necessary). All you need to do is (inside a VS 64bit command prompt):

configure.exe -no-webkit <add more switches if you like, see configure.exe -? for all available options>
nmake

Works for me ™

Edited by brx, 03 January 2013 - 04:35 AM.

### #4NightCreature83  Members

Posted 03 January 2013 - 06:12 AM

You can interact with WPF in C++ as well, picking up the .NET library isn't all that hard to be honest. For this you need to use C++/CLI and a few new keywords all the rest is just C++ code.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max

### #5Karsten_  Members

Posted 03 January 2013 - 07:04 AM

Just use VS2010 until wxWidgets does support VS2012. If you don't already have it, just use an express edition. Or GCC...

However, I would be very suprised if the 2012 Microsoft C++ compiler couldn't build it from source. Perhaps use msbuild or nmake and build via the commandline instead of waiting for a Visual Studio Solution. A quick google does show that people have had success in doing this.

Rather than spend ages with C# interop, perhaps just keep with C++? Using C++/CLI pretty much immediately kills portability of your editor anyway (unless /clr:safe is used but then it is no better than C#).

Edited by Karsten_, 03 January 2013 - 08:18 AM.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

### #6Deortuka  Members

Posted 03 January 2013 - 05:38 PM

Thanks so much for the replies.

I did consider just using VS2010 in order to use 64-bit wxWidgets, but in the end it made no sense for me to downgrade my tools to accommodate one library. VS2012 has some great features for graphics programmers and this was a major reason I upgraded to VS2012 to begin with.

After going through so much trouble trying to get wxWidgets to compile 64-bit in VS2012, I didn't even think about compiling Qt. It is great to hear that it will compile just fine and that the binaries will soon be released.

Thanks again.

### #7brx  Members

Posted 04 January 2013 - 02:52 AM

If you choose to compile Qt yourself there are two things that can greatly reduce the compile time:

1. Build Qt on all available cores: By default Qt will only be built on one core. If you have a multi-core CPU, that's annoying. In order to build it on all cores, open up the file <QTDIR>/mkspecs/win32-msvc2012/qmake.conf and find the line starting with QMAKE_CFLAGS. Add "/MP" (no quotes) to the end of the line and save the file (you should do this before running configure).

2. Don't build the examples and demos (you can always compile those that you need later): Open the file <QTDIR>/projects.pro and find the following text:

} else:isEqual(PROJECT, examples) {
SUBDIRS += examples
} else:isEqual(PROJECT, demos) {
SUBDIRS += demos
}

change them to

else:isEqual(PROJECT, examples) {
#       SUBDIRS += examples
} else:isEqual(PROJECT, demos) {
#       SUBDIRS += demos
}

With those two changes it takes only about 20 minutes to compile Qt on my computer (including webkit). I do have a powerful computer, though (i7-2700K 4 cores/8 threads 3.5 GHz and 32 GB RAM).

Posted 05 January 2013 - 05:46 PM

There is an "All in one bundle" GTK+ 64 bit binaries for windows.

I use the 32 bit version in vs2012 and it works great!

You can also retrieve window's hwnd with gdk_win32_drawable_get_handle() ..

Edited by Eliad Moshe, 05 January 2013 - 05:58 PM.

### #9snowmanZOMG  Members

Posted 05 January 2013 - 06:40 PM

What kind of game are you making?  I would highly recommend against building your own editor if you're interested in actually finishing your game.  If you're trying to make a 2D tile game, http://www.mapeditor.org/.  It doesn't have some features I would really like to see (like some sort of game object database that you can just search through and add objects to the maps) but it's pretty feature complete in terms of authoring up tile based levels.  If you're not making a 2D tile based game, then I would highly recommend searching for alternatives before embarking on this long and arduous quest.

The only people I could possibly even think of allowing a pass and say "Go for it man, make your own editor", are those who are working with a team of programmers and can afford to dedicate one person (or more) to work solely on the editor or those who are very experienced in making games and are already comfortable doing all of the GUI programming.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.