Archived

This topic is now archived and is closed to further replies.

Square Map + Fringe Tiles + 2 Rendering Layers = Too Many Combinations.

This topic is 5401 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I''m making a square map, made out of tiles, and I''m trying to do fringe tiles. A transition from one tile to another. However, I''m limited to 2 Rendering Layers, so I can have the base tile and the fringe tile. The method I plan to use is an alpha fringe tile, with the specks of colour that I need (hope you''re following). The problem is, with 9 Directions (UpLeft, Up, UpRight, Left, etc.. etc..), Thats like 300,000 + Fringe Tile Combinations. Example: G = Grass, S = Snow, D = Dessert GSD I''d have to have Grass (With Grass To Snow On the Right), Snow (With Grass To Snow on the Left and Desert to Sand on the Right). Now in a situation like this GGG SDD SSD You can see how the fringe tiles can build up. And with only 1 Rendering Layer for the fringes to go on, I _HAVE_ to have tiles like "GrassFringeTopLeftANDRight" and "GrassFringeTopLeftANDRightANDLeftANDBottom" to cover every angle for a situation: GGG GSG GGG Any ideas on how I can cut this down and what sort of things I can do? Thanks.

Share this post


Link to post
Share on other sites
Just alpha blend the ''fringes'' so its a smooth transition and you don''t need any fringe tiles =-) Or you could make generic fringe tiles so each terrain type has 1 border, so all grass edges look the same reguardless of which tile its next too, that is only 14 tiles per terrain type (no edges, 4x 1 edge, 4x 2 edges, 4x 3 edges, and all 4 edges).

Share this post


Link to post
Share on other sites
I had to figure this out for a paintball game (the ground was tiled, the movement was not), however I wasn''t limited in the rendered layers in any way..

I''m too tired currently to think of a non-hacky way of doing this.... but I''ll give it a shot anyways...

I don''t know if this is coherent, but this is what a couple minutes of brow-furrowing came up with:

(Im assuming this is 3D)

Do multiple passes, rendering an additional fringe onto the polygon (somehow)...

I guess.. maybe someone will run with this idea. Or not.

Share this post


Link to post
Share on other sites
If you have a heirarchy of which fringe types go above others, why is it you can''t use multi-texturing with alpha masking to do this nice and easy?

failing that, perhaps multipass will have to do

George D. Filiotis

I am a signature virus. Please add me to your signature so that I may multiply.

Share this post


Link to post
Share on other sites
Possible suggestion: programatically create the fringe maps as needed. If you have a generic alpha mask that you don''t mind using, that could be pretty easy to do.

RomSteady - I play games for a living.

Share this post


Link to post
Share on other sites
I understood "Rendering Layers" to mean texturing units for multi-texturing. Which I guessed meant that he had a base texture and an additional texture to use, denying him the opportunity to use more than one fringe on a poly. (Don''t hurt me - I only read about 3D programming theory; I still love 2D stuff)

Share this post


Link to post
Share on other sites
I''m going to clarify and give it another go here =)

Its for 2D, just straight 32px x 32px tiles, arranged into a square of 20 x 20 tiles or so. (No real map size here).

I can''t just layer up the alpha''s ontop of eachother, because I only have 1 layer I can deal with. I can have a tile underneith a tile and one ontop, and nothing more. I can''t pile all 9 "Fringes" ontop of eachother, to cover the situation where every side and corner has to be covered.

The fringe tiles currently are just transparent images with specks of whatever (grass, snow, dessert, etc.)

So anyone have any clues (hacky or not) on how to avoid making 300K + combinations?

Thanks guys.

Share this post


Link to post
Share on other sites