unknown-horizons / godot-port

Unknown Horizons Godot Engine Port
https://www.unknown-horizons.org
GNU General Public License v2.0
663 stars 83 forks source link

Add autotiled roads #74

Closed artism90 closed 2 years ago

artism90 commented 3 years ago

Ported autotiling algorithm from the original UH and added road building mechanics. The unchecked tasks are meant to be done in a succeeding PR, so that the base functionality is already in place.

To check out tiling, open PlayerCamera node and set the root node's default_interaction_context to the TileContext sub node inside PlayerCamera. Also follow the note in the TileContext script in _ready. Later on, the context should be interchangeable through to the UI by utilizing PlayerCamera's switch_context method.

Requirements:

Two tiling modes:

Abortion:

Visuals:

Additional remarks (issues):

Added Utils/GridMapCreatePathModes.gd which can be used on tile scenes (i.e. TrailMeshes, GravelPathMeshes, StonePathMeshes) to add differently colored tiles (green/red for valid/invalid cells).

sairam4123 commented 3 years ago

Is this being worked on? Can I possibly help on this?

LinuxDonald commented 3 years ago

@sairam4123 @artism90 wanted to finish this pr. But at the moment he don't have the time for it. But you can start to work on some different if you like?