Skip to content

This is my attempt of a C++ and OpenGL implementation of Amit Patel's Map Gen 4

Notifications You must be signed in to change notification settings

Daniel-Harrington/MapGenerator

Repository files navigation

MapGenerator

This is my attempt of a C++ and OpenGL implementation of Amit Patel's Map Gen 4. I Intend to try to use the gain in speed from creating a standalone application to pursue more features and possible additional generation attributes.

MapGen4 : https://www.redblobgames.com/maps/mapgen4/

Here is an explanation for the starting point of the map generation / the basic data structure responsible for the polygonal regions: https://mapbox.github.io/delaunator/

mmexport1650679257413

If possible I am going to try to to use a method described in this article www.geometry.caltech.edu/pubs/MMdGD11.pdf, specifically Hodge-Optimized Triangulations to create nicer dual meshes for working with.

Progress Updates:

I am testing my understanding of every step as while the basic concepts are very manageable, implementing them efficiently and with OpenGl is a new challenge I want to understand fully,

Generating Poisson Points and Rendering:

unknown-11-1

Creating and rendering triangles from those points:

unknown-25

Implementing a custome shader to distinguish the triangle better in non-wireframe mode:

-5121115581670599172_121

Solving the issue of the triangles only generating in a circle:

unknown-23

Testing at scale :

unknown-17

Checking the efficiency of my code thus far:

image image

This seems to be an acceptable speed for the initial generation and the majority of the bottleneck is from libraries that are already as fast as possible, thankfully it seems like I havent made any major errors yet.

About

This is my attempt of a C++ and OpenGL implementation of Amit Patel's Map Gen 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages