Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Saelf

A best way to define "Sound Areas"...

Recommended Posts

Hello,

 

I have a opinion about "Defining Sound Areas" with coords.

 

I think there's a better way to do the same: using "Definition Tiles".

A Definition Tile its a new tile in map who have config options. He is the master tile who have the master configuration to that place. For example:

 

________ <- Wood Tile (wood song)

________ <- Water tile (water song)

________ <- Def. Tile (invisible tile, wood song)

The sound player its wood song, because def tile its configured to this.

And the def tile don't need be present in all place.

 

________ <- Grass tile (grass song. Def tile not present, them the song will be this tile song)

Note that Def. Tile can be a container for future increases. He is an invisible container for configuration options and can control a lot of things in future.

 

Why all this?

 

Well, control the coordinates its difficult and prone to mistakes. Little changes in map how draw a new bridge will ask for a new drawing of coordination map. And nanual work is needed to change the coordinates after.

 

With def tiles we can do:

TileName: Wood1

TileSong: woodWalk.wav

TileClass: Special Wood

 

TileName: Wood2

TileSong: woodWalk.wav

TileClass: Simple Wood

When we get a new song for "Special wood", we only need change in config and the change will affect all maps in all game without need change manually:

 

TileName: Wood1

TileSong: woodWalkSpecial.wav

TileClass: Special Wood

 

TileName: Wood2

TileSong: woodWalk.wav

TileClass: Simple Wood

Note that I can control the songs in runtime by class! (Tile["Simple Wood"].Song = runtimeSong.wav)

 

 

And if you want, in future, put an animation? Well, the Def. Tile can be a container for this config!

TileName: Wood2

TileSong: woodWalk.wav

TileClass: Simple Wood

TileAnim: Transparent water on top of wood

I can't told no more about this because I don't have EL code, but I think this is a best way to do what you need. In future, this will be very useful.

 

 

Saelf

Edited by Saelf

Share this post


Link to post
Share on other sites
I think there's a better way to do the same: using "Definition Tiles".

A Definition Tile its a new tile in map who have config options. He is the master tile who have the master configuration to that place.

You mean like this:

<tile_type type="Grass">
<tiles>1,2,19,34,50</tiles>
<default>Grass 2Foot</default>
<actor_types sound="Grass 4Foot">
	Arctic Chim,Beaver,Black Bear,Black Dragon,Black Panther,Boar,Cockatrice,Deer,Desert Chimeran,Feran,
	Forest Chimeran,Grizzly Bear,Leopard,Lion,Mountain Chimeran,Panda Bear,Polar Bear,Puma,Red Dragon,
	Snow Leopard,Tiger,Unicorn,White Tiger,Wolf
</actor_types>
</tile_type>
<tile_type type="Snow">
<tiles>28,29,34,35</tiles>
<default>Snow 2Foot</default>
</tile_type>
<tile_type type="Stone">
<tiles>3,4,5,6,11,13,15,17,18,24,25,26,27,30,31,32,36,37,38,40,41,42,43</tiles>
<default>Stone 2Foot</default>
<actor_types sound="Stone 4Foot">
	Arctic Chim,Beaver,Black Bear,Black Dragon,Black Panther,Boar,Cockatrice,Deer,Desert Chimeran,Feran,
	Forest Chimeran,Grizzly Bear,Leopard,Lion,Mountain Chimeran,Panda Bear,Polar Bear,Puma,Red Dragon,
	Snow Leopard,Tiger,Unicorn,White Tiger,Wolf
</actor_types>
</tile_type>
<tile_type type="Wood">
<tiles>22,23</tiles>
<default>Wood 2Foot</default>
<actor_types sound="Wood 4Foot">
	Arctic Chim,Beaver,Black Bear,Black Dragon,Black Panther,Boar,Cockatrice,Deer,Desert Chimeran,Feran,
	Forest Chimeran,Grizzly Bear,Leopard,Lion,Mountain Chimeran,Panda Bear,Polar Bear,Puma,Red Dragon,
	Snow Leopard,Tiger,Unicorn,White Tiger,Wolf
</actor_types>
</tile_type>
<tile_type type="Leaves">
<tiles>7,8,48</tiles>
<default>Leaves 2Foot</default>
</tile_type>
<tile_type type="Dirt">
<tiles>9,10,12,14,16,44,45,46,47,49</tiles>
<default>Dirt 2Foot</default>
<actor_types sound="Dirt 4Foot">
	Arctic Chim,Beaver,Black Bear,Black Dragon,Black Panther,Boar,Cockatrice,Deer,Desert Chimeran,Feran,
	Forest Chimeran,Grizzly Bear,Leopard,Lion,Mountain Chimeran,Panda Bear,Polar Bear,Puma,Red Dragon,
	Snow Leopard,Tiger,Unicorn,White Tiger,Wolf
</actor_types>
</tile_type>
<tile_type type="Water">
<tiles>0,231,232,233,241,242</tiles>
<default>Water 2Foot</default>
</tile_type>

 

The problem isn't the tiles. The code is in for the tiles. The problem is the areas that the tiles are wrong because they are covered by a 3d object. The code to detect the 3d objects isn't written yet, and therefore as a stop-gap measure the walking areas code (which is just a copy of the map areas code) was added.

