Procedural Generation – 2D game

Updated on June 15, 2017 in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
5 on September 24, 2014

Hi, I am currently working on a 2D game which involves PG(Procedural Generation) and I’ve just started working on the part where the game generates a level. Here is what i got so far: http://pastebin.com/S2qB8iyv

Also I made this image how the system currently works(Correction, it should be Row 2 in the example 😛):

Now, if anyone here knows a good way I could go about creating the path in between the Green and Red X(They will be randomly placed at runtime i just placed them there to show what I mean),
as I cant wrap my head around it. maybe I’ve just got the yips but any help would be grateful.
Thanks 🙂
Sincerely, Filiph Sandström. 😀

  • Liked by
Reply
1 on September 24, 2014

Hi Filiph, Unity has a pathfinding system called NavMesh, the problem is that it appears to only work in 3D environments. So if your game is completely based on 2D I suggest you look for others pathfinding solutions.

There is one called Poly|Nav – 2D Pathfinding on the Asset Store that seems pretty good. ^^ 😀

Master
on September 25, 2014

About PolyNav, I bought it and tried it for a really simple enemy AI. Its real easy to get started, making the navmesh and also what to avoid was super simple too.

Just thought I’d share 🙂

Show more replies
  • Liked by
Reply
Cancel
0 on September 25, 2014

I think I see what you’re trying to achieve, try this:
have a starting tile
have that tile pick a random direction (north south east west), move there, and repeat
eventually it will reach the goal location.
that’ll create a really random, windy path

  • Liked by
Reply
Cancel
1 on June 15, 2017

Im reading this right now and I think it could help you with path finding:
http://www.alanzucconi.com/2015/02/24/to-voronoi-and-beyond/

Wise
on June 15, 2017

Check when this was posted. 3 years ago…

 

Show more replies
  • Liked by
Reply
Cancel