2d Grid Mouseover Highlights and Tooltips

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By floatingdev

I’m building a turn based 2d meka game and I am not sure how to proceed with what I have in mind.

Starting simple I have a single unit, spec is for
-select unit, hit key to enter movement mode
-tiles to highlight on mouseover
-different color for walk and run
-tooltip with how many tiles will be moved
-no highlight for too far
-OOB tooltip if off grid

then select move, end turn, update position.

From this famous tutorial I have a the basic algo,

func highlight_destination_tile ():
# detect mouseover on this tile
# test this tile for distance to unit
# compare this distance to unit range
# highlight for walk, run, or nothing

Before I start trying to reinvent the wheel, first are there any known tutorials on this or examples I’m missing?

Second any basic tips or code on doing mouseover highlighting on tile grid would be helpful.

Third, would movement mode and update position be in gamemanager script?

I can see it happening, but how all this comes together…tia. Making a game of your own concept is like giving yourself a crash course in something that doesn’t even exist, im studying python OOP to get better and I’m confident Godot is the right engine to work with now but steep curve is steep.