this post was submitted on 21 Sep 2025
17 points (100.0% liked)
Godot
7105 readers
17 users here now
Welcome to the programming.dev Godot community!
This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.
Make sure to follow the Godot CoC while chatting
We have a matrix room that can be used for chatting with other members of the community here
Links
Other Communities
- !inat@programming.dev
- !play_my_game@programming.dev
- !destroy_my_game@programming.dev
- !voxel_dev@programming.dev
- !roguelikedev@programming.dev
- !game_design@programming.dev
- !gamedev@programming.dev
Rules
- Posts need to be in english
- Posts with explicit content must be tagged with nsfw
- We do not condone harassment inside the community as well as trolling or equivalent behaviour
- Do not post illegal materials or post things encouraging actions such as pirating games
We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent
Wormhole
Credits
- The icon is a modified version of the official godot engine logo (changing the colors to a gradient and black background)
- The banner is from Godot Design
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Good afternoon! While, I'll be honest, I don't do much video game development as I'm finishing up my Master's program in Computer Science and my Data Science graduate certificate, the best advice I can give you for purposes regarding this problem is to look to the Riemann Sum formula regarding approximation of definite integrals on a two-dimensional plane, which is presented as follows:
∑ᵢ=₁ⁿ f(xᵢ)Δx
(P.S. - This formula was copied and pasted via generative AI, as I struggled to figure out how to write formulas in Lemmy response windows)
I suggest this as the imperfect dimensions of the sizes of countries on a global map appear to suggest necessity of calculations of area by means of integral calculus. While I was exposed to these formula during my high school AP Calculus course several years ago, I will admit I had to look it up again on Google and was reminded with an AI-generate response. Basically, the integral of an imperfect shape that cannot be defined by algebraic equations can be approximated on a curve with a series of rectangle of varying heights with equivalent widths. The more rectangles are placed to approximate the curve, the more accurate your assessment becomes. So, if you're trying to approximate the size of the country on your global map for purposes of a country-surrendering mechanic in your game via Godot Engine, I would highly suggest defining a method that takes in the standard width of all rectangles present in your graph (each represented as a distinct CollisionShape2D component/element) with heights extending just beyond the outline of the country's graph, and returns the approximate summation of the country's area as a whole in a two-dimensional context for purposes of applying your country's surrender limitation game mechanic.