[crossfire] Importing the GTK+ editor in SVN
Andreas Kirschbaum
akirschbaum at users.sourceforge.net
Fri Jul 18 15:03:33 CDT 2008
Hi,
I am one of the founders of Gridarta and I still maintain the editor. So
expect my viewpoint to be slightly biased ;)
> I already mentioned on IRC some of the reasons why I think that this
> editor [gce] is interesting: it is fast (e.g., drawing walls or other
> features on a large map is much faster than with gridarta)
It is known that Gridarta is quite slow on huge maps. The main reason is
a less-than-optimal implementation of the undo stack. Fixing this would
need a fair amount of work without having much effect for "real" maps:
Crossfire maps generally should not grow too large; instead tiled maps
should be used. Therefore I (still) consider fixing this issue a waste
of time since more important features are pending.
Besides that, my observation with gce was just the opposite: I did
create a map with gce's default size (20x20 tiles). I hardly could edit
this map because gce's display updates were sluggish at best: just
moving around the mouse "cleared" the map view when the tooltip moved. I
had to stop doing anything (including mouse movements) and wait 3-5(!)
seconds until the map view was repainted and I could continue.
The test was on the exact same machine that I use for Gridarta
development and testing; gce is the version available for download on
the Deliantra web site.
> , it has a nice way to display the properties of all map objects as
> you move the mouse around
Yes, this is a nice feature; I plan to add a similar one to Gridarta.
> , it has less installation dependencies than gridarta
I just can agree with Yann here that this is not correct. Gridarta needs
only Java 1.6; no other external libraries are needed. Building from
source additionally needs ant. According to the download web site gce
needs at least Perl, libgtk2, and libglib2.
For the implicit "free software" meaning: OpenJDK is about to go into
Linux distributions. Therefore it is not (anymore) an argument for me.
Also, the argument (as stated in another mail in this thread) that map
makers may want to use Debian stable, is not an argument: the gce
download page states that libglib2.0-0 version 2.12.6-2 is needed;
Debian stable has 2.12.4-2 only.
Windows users can also use OpenJDK (I guess), or just download and
install Sun's JRE to run Gridarta. Not sure how easy it is to get Perl
(and GTK2) installed on a Windows machine.
FYI: gcj fails to compile Gridarta because gcj does not comply to the
Java Language Specification (apart for other issues in the class
libraries). I filed a bug report more than four months ago
[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410]. It is still in
state "NEW".
> , etc.
See below for a list of missing features. SCNR ;)
> However, the current version also has some drawbacks: [...]
All these drawbacks are just technical issues that can be fixed.
Therefore these issues are not really arguments against the editor (for
me). (Without actually having guessed how much work is needed to get
them fixed.)
> If there are no objections against this plan, I would like to import
> the code in SVN as soon as possible.
Given that Gridarta is still in active development (more than 4000
commits since the project start about two years ago), and having
invested much time (I did more than half of all commits), I do object.
My main reasons are:
- We (Crossfire) do not have that many (active) developers. Therefore
splitting these few into the maintainance of multiple
helper-applications that basically do the same seems just a waste to
me. We should rather focus on the game itself.
With "game" I mean: in-game content, a decent client (which runs on
Windows, Linux, and hopefully on Macs), and a stable server [roughly
in this order], but definitely not the maintainance of redundant
helper-applications.
Also, the main reason why we (Christian Hujer, Daniel Viegas (both
Daimonin developers), and me) did start the Gridarta project was to
fight resource splitting: at that time there have been two projects,
Crossfire and Daimonin (I'm ignoring Angelion because it did use the
unmodified Daimonin editor). Both projects did use and maintain
similar editors.
Our idea was to join the developers of both projects to get more
development power. The intended outcome is a (mostly) unified editor
which shares most of the basic functionality but has special features
needed by either project.
For Crossfire this merge process already did pay off since I could
take over many features from Daimonin to Crossfire. Besides that I got
quite some (constructive) feedback from Daimonin map makers.
That said, I think starting a new editor would basically mean to split
off Crossfire from Gridarta: having an editor part of the project
(IMO) declares it as the "official" Crossfire editor. Which in turn
means we (the Crossfire developers) are at the same state as two years
ago: two editors to maintain (crossedit+CFJavaEditor vs.
gce+Gridarta) with just a hand-full of developers.
- Gridarta includes a map validator module. It checks for common
mistakes when creating or editing map files. It is enabled by default
to prevent map makers from adding "bad" things to maps they create or
modify.
This safeguard will not anymore work reliably if some maps are created
(or just modified) with a different editor lacking a (or featuring a
different) map validator.
- A while ago I modified Gridarta to write object attributes in map
files in the same order as the Crossfire server. After that all map
files got normalized to this format. The reason for this effort was to
minimize the changesets when editing maps.
Although a quick test did indicate that gce seems to use the same
attribute ordering, it inevitably will break from time to time when
new attributes are added. This means, we'll both get larger changesets
than necessary, and we'll have to modify both editors in the same way
to not loose this benefit.
That said, I strongly vote for having just one "official" editor. Of
course, we cannot dictate which editor a contributor wants to improve,
but IMO the Crossfire project/developers should select one (and only
one) "official" editor.
Of course, I vote for Gridarta. ;)
Just FYI, some of Gridarta's features which I didn't find in gce (and
which are not at all "hidden" but easily accessible though menus in
Gridarta):
- Map Validator: checks maps for common mistakes. The checks are run
automatically while editing but can be disabled by the map maker.
- Pickmaps: allows a map maker to compose a set of related objects for
quick access. The objects can have custom modifications and
inventories. Pickmaps can be organized in folders.
A possible use might be pickmaps defining walls and buildings used in
different areas of the world.
- Treasure Lists: Treasure lists can be displayed in a tree view and
interactively explored. In the Game Object Attributes Dialog this
viewer is used to select the desired treasure list. Map makers are
prevented from using treasure lists used internally by the server
(such as the god information lists).
- Plugins: Gridarta includes a plugin interface via a scripting language
(Beanshell). Scripts can access all of Gridarta's functionality.
Currently existing scripts are:
- LegacySpellConverter: a script I did write for converting spell
numbers into spell objects in all map files. It checks the actual
object type (including type modifications in map files) and
therefore does not produce false-positives a simple search&replace
would create.
- MapNormalizer: load & save all map files. I did use this script to
make sure all map files have a consistent file format. It has been
run on all files in branch and trunk.
- MapValidator: runs the map validator on a set of (or all) maps. The
result can be written to a log file.
- WorldMaker: creates an overview image of the world maps.
Info/worldmap.png in the maps repository was created by this script.
- Non-Rectangular Selections: Many functions (cut, copy, paste, fill,
selection from pickmaps, shift, etc.) operate on the selected area.
The selected area can have any shape; adding, removing, and flipping
is supported.
- Safeguards: Gridarta tries hard to prevent the map marker from loosing
unsaved work. This includes prompting for unsaved maps, pickmaps, and
scripts when closing windows or exiting the application.
- Map Previews: the file selector dialog optionally displays preview
images of the map files. This allows easy recognition of the map(s)
the map maker wants to open.
- Auto-Updater: when using a pre-built editor, map makers can update
Gridarta via Help->Update. Additionally, Gridarta can automatically
check for updates on startup.
- Non-English user interface: many of Gridarta's text messages are
translatable. Currently this includes German (all messages
translated), Swedish (about half translated), and French (few
translated). Adding more languages is very easy through text files.
- Script Editor: Gridarta includes an editor for scripts. It supports
syntax-highlighting for Python (and more file types not normally used
in Crossfire maps).
- Map View Filtering/Highlighting: the map view can hide and/or
highlight different object types. For example only walls and monsters
could be shown. Hidden objects are not affected by edit operations.
Available filters are not hard-coded but read from a configuration
file which allows easy customization.
- Syntax Highlighting of msg...endmsg fields: for objects supporting
@match, the text is colored. Incorrect expressions (such as upper-case
characters) are highlighted.
- Information Views: displays information about the current map. This
information is updated in real-time reflecting the current map state.
It includes connected objects, monsters, and map validation errors.
- Map Views: one map file can be concurrently displayed in multiple map
views. This is useful when editing connected objects in different
parts of a larger map.
- Zoom Tool: displays a map file with different scalings and allows to
save the result as image files. It can be used by map makers to
publish previews.
- Recent menu: the file menu contains previously opened map files for
easy re-access.
- Archetype Collection: Gridarta can collect archetypes (i.e., do the
same job as the collect.pl script). The created crossfire.0 file is
slightly smaller than the collect.pl one.
- Opening Multiple Maps: the file selector allows to open multiple maps.
- Reload Faces: reload faces without restarting the editor; this
simplifies the creation of new archetypes. (This feature is not yet
unified and therefore available only in DaimoninEditor.)
- Control Server: Gridarta can control (i.e., start and stop) the server
and a client. This simplifies testing of maps without having to
manually starting server and client and issuing 'reset commands. (This
feature is not yet unified and therefore available only in
DaimoninEditor.)
More information about the crossfire
mailing list