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: My first in the Editor (Fife)  (Read 3941 times)

blendman

  • Newbie
  • Posts: 4
    • View Profile
My first in the Editor (Fife)
« on: March 14, 2009, 12:30:18 pm »

Hi

I have tried the Editor to create a first Map.

Here is the first result (not finished at all :)).


I have a lot to add :
- all shadows for all objects (trees, rocks...)
- somes other objects (flowers, others trees, other rocks...)

In general, I found the Editor is good (the Shortcuts are very useful). There are good fonctions very useful too (to have a lot of layers, or to create a bank of objects, to display the grid...).

I have some questions or "feature request" about the Editor ;) :
- can I move the object not snap to the grid ? or reduce the grid ?
- how does work the center of the object ? or how does work the depth of the object : the fact of an object is over another or above.
- is there an "additive mode" (to create a fire for example) for the object ?
- I have seen that we could use a background, how can I use that fonction ?
- is there a way to create some collision block ?

So the features request ;) :
- if there is no fonction to do that : it could be great to have the ability to move the center of the object.
- move an Object without snap ot the grid.


Thank you for reading and sorry for my poor english :D

Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: My first in the Editor (Fife)
« Reply #1 on: March 14, 2009, 07:27:04 pm »

The map is looking good and thank you for your feedback about the editor. I hope someone will come along shortly and answer your questions.

About how long did it take you to create the map?
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: My first in the Editor (Fife)
« Reply #2 on: March 15, 2009, 02:23:21 am »

Hi

I have tried the Editor to create a first Map.

Here is the first result (not finished at all :)).
Looks great to me :-) nice work.

I have some questions or "feature request" about the Editor ;) :
- can I move the object not snap to the grid ? or reduce the grid ?
Unfortunately the editor does not support that functionality at all. You would need to mess around with the XML markup of the map.

You can position objects inside the cells with the x and y properties of the instance. More information can be found here:
http://wiki.fifengine.net/Map_Format#layer

Editing the size of the grids has to be done by hand as well. Check x_scale & y_scale of the specific layer.

- how does work the center of the object ? or how does work the depth of the object : the fact of an object is over another or above.
You're prolly asking about drawing order of instances that reside inside the same cell? Check the documentation about the stackpos attribute:
http://wiki.fifengine.net/Map_Format#layer

Has again to be done by hand via an XML editor :-/ Not sure if there are any plans by the others to add editing these properties via the GUI.

- is there an "additive mode" (to create a fire for example) for the object ?
Sorry, I'm not familiar with term. Could you please elaborate on the topic?

- I have seen that we could use a background, how can I use that fonction ?
Depends on what kind of background we're talking about:
* If you want use a rather large image as background, you can simply create an additional layer and place the background on the layer.
* If we talk about a repeating background, that might not be supported by the map format, at least I found no reference for it in the map format docs.

- is there a way to create some collision block?
Blocking is implemented via the blocking attribute of the object:
http://wiki.fifengine.net/Map_Format#Object_File_Structure

You would need to edit the object.xml files and modify the objects that should block movement.

So the features request ;) :
- if there is no fonction to do that : it could be great to have the ability to move the center of the object.
- move an Object without snap ot the grid.
The main problem with the editor is that it was originally written for and tested with Rio de hola client, but the client is not in active development anymore. I'm hoping that one of the active programmers looks into editor improvements in the long run but I wouldn't count on it happening too soon.

In a perfect world it would be possible to pretty much edit all attributes defined in the map format via the editor as well without the need for manually editing the XML files. But on the other side there are other important fields where the engine could be improved :-/
« Last Edit: March 15, 2009, 02:25:48 am by mvBarracuda »
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: My first in the Editor (Fife)
« Reply #3 on: March 15, 2009, 09:54:58 am »

I have some questions or "feature request" about the Editor ;) :
- can I move the object not snap to the grid ? or reduce the grid ?
Unfortunately the editor does not support that functionality at all. You would need to mess around with the XML markup of the map.

You can position objects inside the cells with the x and y properties of the instance. More information can be found here:
http://wiki.fifengine.net/Map_Format#layer

Let me correct barra here:

You can move an object inside it's cell by holding down shift while moving it. This way the editor uses floats for x/y values instead of int layercoordinates (and they will also be saved).

But there is one drawback: some float values can cause problems with camera movement "ingame" - some objects which are placed with that method may start to "jump" while the camera is moved (basically this is because of rounding issues). So you have to test if your current values cause a jumping object or not.

Hi

I have tried the Editor to create a first Map.

Here is the first result (not finished at all :)).

[..]

Very nice work - your art looks very impressive.  :D

blendman

  • Newbie
  • Posts: 4
    • View Profile
Re: My first in the Editor (Fife)
« Reply #4 on: March 16, 2009, 03:49:53 am »

The map is looking good and thank you for your feedback about the editor.
;)

Quote
About how long did it take you to create the map?
To create the map, it take approx 1 hour (include the creation of the PNG image and xml files (objects)) :).



Looks great to me :-) nice work.
thanks  ;D


Quote
Unfortunately the editor does not support that functionality at all. You would need to mess around with the XML markup of the map.

You can position objects inside the cells with the x and y properties of the instance. More information can be found here:
http://wiki.fifengine.net/Map_Format#layer

Editing the size of the grids has to be done by hand as well. Check x_scale & y_scale of the specific layer.
thank you for the informations, and the usefull link :).
The x_scale/y_scale is great.
At 0.1, it wortks like I want :).

