RPGDXThe center of Indie-RPG gaming
Not logged in. [log in] [register]
 
 
Post new topic Reply to topic  
View previous topic - View next topic  
Author Message
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Thu Oct 14, 2004 7:57 am    Post subject: Using Tiled to edit H-World templates? [quote]

Bjørn wrote:

Tiled is only a very partial solution for you as it is. The level properties all translate directly to custom map properties in Tiled and the level layout will map directly to layer data. The items/monsters/triggers things would be cumbersome to do with Tiled at the moment and textured ground might be a problem too.


I've made a test. I've used JDK 1.4.2, it ran fine. Tiled is very nice.

Triggers can be a separate layer. That should work. Items/monsters will be another layer, that should be fine, too, unless several items are supposed to be put on a square, but we can ignore this case I think.

Having the level properties as custom map properties is ok, I guess.


To use Tiled for H-World a few problems need to be solved.

1) Dungeon features (e.g. stairs, doors):

Features can have parameter strings, that hand paramters to the level factory.

<char>:<type>:<name>:<opaque>:<blocking>:<frames>:<peer>

E.g. a door:

?:f:hdoor_r:1:1:1:hdoor

This string means, that in the level layout file, the character ? will create a feature of type hdoor_r (which must be defined in file features.sects -> e.g. the graphics how a hdoor_r will look in the game is defined there.). The following "f" tells this is a dungeon feature (not an object or monster). The numbers say, the PC can't look through this door, it blocks movement (until opened), it has an animation of 1 frame, and it is linked to the functionality "hdoor" which is currently a fixed conatnt that means a horizontal door.

Actualy doors cosnist of three tiles, left post, door and right post, all of them can be activated to open/close the door.

I think I can use a separate layer for features. Does Tiled support to bind a custom property like the paramter line to a 'tile'?

2) Additional being data. Similar problems likethe feature defintions, but this time another syntax. Sentient beings can have additional information to help the AI. E.g. a towns person:

p:c:person
AI.lair = 8,6
AI.work = 4,7
end

This means, if he wants to sleep, he goes to coordinate 8,6 on this map, if he wants to work he goes to 4,7 There are 7 AI tasks defined

# 1 = Eat
# 2 = Sleep
# 3 = Hygiene
# 4 = Play
# 5 = Learn
# 6 = Work
# 7 = Meet people

Some of them can be defined public hotspots, but those can be easily defined as a separate map layer and therefore the hotspots are no problem.

3) Importing graphics from H-World to Tiled:

H-World images are PNG files of 128x128 pixels, some are 64x64. The graphics are isometric. The baseline is 80. The actual tile size is 64x32, but images can be bigger than one tile.

How can I use them in Tiled?

Ground textures are 64x64 pixels, and ordinary rectangles (not isometric). They should be easy to import, I think.

Finally a questions about the license:

Tiled is GPLed, right? This means, I can modify it, and offer the modified version on my website, as long as I offer the modified sourcecode as well? If I'm wrong, please let me know.

I'm not quite sure how we can/should work together?
Back to top  
biggerUniverse
Mage


Joined: 18 Nov 2003
Posts: 326
Location: A small, b/g planet in the unfashionable arm of the galaxy

PostPosted: Thu Oct 14, 2004 2:22 pm    Post subject: [quote]

Hajo wrote:



Hajo wrote:
To use Tiled for H-World a few problems need to be solved.

1) Dungeon features (e.g. stairs, doors):

Features can have parameter strings, that hand paramters to the level factory.

<char>:<type>:<name>:<opaque>:<blocking>:<frames>:<peer>

E.g. a door:

?:f:hdoor_r:1:1:1:hdoor

This string means, that in the level layout file, the character ? will create a feature of type hdoor_r (which must be defined in file features.sects -> e.g. the graphics how a hdoor_r will look in the game is defined there.). The following "f" tells this is a dungeon feature (not an object or monster). The numbers say, the PC can't look through this door, it blocks movement (until opened), it has an animation of 1 frame, and it is linked to the functionality "hdoor" which is currently a fixed conatnt that means a horizontal door.

