Comments (7)
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.
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"), );
from grid-engine.
If I remove "ge_heightShift" then the light works. But, obviously, this is not a solution to the problem.
from grid-engine.
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.
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.
Previously, I called "setPipeline" immediately after "createLayer". Looks like that was the problem. Thanks for the help!
from grid-engine.
You're welcome.
Probably you called it before GridEngine.create? Because that will create the additional tile layers.
from grid-engine.
Related Issues (20)
- Upgrade phaser version to 3.70
- "Tile Costs for Pathfinding" example has errors in console
- HeightShift does not work correctly for isometric maps
- Depth sorting is wrong for characters using containers
- Show warning if char layer was not found.
- Cache container height
- Improve pathfinding performance for multi-tile characters HOT 3
- Example dots HOT 1
- Jump point search algorithm is broken for maps with 8 direction movement and partial blocking HOT 2
- Got IDE error message HOT 2
- Rework JPS pathfinding algorithm
- Cancellable movements
- Surface more MoveTo options for following
- Update to latest phaser version 3.80
- Wrong pathfinding warning for algorithms other than JPS
- Possible to cleanup and create new grid engine when switching tilemaps? HOT 2
- FacingDir and ignoreBlockingTarget pathfinding/follow options are broken for multi tile characters
- Repeatedly calling `follow` leads to stop
- moveTo vs findShortestPath HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grid-engine.