I’m designing a cross-platform map editor for an application I’ve developed, and I’m unsure what approach to take regarding language/gui library choice. Just for some basic info, the editor needs to parse and output xml files.
I’m most comfortable with C++, Lua, and Perl, but I’d also be willing to use Python (could use the practice). I’d prefer doing it in a scripting language for productivity.
Any recommendations are appreciated, thanks.
I’d also like support for filling out forms, etc.
P.S. I’ve tested out extending existing map editors but it isn’t really worth it since they don’t provide the functionality I need on a fundamental level, requiring me to just re-write the whole thing anyway.
I can recommend using Python and PyQt for the job. Qt offers a class for scene management (i.e. layered object placement, zooming, hit testing, events,coordinate transformations etc., even collision detection) called QGraphicsScene and a matching control to display it all, called QGraphicsView. It also offers support for drag&drop, thus enabling interactive object placement.
Implementing a map using these classes really is just creating QGraphicItems (Rectangles, Polygons etc.) and adding them to the scene, Qt does the rest. You can have a look at how it all fits together reading the documentation, especially the document “The Graphics View Framework“. I had to implement something similar for a client recently and was very pleased with this approach.