Share this post


Link to post
Share on other sites

Thanks Torg for time in game. I will put here a little brief about we talked.

 

EL have the problem with 3D objects are not detected.

In a bridge, we need have water tile, causing the problem.

 

The first solution was to get the coordinates in each map. But do a massive change? We can't group the areas or configurations enclosing areas with coordinates, will be a problem for maintenance and we can forget some areas.

 

 

I think its better create a third layer with invisible tiles who have only configuration. Its possible group the tiles and center the changes, for example: All tiles in all maps with category wood_on_ground will play a new song, and all tiles in all maps with category wood_on_ground will play the actual song.

 

Imagine change all this in all maps, map by map, and finding what wood tile is in water and what is on ground!

 

 

Will be possible do a lot of things while there are not code to detect the 3D objects. And can be more easy to maintenance and to put new updates in tiles.

 

 

 

Case study:

 

- We have a storage with wood on ground;

- There are wood on bridges.

 

In real life, the sounds are differents, but we have only the sound "woodWalk.wav". But we can group in dofferent groups:

wood_on_ground

wood_on_water

 

Both plays the sound "woodWalk.wav".

In future somebody made the sound "bridgeWoodWalk.wav". We edit only the configuration of the tiles and the update will affect all maps, in all places, we only need change in some file, something like this:

 

<tile_group group="wood_on_water">

Sound = "bridgeWoodWalk.wav"

</tile_group>

 

And maybe this can be done by runtime.

Share this post


Link to post
Share on other sites

I'm not sure what exactly you're saying, but it doesn't sound much different that the coordinate walk areas we have now. If a map changes, it'd still have to be changed.

Share this post


Link to post
Share on other sites

Hmmmm... ok well I missed the idea of grouping in our discussion and its relatively irrelevant because there is a grouping of sorts handled in the sound configuration. You can define different types of wood sounds, and then link those to different tiles or walking areas.

 

There isn't much benefit in the amount of work required to update this info, but keeping it all in the map file and the map editor means one place to update even if it is 2 things (ground tile/object etc + sound tile) that need updating.

 

The benefit from Saelf's idea was relating to the future task of automating the system correctly by detecting the 3D ojbect you are above.

 

Not knowing a huge amount about graphics programming and bounding boxes etc my idea for working out if you are standing on an object involves lots of loops. This is going to be very slow, and a major part of why I decided not to code this aspect of NEW_SOUND until after this update sometime.

 

Saelf's idea is to add an extra layer of "tiles" to the maps which can define sounds for that tile. My thoughts are that this should be optional and in most cases not used, but when there are 3d objects that require a different sound, the tile sound can be overridden with this new set of tiles. From a code point of view it would be simply a matter of retrieving the correct tile for your location from the array, which would be almost instant and if there is no sound defined, use the normal tile sound.

 

It would be miles faster than my idea of looping through the objects list and I expect it would be a lot faster than even doing some bounding box or ray trace magic to establish the tile beneath you, and would therefore like other people's opinion on it, both from a map maker's point of view, as well as the other dev's (and anyone else who wants to comment).

Share this post


Link to post
Share on other sites

That's what I figured it was about. And like I said, in that case it's really not worth it, as the amount of work-at this point in time-would be way too much.

Share this post


Link to post
Share on other sites
That's what I figured it was about. And like I said, in that case it's really not worth it, as the amount of work-at this point in time-would be way too much.

Yeah I explained to him that it wouldn't be done before this update, but it is being suggested as an alternative to the longer term "more correct" way to handle walking sounds.

 

Basically defining walking areas is a bit of a hack, and while effectively integrating this into the maps and map editor is still a hack, its a much nicer and cleaner hack than the one I've done for this release.

Share this post


Link to post
Share on other sites

All the way, I think this will be better in future. A lot of other things can be easy with this.

 

For example:

 

1) "Wood its the font of aluwen's power, then Mortos invade and petrified all wood". Then when all players walk on bridges, the new sound its stone sound;

 

2) "Our water is black!!!!". Will be possible change, in runtime, the 3D object on surface of water from blue to black 3D water. Change the green grass to died grass etc.;

 

3) All the imagination allow...

 

 

 

Some of these things are not possible today, but development will continue and will be possible do all this better.

The final possibilities are not only sound. In some day this will be needed...

 

 

Saelf

Share this post


Link to post
Share on other sites

This particular case would require server specific comands, and we don't want to worry about this now.

The server side it's don't needed for this time. For all we develop, we need a base, a center, and this last post it's what will be possible some day.

 

 

I've posted this how a possible solution for the actual problem with will be possible do a lot more in future. This idea isn't to only hack the game, it's a base for new possibilities. Hack today without a future purpose can be a waste of time. Today functions very good, tomorrow can interfere new things. (I'm talking here about my idea ok? Not about the other hacks into EL).

 

I know this need a lot of work, but my purpose is share an alternative way to do the same that should help in much more. An alternative to allow do more. This is what makes a viable alternative.

 

EL development continues. In a near future will be needed do more things, and a base will be ready.

This don't need be immediate. It's a shared alternative.

 

 

Saelf

Edited by Saelf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×