Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - DJVDJV

Pages: 1 [2]
Support / GetTile and GetTileInfoForTileId problem
« on: May 29, 2015, 07:43:10 am »

I have problem to get TileInfo from tiles with code:

int xToText = 10;
int yToTest = 5;

int tiledID = ownTileMap.GetTile(xToTest, yToTest, 0);
TileInfo info = ownTileMap.GetTileInfoForTileId(tiledID);

tiledID comes normal (Ranges 0-20 as I got 20 different tiles)


info.intval is always 0 (any xToText and yToText values)
info.stringval is always emty string. (any xToText and yToText values)

I would like to get "string name" (like "Wall7") for tile that I have set on editor (Get info.png)
What I do wrong?

Support / 2D Tilemap, many layers and diffuse shader
« on: May 25, 2015, 06:16:56 am »

I have map with many layers and tiles have diffuse shader.

I have layers like:

Layer0 = LiquidLayer (Like lava and water tiles)
Layer1 = GroundLayer (Like floor)
Layer2 = TerrainLayer (Like walls)
Layer3 = StuffLayer (Like furnitures etc)

Tiles have also diffuse shader for lights.

Problem 1:
I want Furiniture A lighted in layer3. Problem comes here: Stuff in Layer0, Layer1 and Layer2 affects color of Furniture A texture. And it comes very dark.
So how to make layer3 color ignore layer0,layer1 and layer2.. Just affected by cameras colour?

Problem 2:
I put colored plane under all layers and it affects color of all tiles in every layer. (Example black plane makes all tiles total black)
So how to make layers to ignore colored planes etc?

What I do wrong with shader? How to fix these? Any workarounds? Any tutorials?


Support / Re: Confusuon about animated tiles on tilemap
« on: May 18, 2015, 02:01:43 pm »
One more thing. How I should count right amount for offset from texture size / tilesize?

Support / Re: Confusuon about animated tiles on tilemap
« on: May 18, 2015, 07:11:45 am »
But how I change it runtime so I get animated tiles?

Support / Re: Confusuon about animated tiles on tilemap
« on: May 16, 2015, 01:43:45 pm »
I tried like this:

terrainTileMap.SpriteCollectionInst.material = terrainTileMap.SpriteCollectionInst.materials[1];

(I added additional material with other sprite to 2DTileCollectiosData materials)

But it does not work. What I do wrong or it this even right way to do it?

Support / Re: Confusuon about animated tiles on tilemap
« on: May 15, 2015, 11:56:03 am »
2) Make own atlas for every frame of tiles and change atlas on code

Is there any example how I should do this right way?

Support / Confusuon about animated tiles on tilemap
« on: May 14, 2015, 09:33:39 pm »

Wondering about animated tiles on map (Like lava or water)

How I should implement this (For get still good performance on mobile)

Maps can have even 10000 tiles.

1) Make every lava / water prefab and animate it (I strongly think I should avoid this)
2) Make own atlas for every frame of tiles and change atlas on code
3) Something like this: https://gist.github.com/treefortress/2c9b034e696953bd83fc
4) Something that I have not mentioned?

Support / 2d toolkit and random map
« on: May 10, 2015, 11:43:39 am »

I have pretty neat random map algorithm to generate random maps that i want use with 2D Toolkit.

I have few question for 2D Toolkit integration for my own code.

1) Can I build maps in code (without drawing in Unity editor by hand). If so. How? Or is there any tutorial about it?
2) My maps can have about 10000 tiles. Is 2d Toolkit optimezed so I can use even so many tiles in a) compute b) mobile devices
What might be max limit for tiles?


Support / Random map for platformer
« on: September 21, 2014, 09:30:07 am »
I was wondering generate random maps with 2d toolkit for platformer game.

Is there any tutorial / assets ect. where I should start investigating.

I tried google but did not find any good.

Support / Re: 2D Toolkit and NGUI
« on: September 21, 2014, 09:28:42 am »
Just that it was :)

Support / 2D Toolkit and NGUI
« on: September 19, 2014, 11:22:31 pm »

I try simple scenario where I add tk2d-camera and NGUI container (That have "UI Root"-camera).

When I press play I see all buttons etc in container doubled (Example button "Enter" have double button "Enter" but far away.)

"UI Root"-camera have size: 1

If I change tk2d-camera to normal camera I don't have problem.

Support / Multiple tile maps for one scene
« on: September 18, 2014, 01:24:08 pm »
I have made multiple tile maps and i got one "combat screen" scene.
Now I want dynamically load random tilemap to scene. What is best way to do this? Any tutorial?

Ps. I do NOT want multiple scenes (1 scene per 1 tilemap)

Support / Blood particles and TileMap
« on: September 06, 2014, 11:01:18 pm »

I have made particle system that emits "blood".
How I can get it collides right way with tilemap?
So that blood does not bybass tilemap (Just collides and spreads on it).

Support / 2DTK and night/day on tilemap scenes
« on: September 05, 2014, 09:25:48 am »

I would like to get night/day cycle to work.

What is best way to do  shoothly changing  night/day cycle to tilemap scene? (I would like to use one map not 2 different (Dark for night and light for day))

Support / Many tilemaps
« on: September 04, 2014, 07:42:09 am »

What is best way to handle multiple optional tilemaps?

I have game where player can enter tilemaps.
Maps is always randomly picked from existing tilemaps.

- Should I have one scene and load optionally map? If so, how i implement this?
- Should I have one scene PER map? (Multiple scenes)  If so, how i implement this?

I am pretty new with tilemaps. So I will be very pleased about examples.

Pages: 1 [2]