So my framework :
- Layer 1 "ground" (no blocking) to make the ground (not a tile). Perhap's I will try a big picture as background (pre-rendered).
- Layer 2 "other ground" (no blocking) : if I use multiple picture to create the ground, I had on this ground another Object (to create the way for exemple, or the variation for the ground).
- Layer 3 : Objects (trees, wall, house...)  (no blocking) : x_scale/y_scale = 0.1
- Layer 4 : blocking layer
- Layer 5 : FX (smoke, clouds, fire...)
- Layer 6 : interface ? (UI)

I can add other Layer if necessary of course :)




Quote
- how does work the center of the object ? or how does work the depth of the object : the fact of an object is over another or above.
You're prolly asking about drawing order of instances that reside inside the same cell? Check the documentation about the stackpos attribute:
http://wiki.fifengine.net/Map_Format#layer

Has again to be done by hand via an XML editor :-/ Not sure if there are any plans by the others to add editing these properties via the GUI.
Ok, I have find the stackpos attribute.

But , in fact, I would like to know how work the drawing order of instance on a same layer (without stackpos, because, if stackpos are interesting, I think it could made issue with the character, because I think the stackpos of the character = 0).

If I know how works the drawing order (not in the editor, but in fife), I could perhap's change that for my object, to add the feature (center) of the object attribute :p (I have to learn python before that ;D).

For the moment, the object Attribute are :



    * attributes
          - id: The identifier for this map. Type = string
          - parent: Identifier of the parent object. Type = string. Optional.
          - blocking: Defines if object blocks the movement. Type = bool (0/1). Optional, default = 0
          - static: Defines if object does not move (ever). Used to optimize pathfinding. Type = bool (0/1). Optional, default = 0
          - pather: Defines which path finder object should used. If none defined, uses engine default. Type = string. Optional
                + Currently supported pathers = "LinearPather" and "RoutePather"
  

I think, I could add :
- x_center : Defines the "center" in x,  for the drawing of the object
- y_center : Defines the "center" in y,  for the drawing of the object

For the moment, I think it's automatic, but I don't know how it works :). If you have any informations about that, it would be very useful for me ;).




Quote
- is there an "additive mode" (to create a fire for example) for the object ?
Sorry, I'm not familiar with term. Could you please elaborate on the topic?
The additive mode is a mode that you can use in gimp for example, to "add" the color of a pixel at the color of the pixel under the first pixel (I don't know if I explain that, so a picture is better to understand ;)) :



I have seen that Fife use the SDL, and I think that with the SDL, we can have the additive mode (I'm not sur).

The additive mode is great to create the FX, like spells, lights, fire...

Quote
- I have seen that we could use a background, how can I use that fonction ?
Depends on what kind of background we're talking about:
* If you want use a rather large image as background, you can simply create an additional layer and place the background on the layer.
oh Yes, I haven't though about this technic ;).
Is a background more "performant" as repetition of image (for the ground) (it takes less CPU or ram for example) ?



Quote
Blocking is implemented via the blocking attribute of the object:
http://wiki.fifengine.net/Map_Format#Object_File_Structure

You would need to edit the object.xml files and modify the objects that should block movement.
Ok, I have seen the doc ;).
Can I use a layer for the blocking (invisible object), and an losange for the character on this layer (to use the pathfinding) ?

If I can make 2 object parent, I could parenting the picture of the player at the losange :) (I have to try, because I have seen the parent attribute for object).

Quote
So the features request ;) [...]
The main problem with the editor is that it was originally written for and tested with Rio de hola client, but the client is not in active development anymore. I'm hoping that one of the active programmers looks into editor improvements in the long run but I wouldn't count on it happening too soon.

In a perfect world it would be possible to pretty much edit all attributes defined in the map format via the editor as well without the need for manually editing the XML files. But on the other side there are other important fields where the engine could be improved :-/
I understand that ;D


Quote
Let me correct barra here:

You can move an object inside it's cell by holding down shift while moving it. This way the editor uses floats for x/y values instead of int layercoordinates (and they will also be saved).

But there is one drawback: some float values can cause problems with camera movement "ingame" - some objects which are placed with that method may start to "jump" while the camera is moved (basically this is because of rounding issues). So you have to test if your current values cause a jumping object or not.
Thank you very much, it's very usefull !  ;)

is there a way to easily test my map ?

Thank you for reading (sorry for the langage)
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: My first in the Editor (Fife)
« Reply #5 on: March 16, 2009, 11:14:02 am »

Is a background more "performant" as repetition of image (for the ground) (it takes less CPU or ram for example) ?

At the moment, it is - as the main issue concerning performance is the count of used instances. One background image counts as one instance, which is as a result way faster ingame. (e.g. Zero uses this technique for the worldmap, which has ~1000 fps, while a normal map has about 300-600 fps)

There is a discussion to optimize that, so in the long run the "real" tiled environment should behave similiar to the single background in terms of performance.

Thank you very much, it's very usefull !  ;)

is there a way to easily test my map ?

Thank you for reading (sorry for the langage)

The editor is your only option to test your map so far. Loading your map in rio de hola should cause some problems (because the scripts look for certain instance id's which you prolly don't have on your map). So to move a character around, you need at least a minimal framework.

But the editor itself relies on the same mechanics a typical FIFE framework does - e.g. the maploader is the same, the gui system is the same ... well, the editor is a client framework.  ;D

I already thought about to provide a generic testsuite for maps (e.g. with one character id, which allows to specify the player character) - but there is never enough time *sigh*. Maybe a editor plugin can enable one to test maps.