Re: [Freebooters-devel] MapEditor

2005-02-25 Thread kabutor

Initial version for a map editor to be used in Freebooters.
   


Very nice, with this we should be able to finish the caribbean map a lot
faster! But how can I switch from top-down view into 3D mode?

 

Well, the map is all 3D there are not 2D elements in the app, but the 
viewpoint is top-down so maybe it looks 2D, I can try to add some camera 
movement, but dont think its worthy since all the raytracing that marks 
the position takes as origin the camera position, that makes much easier 
to edit the map.


If you want to see it more 3D try with python land-1.py that is in the 
same path as editor.py at the moment you can only see the map without 
sprites but in a close future I want to add the code to load the sprites 
from the XML files.



The editor can move from a top view of the caribbean map, in 3D, and
and save that for a later use in data/map_file_name.xml.
   


The current height maps are split into tiles, as each tile does have
a new relative world coordinate it would be better if the generated
XML would be split into tile definitions, as well. What do you think?
 

Well as its now if you load in the editor lets say caribean.0.0.png it 
saves a caribean.0.0.xml so its tile independent.


The editor works now with only one image cc.png, but I wanted to add so 
it reads an argument so you have to call it as:


python editor map_file_name.png

So you can edit individually the tiles you wanted and save only that xml


Other versions
---
* Adjust it to make it work in Ogre-Freebooters (probably)
   


I'll do that and implement simple XML parsing for the level definitions.
Out current format is a crude hack anyway.
 

The only thing needed to adjust it, as I refer in that line of the 
README, is the Y height, since the X and Z position must be ok, but the 
Y is better when placing the sprite check the height, with raytracing, 
in the Ogre Map, as probably that changes.


I just upload a new editor.py just adding the Harbour rotation and 
harbour XML output, Im going to check the XML load in python.


Once that is done, I thing making just:
* Make the script takes the map from command line, so different maps 
could be loaded.


We can start working with the map editor, its really rough, the gui can 
use some improvement, I can spend some time with that but dont think is 
worthy, sadly is the weak point of Soya..


Also Im interested in the performance in your computer, how many FPS are 
you getting in editor.py and in land-1.py?


Tak note that playing with these values land.map_size   = 7  and 
land.split_factor   = 5.0 in the py files the performance changes greatly.






[Freebooters-devel] MapEditor

2005-02-19 Thread Esteban 'Dday' Fernandez
I commited a mapeditor in a new module in root directory, I didnt see 
the cvs-mailing so I just paste the README file:


Initial Version 0.0.1
=

Initial version for a map editor to be used in Freebooters.

The editor can move from a top view of the caribbean map, in 3D, and
place Palm Trees (click left button mouse), or remove them (right mouse 
button),

and save that for a later use in data/map_file_name.xml.

You can zoom in and out with the MOUSEWHEEL if present in the mouse.



Requeriments + Install
==
You need to have installed Python + Soya 0.9.2 
(http://home.gna.org/oomadness/en/soya/index.html)


Later just exec: python editor.py

TODO:
===
(0.0.2)
* Read XML and place the objects in the map of a previous edit of the map.
* Finish with the code to place harbours and rotate them.
* Make the script takes the map from command line, so different maps 
could be loaded.


Other versions
---
* Adjust it to make it work in Ogre-Freebooters (probably)
* Show the sprites placed in the land.py to check them properly
* Improve the edit of the harbours.