{"id":18610504,"url":"https://github.com/unitytechnologies/proceduralpatterns2d","last_synced_at":"2025-04-10T22:32:13.033Z","repository":{"id":108305444,"uuid":"130082156","full_name":"UnityTechnologies/ProceduralPatterns2D","owner":"UnityTechnologies","description":null,"archived":false,"fork":false,"pushed_at":"2018-06-12T09:54:21.000Z","size":664,"stargazers_count":112,"open_issues_count":0,"forks_count":19,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-25T05:42:01.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UnityTechnologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-18T15:18:26.000Z","updated_at":"2024-12-03T09:12:33.000Z","dependencies_parsed_at":"2023-05-21T12:30:39.666Z","dependency_job_id":null,"html_url":"https://github.com/UnityTechnologies/ProceduralPatterns2D","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FProceduralPatterns2D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FProceduralPatterns2D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FProceduralPatterns2D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UnityTechnologies%2FProceduralPatterns2D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UnityTechnologies","download_url":"https://codeload.github.com/UnityTechnologies/ProceduralPatterns2D/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248310067,"owners_count":21082339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T03:10:32.845Z","updated_at":"2025-04-10T22:32:13.022Z","avatar_url":"https://github.com/UnityTechnologies.png","language":"C#","readme":"# Procedural Patterns to use with Tilemaps\n\n![Procedural](https://i.imgur.com/hOk30GL.png)\n\n## Description\n\nThis project shows a number of different patterns to use with Tilemaps to create custom maps. \nAll the main functions are within the script [MapFunctions.cs](https://github.com/UnityTechnologies/ProceduralPatterns2D/blob/master/Assets/Global%20Scripts/MapFunctions.cs).\n\n### How to get started:\n\nWithin this project there are scenes showing examples of the following algorithms:\n1. [Perlin Noise](https://github.com/UnityTechnologies/ProceduralPatterns2D/tree/master/Assets/Generation%20Examples/Perlin%20Noise)\n\t1. Basic Generation (for top layer)\n\t2. Smoothed Generation (for top layer)\n\t3. Cave Generation\n2. [Random Walk](https://github.com/UnityTechnologies/ProceduralPatterns2D/tree/master/Assets/Generation%20Examples/Random%20Walk)\n\t1. Basic Generation (for top layer)\n\t2. Smoothed Generation (for top layer)\n\t3. Cave Generation (4 directional movement)\n\t4. Custom Cave Generation (8 directional movement)\n3. [Cellular Automata](https://github.com/UnityTechnologies/ProceduralPatterns2D/tree/master/Assets/Generation%20Examples/Cellular%20Automata)\n\t1. von Neumann Neighbourhood\n\t2. Moore Neighbourhood\n4. [Directional Dungeon](https://github.com/UnityTechnologies/ProceduralPatterns2D/tree/master/Assets/Generation%20Examples/Directional%20Tunnel)\n\nThere is also an example of using multiple types of generation for one tilemap. \nThis can be seen in the Multi-Generation Example subfolder.\n\n### Layout of each scene\n\nWithin each scene there will be an object named LevelGenerator. This object holds the [LevelGenerator.cs](https://github.com/UnityTechnologies/ProceduralPatterns2D/blob/master/Assets/Global%20Scripts/LevelGenerator.cs) Script, the exception to this rule is the multi-generation example scene. \nThe object named LevelGenerator in this scene holds a customised version of the [LevelGenerator.cs](https://github.com/UnityTechnologies/ProceduralPatterns2D/blob/master/Assets/Multi-Generation%20Example/Scripts/LevelGeneratorStack.cs) script which allows for multiple types of Map Settings\n\n![LevelGenerator](https://i.imgur.com/tGOCyZu.png)\n\nOn this game object, you can generate and clear the level in edit mode using the buttons provided\n\n### How to create Map Settings\n\nTo create a new map setting object, you need to right click in the project view then go Create-\u003eMap Settings.\n\n![ProjectView](https://i.imgur.com/3mnSX93.png)\n\n*or*\n\nYou can got to Assets-\u003eCreate-\u003eMap Settings from the toolbar\n\n![Toolbar](https://i.imgur.com/DshzBGv.png)\n\n### How to call functions from MapFunctions.cs\n\nThe good thing about the MapFunctions.cs script is that you can take it out of this project and put it into any other project.\nIf you want to call functions from the script you would just need to do the following:\n\n```csharp\nint[,] map;\nmap = MapFunctions.GenerateArray(width, height, empty);\nmap = MapFunctions.PerlinNoise(map, seed); \nMapFunctions.RenderMap(map, tilemap, tile);\n```\n\nWhat this code would do is:\n1. Create an int array for a map\n2. Generate the array into the map\n3. Generate perlin noise within the map\n4. Render the map to a tilemap\n\n**Software Requirements**\n\nRequired: Unity 2017.3, or later version\n\n**Hardware Requirements**\n\nRequired: Any Computer (Windows or Mac)\n\n**Owner and Responsible Devs**\n\nOwners: Ethan Bruins (ethanbruins@unity3d.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitytechnologies%2Fproceduralpatterns2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitytechnologies%2Fproceduralpatterns2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitytechnologies%2Fproceduralpatterns2d/lists"}