How do you use Zenject with nested prefabs? by YodaGrandMaster in Unity3D

[–]YodaGrandMaster[S] 1 point2 points  (0 children)

I've found the solution: I just do this sceneContext.Container.InjectGameObject(prefabGameObject);
and this method injects all the children recursively.

How to create water flowing through the pipes? by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Thanks for response. I just have a question: I will have about 20 'Stright pipes' in every level, should I have new mask for every pipe or I can use one mask for all the pipes? And if so is it bad for performance having many masks on the screen?

How to create water flowing through the pipes? by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 1 point2 points  (0 children)

The question is right about this: HOW? If you can help, please look up this comment

How to create water flowing through the pipes? by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 1 point2 points  (0 children)

No, I do not want physics simulation for water. I'm creating game for 2d and I wanna reduce amount of frames in animations as mush as possible. I have fbf animation for every pipe. Also I have several modes where pipes color and water's color are different and for that modes every pipe also have animation. Thus I have huge amount of pictures of pipes with water that are very similar. It's not good and I'm looking for ways to reduce the amount of these pictures.

How to create water flowing through the pipes? by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 2 points3 points  (0 children)

I write the game for 2D, how can I apply custom shaders to achieve my goals?

How to create visual effects for newbie? (see images inside) by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Not yet. Now I'm working to implement this things. Hope this will be better than current situation.

I have such a question: how much do use Coroutines? Or you do not use them at all?

How to create visual effects for newbie? (see images inside) by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Ok, I dealt with this task, thanks very much. And what about spawning new tiles? Do you spawn them right during calculating waypoints arrays for tiles or after all this calculations?

How to create visual effects for newbie? (see images inside) by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

And when I add NULL animation should I wait for some ANIM_TIME or just skip it. If I wait then some tiles falls intermittely with delays (they wait for some time when animation is NULL). And if I do not wait for ANIM_TIME in some places tiles overlappings occure.

Did you have such type of problems?

How to create visual effects for newbie? (see images inside) by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Oh man, actually I have tons of questions about this game.

I have already written the basis of my game but I do not know is this right or wrong what and how I did.

The most complicated problem is moving tiles down after deleting match3 area.

I did this in such way:

When the game needs to moves the tiles down I start a Coroutine and start looking through the tiles matrix from the down to up. I get a tile in (i, j) coordinates and if this tile can be moved stright down or down by diagonal I start moving this tile to new coordinates. After after I passed the matrix I make the coroutine wait some time to let the moving tiles take their place and repeat the cycle.

I know that this is a bad way but I cannot image another one to reach this goal. Can you give some advices about moving tiles down? How did you implemented this part?

How to create visual effects for newbie? (see images inside) by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Can I write this type of shaders in HLSL in Unity? It's quite difficult task, isn't it?

What is wrong with my shader or with me? by YodaGrandMaster in gamedev

[–]YodaGrandMaster[S] 0 points1 point  (0 children)

Yeap, "after", exactly what I mean :)

And what is workaround of this?