FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Map Editor  (Read 9506 times)

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Map Editor
« on: October 29, 2007, 10:31:32 am »

Ive made a sketch about how the Map editor could look. What do you think? Can the fife mapeditor look like this ?

Logged

jasoka

  • Developer
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: Map Editor
« Reply #1 on: October 31, 2007, 12:51:41 am »

Looks good, I'm also in favor of panel type of design. Hopefully jwt can take a look at that as well, since he is working on the editor. Perhaps you would like to create some use case proposals how that editor could be used? E.g. I'm not sure how we should integrate things like cellgrid scaling / rotation, camera zoom / scaling / rotation, showing certain layers only, hiding certain object types and so on.
Logged

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Map Editor
« Reply #2 on: October 31, 2007, 08:14:53 am »

Thx, jasoka.
I`ll post some more ideas how some things could work, only that my mind is limited to some areas :)
Logged

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Map Editor
« Reply #3 on: November 01, 2007, 07:19:16 pm »

Global Datasets

I think that in the map.xml should have only one dataset.xml, a Global datasets.xml file,
that will have all the rest of datasets in it. that way will be easyer for the
map and the mapeditor loader and etc... .

how to hide unneeded layer and mapobjects?

The Elevations,layer hierarchy list should have commands for hide/on/off and
lock/on/off like in the Gimp.
The hide command will unable you to, make invincible and not to paint on the
given layer.
The lock will unable you to lock certain layers and not to paint on them,
but to see the objects on the layer.

Select/paint/hide/reveal_selected_objects:

The MapEditor can have a select and a paint mode.
the paint mode - is for painting tiles/objects/etc...
the select mode - is for selecting object. You could also select multiple objects
(LeftmouseButton and drag to make a rectangular select, shift+LMB to select
certain objects)
hide/reveal_selected_objects - Can be used to hide or reveal objects, that are selected on the map.

RightMouseButton menu:
The Elevations, layer and datasets hierarchy list can have a RMB menu,
Its used when you select a layer or a dataset,a menu pops and you can select
from different options (rename, edit, delete, etc...)
Its also can be used when you select an object on the map.

New/Open Map::Camera/rot/tilt/scale:

When creating or opening a new map you`ll need to know camera options,but since
the option is coded in the py file
self.camera.setRotation(-45)
        self.camera.setTilt(54)
and the Mapeditor cant know it. The option can be to manually set it in the editor.
The MapEditor can have a Camera configure...  and in there to set the rot, tilt and scale.
(sorry,dont understand the cellgrid scaling and scale!? :) ) and that way the
map edtor will display the right map cordinates of the view or etc...

what do you think, about the new my ideas?
i gave some more, but later :)

Logged

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Map Editor
« Reply #4 on: November 02, 2007, 09:35:05 am »

Fill map with tile:

RMB on a dataset (grass tile) and fill. that command will fill all
the blank empty map with a tile.

Copy to location:

Copy or move to location will move the selected objects to a given layer
and preserve its x and y coordinates.
(example: the user painted on a wrong layer - oops, now how to move the objects to the right layer.
Using the copy to layer, or should be called move to layer command gives
you the ability to place the objects you have selected to the right layer)

GFX_type tag: (or not to place object on the ground tiles layer :) )

<dataset type="XML" source="kontechdemo/datasets/ground.xml" gfx_type="ground_tile"/>
<layer id="KoNTechdemoAgentLayer" grid_type="square" scaling="0.4" gfx_type="object" >

Thats just an idea, having an new tag on the layer and on the dataset
to tell if you can paint tiles or object on the given layer.

I misted the statusbar and the x,y display on the map editor image :)

Well i think, those are my mapeditor ideas, what do you think? Any comments?
Logged

Lamoot

  • Guest
Re: Map Editor
« Reply #5 on: November 03, 2007, 10:50:24 am »

Your first proposal has a nice initial layout, but the user interface is rather basic. I believe that with a good UI the workflow could be made a lot easier and comfortable. Here is my proposal:




- White bar is the standard application bar.

- Darker blue is the toolbar with all sorts of tool (move, select, rotate, fill etc.) and view options (hide certain object types?)

- Light blue area is dedicated to datasets, art assets, objects, game logic objects etc. The window is used to view and select objects or their folders. The buttons in a row are used to quickly navigate through folders, exactly the same as in Ubuntu's default file browser/manager.

As it's usual with large and complex folder trees (elevations, layers, datasets), they can quickly become too big for their dedicated window space. This results in a lot of browsing and navigating and requires more time. With this implentation you only need to scroll up and down and even this can quickly be done using the mouse wheel.

- Yellow window is for managing layers. The user should be able to create, select, hide, lock (usable?), delete, copy and perhaps also move the layers through their hierarchy. This window should also collapse/hide in favour of more screen-estate for the light blue area. For example, if the user is working for a longer amount of time on a single layer, he/she doesn't need the layer manager, but would benefit from bigger content window.

- Pink area is the main map area. Here you can edit things on the actual map. You can have several maps open at the same time and switch between them using the tabs. Similar to how firefox handles multiple open websites. * asterix would indicate the map has some unsaved changes.

- Minimap - a smaller version of the whole map. Should be able to collapse/hide, to give more screen estate to layer and content windows. Especially useful on smaller maps where the minimap is of little use.

- Lime green area is for editing various available properties of the currently selected object, of an object to be placed on the map, or of the map file itself. The rectangle on the left is used to display what is currently edited perhaps also with a preview image for sprites.

Properties tabs are for better organization of various parameters. Simpler objects need only one tab for general properties while complex objects have more tabs. The map/layer has tabs for grid, camera properties and the like.



In addition, I propose a more keyboard driven interface, but one that also supports a mouse only workflow.

