Configuration file for mesh files used for tiles.

Configuration file for mesh files used for tiles.

Postby Bertram » 30 May 2014, 19:20

Hi there,

To permit fixing the tiles used in game, permit easy tweaking without adding hard-coded workarounds in the code, and later permit the addition of biomes, here is a solution I'd like to get permission to start developping:

Add a configuration file that will tell which mesh file and which material file to use according to the tile type and neighborhood.

Example: Let's say config/tileset.cfg:

{l Code}: {l Select All Code}
# Tile neighborhood: 1 means same tile type and fullness > 1.0
# Type, North, northeast, east, south-east, south, south-west, west, mesh file, material file (none if default one)

#The biome:
[Default]
Dirt, 0, 0, 0, 0, 0, 0, 0, Dirt_00000000.mesh, none
Gold, 0, 0, 0, 0, 0, 0, 0, Dirt_00000000.mesh, Gold.material
...

#And later, e.g.:
[Jungle]
Dirt, 0, 0, 0, 0, 0, 0, 0, Jungle_Dirt_00000000.mesh, none
Gold, 0, 0, 0, 0, 0, 0, 0, Jungle_Gold_00000000.mesh, none
...



To me, this solution would be perfect to fix every glitches we currently have for the given tileset, and make it a no brainer to change a tile.
What do you think?

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Configuration file for mesh files used for tiles.

Postby Danimal » 30 May 2014, 19:34

Seems easy to change and fill out, also by the looks the game would only need one such .def file and the level type attribute call what to load from it. I support it, im all in for moddability
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Configuration file for mesh files used for tiles.

Postby paul424 » 30 May 2014, 21:27

Good idea, I have had similiar.
Originally some Tile meshes where designed by Scorpio to match other types of Tiles.
For us, we would like that Gold always matches the "Dirt" Tile ? Do we, it;s the same mesh type, plus in orignal DK matching Dirt and Gold looked better.
I though about some kind of matrix of coincidence where 0 means discontinuity , and 1 continuity .
As for the format : I would always prefer XML to home brew format , though if it is small and pending it can go , I could convert it later !

To me, this solution would be perfect to fix every glitches we currently have for the given tileset, and make it a no brainer to change a tile.

Brainier , err my code was a little puzzle , but was it so untraceable giant blob ? , Regarding " holes in the walls issue " ... How it was solved ? Was my code faulty in any regard ? Could you tell us how it has been fixed ?
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Configuration file for mesh files used for tiles.

Postby Bertram » 30 May 2014, 21:38

Ok, thanks for your feedback.

N.B.: I'll add a vital parameter I dumbly forgot, the rotation to apply on the file in degree.
Since for now, it is hard-coded for certain cases and it would make it possible to reuse (at least as it is now), the same mesh, with simply a different rotation.

regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Configuration file for mesh files used for tiles.

Postby paul424 » 30 May 2014, 23:00

I just misunderstood you ,
For now the code actively shifts postfix around as it finds the proper word . Is it something very bad ? Like performace issue or something ?
IF I have a Tile Mesh , it is sure I want to be able to use it with all 4 case rotations .... no other info is needed it seems ...
User avatar
paul424
OD Moderator
 
Posts: 660
Joined: 24 Jan 2012, 13:54

Re: Configuration file for mesh files used for tiles.

Postby Bertram » 02 Jun 2014, 22:11

Hi,
I just misunderstood you ,
For now the code actively shifts postfix around as it finds the proper word . Is it something very bad ? Like performace issue or something ?
IF I have a Tile Mesh , it is sure I want to be able to use it with all 4 case rotations .... no other info is needed it seems ...

Don't worry, it's not about performance or anything such. But there are workaround I'd be forced to add to the code if I'm unable to configure the engine to rotate certain mesh files for certain cases.

Everything will be more comprehendable once I've got something working to show off.

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 1 guest

cron