mathew-tran / IdleCity

Idle city is a game where you build a town with NPCs that work jobs and get you resources.
4 stars 2 forks source link

Walking Path tiles #15

Closed mathew-tran closed 10 months ago

mathew-tran commented 11 months ago

We should create tiles when Peeple walk on them, they get a boost of movement speed. We should also make it such that the navigation takes this into account and prefers to walk on roads when it can

mathew-tran commented 10 months ago

hrm.. I think we may need to move to Astar here to get to weighted paths. We are currently using navigation agent 2d. and enabling / disabling navigation on the tilemap.

According to this ticket, tilemap doesn't support costs https://github.com/godotengine/godot/issues/79688

  1. There is a tutorial that links the tilemap to the astar system https://www.youtube.com/watch?v=dVNH6mIDksQ

I don't know if it'll be as performant, but it's a start.

mathew-tran commented 10 months ago

image

Ended up using astar grid and overlaying it on top of the tilemap.

mathew-tran commented 10 months ago

Merged in: https://github.com/mathew-tran/IdleCity/commit/3ebfd2c0f1c2a04b3b02f284384e09abd9f7a816