Screeps3D icon indicating copy to clipboard operation
Screeps3D copied to clipboard

Render grid on terrain tiles

Open tcdejong opened this issue 5 years ago • 7 comments

I'd love a setting / checkbox to render a the tile grid over all plain/swamp tiles. It could just be a dark gray raster laid above plains/swamp, but just below road surfaces.

This would really help in spotting if structures are adjacent, and therefore if certain routes are unobstructed. Especially with extensions that's currently a bit tricky.

tcdejong avatar Dec 02 '19 18:12 tcdejong

@tcdejong not a bad idea, should be simple to implent as well. You say we want it to debug routes and others. would it make sense to implement debug tools?,

  • like showing valid paths from A to B
  • floodfills?
  • ... others?

And stuff like that?

thmsndk avatar Dec 02 '19 19:12 thmsndk

got a feature branch going for this, using a shader in this commit f6d65eca98a98a4f9d36cbc1809e57577694ee1c image

Sadly it has issues with hiding room objects when the camera moves around

  • extensions are blinking / the dome disappears
  • ramparts are being shown / hidden
  • parts of the creep model disappear
  • the grid moves / offsets depending on camera position

thmsndk avatar Dec 09 '19 17:12 thmsndk

Any way this could be used?

http://answers.unity.com/answers/444557/view.html

or

https://catlikecoding.com/unity/tutorials/hex-map/part-1/

M1kep avatar Dec 09 '19 19:12 M1kep

i think it can be easily achieved with texture - will take a look on skybox branch

Gadjung avatar Jun 14 '20 12:06 Gadjung

Gadjung supplied the following texture (Grid50x50), we should be able to use the decal projector like we do in the red prohibited spawn overlay to overlay the tiles. it should fit exactly with a room. Grid50x50

thmsndk avatar Jul 02 '20 11:07 thmsndk

it's partially done on mesh-level - can be done easily by assigning another material to material[1] of TerrainPlane

Gadjung avatar Jul 25 '20 15:07 Gadjung

Ouh, sounds interesting :) would it be a good first issue for new people?

thmsndk avatar Jul 26 '20 23:07 thmsndk