example of possible shortcuts:
-------------------------------
'p' - place object or
'm' - make object or
'c' - create object

's' - select object to edit its properties

'm' - move object or
'g' - grab object

'r' - rotate object (possible only if the object can face multiple directions)

'l' - lock current layer
'alt + l' - unlock current layer

'h' - hide layer
'shift + h' - hide all but the current layer
'alt + h' - unhide all layers

'x', 'del' - delete object, layer
-------------------------------

All of these actions should be available as buttons from the editor's toolbar.

A lot of current game developers using FIFE also use Blender as their 3d graphics tool, so a default keyboard map similar to Blender's would in my opinion benefit adoption time of the editor and keep a more consistent feel. In addition, due to FIFE's open source nature I suspect that also in the future it will attract people who are more comfortable with open source tools such as Blender. The user should perhaps also be able to define his/her keyboard shortcuts.

As you can see I am in favour of no-overlapping interface. This means less time involved navigating through the interface, so more time can be spent on doing the actual work. This is hard to re-create to the extent Blender managed to do, nonetheless there are a few things that can be done.
« Last Edit: November 04, 2007, 04:05:49 am by Lamoot »
Logged

snowball

  • Newbie
  • Posts: 10
    • View Profile
Re: Map Editor
« Reply #6 on: November 04, 2007, 12:41:18 pm »

I was thinking about the userinterface of the editor, too. I did not write down everything, but from my point of view it should contain:

1.) A flexible customizable GUI like the free 3D modelling programm Blender. Then the users can simply arrange browsers and buttons as they like.

2.) An Object Manager, where you are able to parent objects into groups via Drag & Drop. This system is useful when you have created several objects that belong together (i.e a house build out of small pngs containing walls, doors and windows) and you want to move it to another place.

@Lamoot: your mockup is very nice and would refelct most of my ideas as well ;)
But i would move the object browser to the lime green area where you could switch between properties the other stuff quickly. And i would add something like a coordinate manager, where you placed the minimap.

Another feature that came into my mind was some stuff that let you substitute tiles from the first layer (the bottomauflockern) according to a given pattern (i.e a formula or saved presets). The you could easily jazz up boring floors.


EDIT: For moving the map camera we could place some tiny icons on the top of the pink area. Holding down i.e. the left mouse button and moving the mouse would also move the camera.



« Last Edit: November 04, 2007, 01:40:12 pm by snowball »
Logged

jwt

  • Developer
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Map Editor
« Reply #7 on: December 17, 2007, 07:11:34 pm »

Just wanted to give some feedback on this subject. First, thank you all for the comments on the editor. I will work to implement many of the things suggested here. There seems to be a consensus on the "panel" approach, and I can certainly do that.

One thing to keep in mind is that guichan is not a particularly advanced gui system. It is difficult to translate these precise ideas into guichan widgets. As such general, less precise, thoughts may be more helpful to the progress of the editor. Things such as "paneled approach, not windowed approach." Or ideas about how to make use of the mouse versus hotkeys.

Thanks for the thoughts. :)
Logged

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Map Editor
« Reply #8 on: December 18, 2007, 01:38:28 pm »

Jwt, wasn't the MapEditor going to be written with pyWx ?
Logged

jwt

  • Developer
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Map Editor
« Reply #9 on: December 21, 2007, 10:10:00 am »

Jwt, wasn't the MapEditor going to be written with pyWx ?

This was discussed at one point. Using FIFE's built-in gui functionality in FIFEdit lets us explore the power of the gui (and improve it where we find weaknesses). Already FIFEdit development has resulted in expansion and improvement of the gui system, and I expect more progress in this regard as editor development continues.

So in short: probably wxWidgets would make short-term FIFEdit development a little easier. But the current route is better for FIFE.

In case I gave the wrong impression earlier: I do not expect any editor functionality to be prevented by using guichan. If there was missing functionality, we would fix it :). But guichan is designed for embedded guis for games, so the "look and feel" will probably end up looking more like a game gui than a tools gui.
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Map Editor
« Reply #10 on: December 21, 2007, 02:02:29 pm »

@jwt

Great work with the new editor features :)

I was able to create a map within seconds - including tiles & objects. But I also encountered two bugs so far:

- Deleting an instance don't work (FIFE quits immediately)

Code: [Select]
Swig director method error
Traceback (most recent call last):
  File "zero.py", line 526, in <module>
    w.run()
  File "zero.py", line 426, in run
    self.engine.pump()
  File "../../engine/swigwrappers/python/fife.py", line 472, in pump
    def pump(*args): return _fife.Engine_pump(*args)
<class 'fife.Exception'>: NotSet: Cannot get layer coordinates, layer is not initialized properly Swig director method error

- Saving a map quits FIFE, too

Code: [Select]
saving: content/maps/test.xml
Swig director method error
Traceback (most recent call last):
  File "zero.py", line 526, in <module>
    w.run()
  File "zero.py", line 426, in run
    self.engine.pump()
  File "../../engine/swigwrappers/python/fife.py", line 472, in pump
    def pump(*args): return _fife.Engine_pump(*args)
AttributeError: mapid_field Swig director method error

But nevertheless - keep up the good work :)

AKIRA_SAN

  • Newbie
  • Posts: 24
    • View Profile
Re: Map Editor
« Reply #11 on: December 22, 2007, 12:39:24 pm »

Does selecting objects with the mouse by clicking on them, can be made, or it will need the engine to support instance clicking?
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Map Editor
« Reply #12 on: December 22, 2007, 03:31:40 pm »

@Akira_San

This is already possible - activate the grid and be sure to click on the little "position marker" of the object. For Zero, this is a little hex.

You won´t notice it because there is no highlighting yet - but if you e. g. hit 'm' to place the selected graphic from the dataset editor, this item should be placed on the "old" item.