Giter Site home page Giter Site logo

Comments (7)

Annoraaq avatar Annoraaq commented on June 10, 2024 1

Grid Engine does not explicitly set a pipeline. It is simply calling Tilemap.createBlankLayer to create the extra layers. If you check out the MultiPipeline in the phaser docs it says:

Virtually all Game Objects use this pipeline by default, including Sprites, Graphics and Tilemaps.

I see this as a pure Phaser thing which does not need to be mentioned again in Grid Engine. Or did you want to say that you think in the docs we should be mentioning the fact that multiple tile layers are created for the height shift?

from grid-engine.

Dead-TR avatar Dead-TR commented on June 10, 2024 1

Indeed, you are right. It seems to be something that works inside the Phaser. I don't understand why, but if I additionally specify "setPipeline" at the end of "create", then everything works as it should. Thank you

this.tilemap?.layers.forEach((layer) => layer.tilemapLayer.setPipeline("Light2D"), );

image

from grid-engine.

Dead-TR avatar Dead-TR commented on June 10, 2024

If I remove "ge_heightShift" then the light works. But, obviously, this is not a solution to the problem.
image

from grid-engine.

Annoraaq avatar Annoraaq commented on June 10, 2024

I am not entirely sure how Light2D works. ge_heightShift will create one layer for each tile row under the hood. The only way to disable ge_heightShift is to remove it from the tile map.

I assume you want to keep it but fix the lighting? Can Light2D be applied to several layers at once? That would solve the problem but I am not sure about the performance.

from grid-engine.

Dead-TR avatar Dead-TR commented on June 10, 2024

image
image

The grid engine overlay operates using a pipeline, the same as Light2D. Because of this, I cannot simultaneously use both systems. However, since I don't want to abandon the grid engine, I will build a custom solution for the overlay. But, I think it should be mentioned.

from grid-engine.

Dead-TR avatar Dead-TR commented on June 10, 2024

Previously, I called "setPipeline" immediately after "createLayer". Looks like that was the problem. Thanks for the help!

from grid-engine.

Annoraaq avatar Annoraaq commented on June 10, 2024

You're welcome.

Probably you called it before GridEngine.create? Because that will create the additional tile layers.

from grid-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.