adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Mapeditor and GTK+ backend


From: Kai Sterker
Subject: [Adonthell-devel] Re: Mapeditor and GTK+ backend
Date: Sat, 7 Mar 2009 11:55:48 +0100

On Sun, Mar 1, 2009 at 6:37 PM, Kai Sterker <address@hidden> wrote:

> With that code in place, I can now start on the actual backend. The
> first goal would be to render the worldtest map.

Done that; code is in CVS. Note that you'll need to update both the
adonthell and tool modules. Latter with the -d switch to get the new
directories. Then do a make and make install in both of them and
you'll finally be able to run tools/test/backendtest with the usual -g
../../adonthell/test parameter (assuming that you have adonthell and
tools side by side). What you'll get is a GTK+ window that displays
the test map (with only the slightest amount of glitches). No more, no
less. Kill with Ctrl+C.

I've noticed that the memory consumption is astronomically high, so I
guess there's still more work to do on the actual backend. I hope to
get it fully debugged over the weekend.


On to the actual map editor. I have had some thoughts about the
general editing controls. Let me know what you think.

First of all, I'd like to keep it similar to what dlgedit does, so
that there's a consistency across the editor apps (also the main
reason for choosing GTK+ over, say, QT or wxWidgets). With that in
mind, here come my suggestions:

Moving the mouse over the map will highlight the object under the cursor.
A single left mouse click will "pick up" the highlighted object. It's
no longer part of the map and can be moved around.
Mouse movement will alter x and y coordinates of the object. The
scrollwheel will alter the z coordinate. (As might do '+' and '-' on
the keyboard). The current z coordinate will persist and all future
object placements will happen at that z-position (until it is changed
again).
Left-clicking on the map will then place a copy of the object at the
new position. The object itself will remain "picked", so it can easily
be placed multiple times.
A right click will discard the object, so that we can pick up a new
one. (As will pressing 'Esc').
Pressing 'Del' will erase the highlighted object from the map.
If objects will ever have properties, 'Enter' or pressing the middle
mouse button will bring up the property window for the highlighted
object.
Holding the left mouse button pressed while in "pick up" mode should
result in a seamless area of the selected object, so that we can
easily and quickly make a ground layer.
Positioning the cursor near the edges of the view will scroll the map
in that direction. (as will the cursor keys).
'C' will go back to the origin (or some other suitable position) but
we should also have the possibility to quickly jump to a given
coordinate. (perhaps some kind of bookmark feature).

Apart from the actual map view and the controls outlined above, there
will be the object library that can also be used to pick up objects
for placement on the map. It will be initialized with a list of paths
and will index all the map objects found below those roots. Each
component in an objects path will be assigned as tag to that object.
(So an object at map/outside/ground/ will get the tags 'map',
'outside' and 'ground' assigned.) The object library will present all
existing tags to the the user and by selecting a set of tags, it will
be filtered to show only matching objects.


However, before I will implement most of the above, I'll actually have
to add saving and loading of the map to the engine itself. That
shouldn't be too difficult, though, especially since we can easily
test it with the worldtest map.

All that together should give us a somewhat primitive but usable map
editor that we then can expand and improve as needed. So it might also
be about time to start looking for some artists, so that by the time
the editor is in place, we also have some content to use with it.


As usual, comments and suggestions welcome.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]