Actualy doors cosnist of three tiles, left post, door and right post, all of them can be activated to open/close the door.

I think I can use a separate layer for features. Does Tiled support to bind a custom property like the paramter line to a 'tile'?


Yes it does, and I would recommend using per-tile custom properties to handle this scenario.

Hajo wrote:
2) Additional being data. Similar problems likethe feature defintions, but this time another syntax. Sentient beings can have additional information to help the AI. E.g. a towns person:

p:c:person
AI.lair = 8,6
AI.work = 4,7
end

This means, if he wants to sleep, he goes to coordinate 8,6 on this map, if he wants to work he goes to 4,7 There are 7 AI tasks defined

# 1 = Eat
# 2 = Sleep
# 3 = Hygiene
# 4 = Play
# 5 = Learn
# 6 = Work
# 7 = Meet people

Some of them can be defined public hotspots, but those can be easily defined as a separate map layer and therefore the hotspots are no problem.


The planned object support will use custom properties on objects just as it does on tiles and the map (And hopefully layers as well, if we can get it in there for release)

Hajo wrote:
3) Importing graphics from H-World to Tiled:

H-World images are PNG files of 128x128 pixels, some are 64x64. The graphics are isometric. The baseline is 80. The actual tile size is 64x32, but images can be bigger than one tile.

How can I use them in Tiled?


Yes, most certainly. Tiled saves all images to PNG format when not using external tile sets. There are no restrictions on tile sizes or number of layers, or anything like that.

Hajo wrote:
Finally a questions about the license:

Tiled is GPLed, right? This means, I can modify it, and offer the modified version on my website, as long as I offer the modified sourcecode as well? If I'm wrong, please let me know.

I'm not quite sure how we can/should work together?


Yes, Tiled is GPL. We'd love to have you join the project, or at least offer your suggestions, and we document all suggestions in a SUGGESTIONS file that goes out with the release, as well as on http://www.biggeruniverse.com/projects/flyspray.

It looks like Tiled may be able to support most of what you're trying to do already, and we will certainly keep your requirements (as well as every engine we come across) in mind when spec'ing out what will go into the 0.5 release.

Check my profile for contact info if you'd like to be involved in the project, or need help with a feature of Tiled.[/url]
_________________
We are on the outer reaches of someone else's universe.
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Thu Oct 14, 2004 2:48 pm    Post subject: [quote]

I had this reply in the works but ran out of time. Here's suggesting how you could do the stuff we the door and townsmen you to have in there:

Ok, it's good to hear you think the monsters/items/trigger can be mapped to layers. This would mean you basically define a tile for each different monster/item/trigger you want to place on your map. For example your door:

?:f:hdoor_r:1:1:1:hdoor

This could become (of course this'll be much more verbose...):

Code:
<tile id="{number}">
  <property name="type" value="feature"/>
  <property name="oblique" value="1"/>
  <property name="obstacle" value="1"/>
  <property name="animation_frames" value="1"/>
  <property name="function" value="hdoor"/>
</tile>


Or, if you prefer, store the whole thing directly:

Code:
<tile id="{number}">
  <property name="props" value="f:hdoor_r:1:1:1:hdoor"/>
</tile>


You probably also want to connect an image to this tile. The same basically goes for the towns person. The downside is that you will need to create a new towns person tile for each person.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Thu Oct 14, 2004 3:38 pm    Post subject: [quote]

@Bjørn

The XML tile defintions are input to Tiled? I think I can create them automatically from the H-World config files.

I think it's ok to have one definition for each "dungeon feature" or "object".

Tiled is a cool thing I must say :)
Btw, this is the first time that I use XML in a private project.

@biggerUniverse

I think at some point I'll join the Tiled team. Do you have a CVS server? What are the policies for submitting changes? Do you have a coding style guide?

Currently it seems Tiled already fulfills all requirements. This means most likely my contributions to Tiled will be very minor.

I'll of course be your tester as well as bug hunter, because I want to use Tiled :) I'll probably be able to fix bugs, too, I've got some years of experience with Java.

I've read you're using JDK 1.5? This measn I'll have to use 1.5, too, for development? Currently I have 1.4.2 installed.
Back to top  
Bjorn
Demon Hunter


Joined: 29 May 2002
Posts: 1425
Location: Germany

PostPosted: Thu Oct 14, 2004 4:44 pm    Post subject: [quote]

Hajo wrote:
The XML tile defintions are input to Tiled? I think I can create them automatically from the H-World config files.

Tiled loads tmx files by default (it's own map format), the fragments I posted are the format that the tiles in the tilesets are stored in. I think the example maps will make this clear.

Hajo wrote:
Tiled is a cool thing I must say :)
Btw, this is the first time that I use XML in a private project.

Thanks. :-)
You'll probably want to look into libxml2 if you want to read/write XML files.

Hajo wrote:
I think at some point I'll join the Tiled team. Do you have a CVS server? What are the policies for submitting changes? Do you have a coding style guide?


We're running a Subversion repository. See the link on the download page of the Tiled website.

Hajo wrote:
I've read you're using JDK 1.5? This measn I'll have to use 1.5, too, for development? Currently I have 1.4.2 installed.

Tiled should still compile/run with most Java versions. We just removed some stuff that was deprecated by Java 5.0.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Oct 15, 2004 7:59 am    Post subject: [quote]

Can tmx files share tile definitions? I'm asking because a H-World game module has one set of "tile defintions" that are common for all maps, but many map files.
Back to top  
biggerUniverse
Mage


Joined: 18 Nov 2003
Posts: 326
Location: A small, b/g planet in the unfashionable arm of the galaxy

PostPosted: Fri Oct 15, 2004 11:31 am    Post subject: [quote]

Yes, if you use the TSX files. We designed Tiled to support that kind of functionality. TSX are Tiled tileSet Xml files. They are basically like a full TMX, but only contain the definition for a tileset. These are called "external" tilesets, and can be loaded from the Tilesets menu. They are referenced in the TMX files, not held internally in the TMX. One of the example maps uses an external tileset, I believe.
_________________
We are on the outer reaches of someone else's universe.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Oct 15, 2004 11:38 am    Post subject: [quote]

Nice :) You've thought of everything!

Sunday this weekend I should have some time to actually do first steps with Tiled. I'll also need to install a SVN client.
Back to top  
biggerUniverse
Mage


Joined: 18 Nov 2003
Posts: 326
Location: A small, b/g planet in the unfashionable arm of the galaxy

PostPosted: Wed Oct 20, 2004 3:20 am    Post subject: [quote]

Is Radomir getting along well with the conversion script?
_________________
We are on the outer reaches of someone else's universe.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Wed Oct 20, 2004 9:27 am    Post subject: [quote]

Oh, I didn't know that he has contacted you :)

Yes, he sent me a first version last weekend. It isn't finished yet, and it's been a long time that I coded Perl so I have a few troubles understanding it, but he says it's easy and fairly straightforward.

He's currently busy painting some images, and I'm again stuck with too many tasks and too little time. A module writer asked for 2D display support, and I want to get him back after a longer break to get some demo modules for the engine, so I changed priorities in favour of his request. I hope some day he'll join the team and help developing the engine (he has the source code), but he also has a job which leaves no time for working on the engine and the module -> so I'll try to improve the engine and he'll write a new game module.

So the Tiled <-> H-World map conversion will be delayed a bit. I hope this doesn't cause troubles for you.
Back to top  
Hajo
Demon Hunter


Joined: 30 Sep 2003
Posts: 779
Location: Between chair and keyboard.

PostPosted: Fri Oct 22, 2004 12:10 pm    Post subject: [quote]

According to the many question that I get, Radomir is back on coding the converter :)
Back to top  
Post new topic Reply to topic Page 1 of 1 All times are GMT
 



Display posts from previous:   
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum