logo80lv
Articlesclick_arrow
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_login
Log in
0
Save
Copy Link
Share

Real-Time Polygon Clipping As Core Gameplay Mechanic With GDExtension

Wilhelm Tranheden shared details behind Everfront, a strategy game designed around the idea of fluid territory.

Solo Game Developer Wilhelm Tranheden is working on Everfront, a Godot 4.5 game where territory isn't locked to a grid, it's made of live polygons that constantly grow, collide, and reshape. Your territory is your army: there are no units to manage and no bases to build.

Wilhelm wanted territory in a strategy game to feel tangible, something that behaves almost like a physical substance. He shared some insight into how this system works. Most strategy games, from Risk and Civilization to Europa Universalis IV, rely on discrete grids. Closer modern comparisons like Territorial.io and OpenFront use rasterized territory systems, where land is represented pixel-by-pixel and combat is resolved one pixel at a time. In Everfront, territory is represented as true polygons, and running that kind of simulation at 60 FPS on large procedural maps isn't feasible in GDScript alone, so the core simulation runs inside a custom C++ GDExtension that the game calls every tick.

Each tick, every territory polygon is first divided into smaller per-cell polygons. Each of those polygons is then expanded outward to simulate territorial growth. The expanded shapes are clipped against stronger enemy territory chunks. They're also clipped against static world geometry like lakes, coastlines, and map boundaries. Finally, all surviving per-cell polygons are merged back together into a single territory shape.

Why Clipper2, and why a custom extension? There were three key reasons the built-in Godot Geometry2D wasn't enough, according to Wilhelm:

  1. Performance. With the extension, there's no per-call marshalling between GDScript and C++ – the whole tick (expansion, clipping, merging, render-data prep) now happens inside one C++ entry point per phase, with results handed back to GDScript via accessors. Also, Clipper2 lets a single C++ call clip or offset many polygons against many others in one pass; Geometry2D only does one pair at a time, which would mean thousands of separate cross-language trips per tick. Each trip pays GDScript's per-call cost, marshals arrays into Variant-boxed types, and pushes results back through the same boundary.
  2. Operations Geometry2D doesn't have. The simulation needs custom polyline routines – for example, finding parallel segments within an epsilon – that aren't in the engine's surface area at all. Those had to be written from scratch in C++ alongside the boolean ops.
  3. Godot already ships Clipper2 in its source tree. That made it cheap to build a custom extension around it: lift the library, adapt it to operate on Godot's native PackedVector2Array directly.

Everfront

Everfront

Everfront was just announced this month and is planned for release in November 2026 on PC. You can learn more about the game here and wishlist it on Steam.

If you're interested in learning more about Everfront's real-time polygon clipping system, Wilhelm Tranheden plans to publish a full technical breakdown on his blog soon. Stay tuned for that and subscribe to our Newsletter, join our 80 Level Talent platform, and follow us on TwitterLinkedInTelegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.

Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.

Subscribe to 80 Level Newsletters

Latest news, hand-picked articles, and updates

Keep reading

You may find these articles interesting

Built for Creators. Read by the Best
Partner with 80 Level

Comments

0

arrow
Type your comment here
Leave Comment
Built for Creators. Read by the Best
Partner with 80 Level

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more