tag:blogger.com,1999:blog-5052387.post7532940127463060178..comments2024-03-17T16:13:55.262-07:00Comments on Blobs in Games: Polygon map generation, part 1Amithttp://www.blogger.com/profile/12159325271882018300noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-5052387.post-74933998999787842652013-11-30T09:20:49.594-08:002013-11-30T09:20:49.594-08:00Hi Andrew,
I disabled antialiasing as much as pos...Hi Andrew,<br /><br />I disabled antialiasing as much as possible by using stage.quality = 'low' . I think this works fine on polygon fills and I thought it also worked on lines.<br />Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-2567786788256039492013-11-29T00:04:25.427-08:002013-11-29T00:04:25.427-08:00Hi Amit
How do you handle the generation of the p...Hi Amit<br /><br />How do you handle the generation of the proximity map?<br /><br />Originally I tried to use the graphics library in AS3 http://www.avanderw.co.za/voronoi-experiment/ and ran into issues around the lines drawn being anti-aliased. That would throw out the index lookup on the edges of the voronoi cell.<br /><br />My naive solution was to threshold the cell that was drawn before adding it to the proximity map. The alternative, which I have coded but not uploaded, was to use bresenheim to draw the border of the cells afterwards using a floodFill method to colour it. Which resulted in a much faster implementation...<br /><br />Interested in how you do it.Andrew van der Westhuizenhttps://www.blogger.com/profile/00517204322962448769noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-82283935537467494932013-06-19T17:02:14.732-07:002013-06-19T17:02:14.732-07:00Hi Zet,
Sorry about that! jterrace fixed the bug...Hi Zet,<br /><br />Sorry about that! jterrace fixed the bug <a href="https://github.com/amitp/mapgen2/commit/bedb3d3a3bf69505b74cb32c228eb829e3ad9af9" rel="nofollow">here</a> but I forgot to upload a new version to this page :( It should be fixed now.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-74925393754634610362013-06-19T14:33:36.638-07:002013-06-19T14:33:36.638-07:00Hi!
Thanks for that site and the lots of informati...Hi!<br />Thanks for that site and the lots of informations!!<br /><br />I tried the demo, when I export the xml it does not include edges ... is that correct??Zethttps://www.blogger.com/profile/16886992290981273651noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-88274879778505958602012-04-13T02:45:03.130-07:002012-04-13T02:45:03.130-07:00Your time and articulated verbose is much apprecia...Your time and articulated verbose is <b>much</b> appreciated. This site is going straight to my favorite bookmarks repo!Unknownhttps://www.blogger.com/profile/01911336495150656406noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-35011461177959991262010-12-28T08:17:15.877-08:002010-12-28T08:17:15.877-08:00Amit you are awesome :DAmit you are awesome :Dmrhankeynoreply@blogger.comtag:blogger.com,1999:blog-5052387.post-59255790047691483072010-09-22T10:02:36.907-07:002010-09-22T10:02:36.907-07:00Cylindric, glad I could help! :)Cylindric, glad I could help! :)Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-11729989144390321002010-09-22T08:42:04.137-07:002010-09-22T08:42:04.137-07:00Amit, you taught me A* when I needed that, and now...Amit, you taught me A* when I needed that, and now, as if by magic, just as I was trying to work out how to achieve a nice map effect for a 2D game that wasn't based on a Perlin heightmap, you write this guide. Thank you, thank you, thank you! :)Cylindrichttps://www.blogger.com/profile/09410091599326821837noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-41596154818299145572010-09-05T14:28:07.551-07:002010-09-05T14:28:07.551-07:00Hi Zach — I used Fortune's algorithm, but didn...Hi Zach — I used Fortune's algorithm, but didn't implement it myself. I used the <a href="http://github.com/nodename/as3delaunay" rel="nofollow">as3delaunay package</a> from nodename. I made a minor change to that package to expose the Edge list.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-22949295942042309152010-09-05T12:04:51.064-07:002010-09-05T12:04:51.064-07:00Thanks for the post; I really enjoyed reading it. ...Thanks for the post; I really enjoyed reading it. I look forward to the next part! Out of curiosity, how did you go about creating the Voronoi polygons out of the points? Did you use Fortune's algorithm or some other method?Zachnoreply@blogger.comtag:blogger.com,1999:blog-5052387.post-89750253131569015382010-09-04T16:58:11.078-07:002010-09-04T16:58:11.078-07:00This article is so interesting! I look forward to ...This article is so interesting! I look forward to the next part(s)!!Richard Carterhttps://www.blogger.com/profile/16330549885960167566noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-12136771110358585952010-09-04T15:01:56.608-07:002010-09-04T15:01:56.608-07:00Thanks Alex and Mike! While looking for blue nois...Thanks Alex and Mike! While looking for blue noise I found Mitchell's algorithm (<a href="http://www.mentallandscape.com/Papers_siggraph91.pdf" rel="nofollow">paper without registration requirement</a>) and Dunbar & Humphrey's paper. Both looked interesting but an approximation to Lloyd's algorithm is <i>so little code</i> that it beat everything else in terms of the results-to-effort ratio. Instead of computing the centroid I just average the vertices (although centroid isn't much more code), and get good results. In the full post I'll mention that it's only an approximation to Lloyd's algorithm.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-30969160723821320082010-09-04T14:24:25.465-07:002010-09-04T14:24:25.465-07:00Great post. Mitchell's best-candidate sampling...Great post. Mitchell's <a href="http://portal.acm.org/citation.cfm?id=127719.122736" rel="nofollow">best-candidate</a> sampling algorithm is another easy way to generate blue noise. There's also <a href="http://www.cs.virginia.edu/~gfx/pubs/antimony/antimony.pdf" rel="nofollow">Dunbar & Humphrey's</a> approach, which seems attractive on paper but I've not yet been motivated to implement it.Mike Bostockhttps://www.blogger.com/profile/13533475496966995398noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-13009294890007290862010-09-04T11:19:55.680-07:002010-09-04T11:19:55.680-07:00Wow, thats definitve the best map generator I'...Wow, thats definitve the best map generator I've ever seen. This generated map is so random and realistic at the same time.<br /><br />Keep the good work on, Amit!<br /><br />(lol Comment system ate my first comment)Alexhttps://www.blogger.com/profile/07334422838982024385noreply@blogger.com