0 votes

Hello all!

I would like to replicate the World War Bot in Godot (just for fun, for myself). The algorithm is pretty straightforward, but I got stuck at the drawing part.

As far as I see, WWB uses real data to render the map: where each country is, and what are the borders. That is nice, but I wonder if there is an easier way to it. For example, taking a world map image from Wikimedia and trying to detect each country based in the color it has...

So, what would be the easiest way to implement an interactive map in Godot?

Thank you in advance!

asked Jun 2 in Engine by VictorSeven (65 points)

I am no expert in Godot, so someone might have another idea... eventually. What I would do is cut out the countries using a editing program like Gimp, and then use an Area2d node with a polygon2d collision shape and a sprite(with image of a country). This way you can draw accurate collision boxes for the different shapes. Put The "puzzel" of countries toget in one scene, so that it looks like a world map. You can then connect the mouseentered()/mouseexited() signals to each Area2d node to detect if the mouse is hovering over a specific node(country). I hope you understand what i am trying to explain.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.