tag:blogger.com,1999:blog-2208890564265615027.post6502270295956576305..comments2022-07-26T00:14:03.202+10:00Comments on Ascii Dreams: Wilderness generation using Voronoi diagramsAndrew Doullhttp://www.blogger.com/profile/11099404183952971291noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-2208890564265615027.post-8949717982683586512007-07-05T19:29:00.000+10:002007-07-05T19:29:00.000+10:00Thanks for the advice. I had in the back of my hea...Thanks for the advice. I had in the back of my head similar ideas to your mountain suggestion, where difficult to traverse locations could seperate locations of extreme difficulty (e.g. mountains, seas, walls of fire or ice etc).<BR/><BR/>I also quite like the idea of being able to choose which path to take based on a difficulty slope e.g. the adjacent locations are either +1 or +2 difficulty. That way you can navigate a path of +2 difficulty increases if you find a powerful item that boosts your overall survival chances. It'd be important to distinguish the +2 difficulty slopes (dead bodies, piles of skulls, warning signs etc) of course.<BR/><BR/>This is equivalent to diving down multiple stairs quickly.Andrew Doullhttps://www.blogger.com/profile/11099404183952971291noreply@blogger.comtag:blogger.com,1999:blog-2208890564265615027.post-17953910561765549862007-07-05T05:32:00.000+10:002007-07-05T05:32:00.000+10:00Come to think of it, you might get better luck jus...Come to think of it, you might get better luck just scaling difficulty with distance from the player start point, as long as the landscape is fairly open.<BR/><BR/>In general I'd think you would want to scale difficulty by travel distance/difficulty. If it takes special equipment to get up into mountains, for instance, the encounters up there might be more difficult even if it's close to an easy region, since the player can't get there until they've acquired crampons and ice axes.<BR/><BR/>I'm looking over some code I wrote to generate Delaunay triangulations years ago. Here's a sketch of one way to do it:<BR/><BR/>Create a simple initial triangulation that encloses all of the points. This could be a pair of triangles forming a rectangle, for instance. Ensure it is Delaunay (that is, the circle through by any three points does not contain any other points). For a rectangle this property always holds.<BR/><BR/>Insert the points into the triangulation one at a time, ensuring the empty-circumcircle property still holds after each one:<BR/><BR/>1. Find the existing triangle containing the new point and split it into three new ones such that the new point is now part of the triangulation.<BR/><BR/>2. Restore the empty circumcircle property by turning edges around the new point.<BR/><BR/>When you're done you can strip off the outer triangles connected to the original rectangle corner points, if you like, to get a triangulation of only the points of interest.<BR/><BR/>The Wikipedia article says pretty much the same stuff. For actual implementation you'll find a half-edge data structure pretty useful, I would think.<BR/><BR/>Another way is to come up with some triangulation, any triangulation, of the points. Then go through and turn edges wherever you find a point inside a circumcircle. If you attack them in an organized fashion, you can get the triangulation into Delaunay shape fairly quickly.James McNeillhttps://www.blogger.com/profile/08901649215141005959noreply@blogger.comtag:blogger.com,1999:blog-2208890564265615027.post-35796828980717880662007-07-05T04:59:00.000+10:002007-07-05T04:59:00.000+10:00I like your idea of flood-filling difficulty level...I like your idea of flood-filling difficulty level through the regions, but be aware that this may not do exactly what you want on the edges of your map, because distant nodes can end up as neighbors in the Delaunay triangulation. (Here's an <A HREF="http://en.wikipedia.org/wiki/Delaunay_triangulation" REL="nofollow">illustration</A>.) You might need to trim skinny triangles off the outer perimeter or something like that.James McNeillhttps://www.blogger.com/profile/08901649215141005959noreply@blogger.com