0 votes

I'm currently making a procedurally generated 2D landscape. I've already done all the generation, the problem is that I need to optimize it. At first I was just giving every tile its own Polygon2D node, but obviously I can't do that because it causes major performance issues. So I looked into a way to merge all my polygons into one, and I found this reddit post. This was very useful and got really close to what I wanted, but unfortunately I can't get it to work. No matter what I do, it always either doesn't work right or just crashes. Any help, workarounds or alternatives are appreciated.

Godot version 3.2.3
in Engine by (98 points)

1 Answer

0 votes

May I ask you why you need a Polygon2D around every tile (or a merged version of it)? Maybe what you want to accomplish can be done in another, simpler way.

by (23 points)

I'm using the marching squares algorithm to smooth out my terrain. If I wasn't I would just use a tilemap. But now that I think about it, it wouldn't be that hard to modify my code to work with one. If I don't get a good answer, then I'll just do that.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.