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.


Topics - DJVDJV

Pages: [1] 2
1
Support / tk2dSpriteCollectionBuilder inm Unity 5.X
« on: November 18, 2016, 06:47:09 am »
I think ConfigureSpriteTextureImporter-Method cause strange behavor in my sprites and I cannot change sprite type in Unity 5.X

2
Support / Layer transparency
« on: November 17, 2016, 01:28:01 pm »
How to set transparency for one specific layer in Tk2d Tilemap?

3
Support / Plane fill the 2DTk-camera
« on: November 17, 2016, 11:16:22 am »
Hellos, I am using 2dTk Camera (orthographic).

Now I have plane that I want to fill whole camera.

I tried it like this:
transform.localScale = new Vector3(k2dCamera.Instance.ScreenCamera.orthographicSize * 2.0f * Screen.width / Screen.height, k2dCamera.Instance.ScreenCamera.orthographicSize * 2.0f, 10f);

Also like this:
float worldScreenHeight = tk2dCamera.Instance.ScreenCamera.orthographicSize * 2;
float worldScreenWidth = worldScreenHeight / Screen.height * Screen.width;
Bounds bounds = plane.bounds; // Plane is here plane I want fill camera
transform.localScale = new Vector3(
worldScreenWidth / bounds.size.x,
worldScreenHeight / bounds.size.y, 1);

But scale seems to about 80 times too big? How do I get this to work with 2Dtk camera?

4
Support / TiledMap drawing order VS Object Drawing Order
« on: November 09, 2016, 01:17:39 pm »
Hellos.

I want effect as in example picture.
Just wonder how I should take and change object Z to get id depending tiled map Z?

5
Support / Multiple screens
« on: November 09, 2016, 10:45:25 am »
Hellos,

My upcoming game have multiple screens (Over 50 screens). Every screens have same layers etc (Lot identical stuff). And I think it really hard to make layers for every screen (even with duplicating with ctrl + d). At least when it becomes larger changes.. I must change things on every 50 screens. How I may avoid this problem? How people usually handles multiple screens?

6
Support / Nice light for tiled map
« on: November 07, 2016, 09:52:55 am »
Hellos.

Was wondering how to get nice nigh/day light effect form game. (As in example Stardew Valley shot)

I was trying just diffuse shader and normal lights and it does not looked good.

I need no collider or anything for light just night / day effect and light radius.

What might be right way to do this?

7
Support / 2DTK and lights
« on: January 26, 2016, 10:30:02 am »
Hellos,

I got 4 different 2dtk tilemap in my game. Now I want add light that affect every tilemap. Because tilemaps seems be in different z in enginewise I need do nor 4 x light with different z:s (one light for every tilemap). How I can do light that is not affected by z so just one light that light every tilemap.

8
Support / Tilemap material
« on: October 30, 2015, 08:20:21 pm »
Hi,

I try change tilemap material at runtime like:
 backGroundTileMap.SpriteCollectionInst.material = backGroundTileMap.SpriteCollectionInst.materials[1];
 backGroundTileMap.Build();

 backGroundTileMap.SpriteCollectionInst.materials[0] is normal material.
 backGroundTileMap.SpriteCollectionInst.materials[1] is custom material.

But it does not seems change.. what I do wrong?

9
Support / 2D Toolkit and 2DDL
« on: October 18, 2015, 11:08:08 am »
Hellos,

I tried to get light system: (2DDL https://www.assetstore.unity3d.com/en/#!/content/25933)
to work with 2DTk.


I did not get 2DTk polygon colliders work wit 2DDL, I asked help from maker of 2DDL and he answered:

"2dlight gameobject must have the same Z pos that polygon colliders 2d.
Other thing is layermask, check layer within inspector of 2ddl and layer of your tiles"


So:
How to set that Z pos of polygon collider in code wise in 2DTk?
Is there anything else I should know

10
Support / How to move tk2dTileMap
« on: October 04, 2015, 01:37:44 pm »
Hellos,

How I can set whole  tk2dTileMap place in world. Like I have 2 different map but I want their coordinate 1,1 be in different place in world.

Y, Heikki

11
Support / Still in edit mode
« on: September 03, 2015, 10:41:38 pm »

Hellos.

I got warning:

Tilemap XXX is still in editmode. Please fix. Building overhead will be significant.

What might cause this? How to turn edit mode off?

12
Support / Problem with lights
« on: June 12, 2015, 10:29:00 pm »
Hello,
 I have problem with light and tilemap Z.

I use:
* tk2d tilemap as tilemap
* spriterender for characters
* Unity point light as light
* Sprite/Diffuse as shader for map and character
* Character and map have same Z

Map and character are on same layer, same sorting layer just "order in layer" so that character appear top of map.

If I add spot light in screen it affects only for character. If I change light Z 0 ->3 it affects map but not player anymore.

Why light needs different Z for map? Have any suggestion have I forgot something?

13
Support / GetTile and GetTileInfoForTileId problem
« on: May 29, 2015, 07:43:10 am »
Hello,

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)

BUT

info.intval is always 0 (any xToText and yToText values)
and
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?



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

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?

Y,
DJV



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

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?


Pages: [1] 2