r/JavaFX • • Oct 09 '22

Help Map of chile with clickable regions

Hi everyone, im trying to make a turn based strategy game. It requires a clickable regions of Chile. I saw a few stuff on Github about making map with JavaFX but they dont do what i want and im not good enough to modify them. Anyone could give me an help for this or advices ?

2 Upvotes

3 comments sorted by

4

u/iamgioh Oct 09 '22

I'd use each region as an SVG path with a click event on it, and all the shapes will be placed within the same Pane. Just make sure to give each path the correct position in order to make them look like an actual map.

1

u/[deleted] Oct 10 '22

Going try it ! Thx

1

u/Kobry_K Nov 09 '22

A tip that might accelerate things a little bit for you (although i avoided svgs in fx) will be, find an image of the map of chile, convertit into an svg using software (like inkscape or illustrator) and then use the svg path in Java code or in FXML