Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 29, 2014 at 05:39 PM by AlucardJay for the following reason:

Question is off-topic or not relevant : Write-my-Code

avatar image
0
Question by UnbreakableOne · Jan 29, 2014 at 03:21 PM · 2darrayprocedural-generation

How to remove gaps in a 2D map.

Using an algorithm, I procedurally create a 2D map in which 1 represents block/wall and 0 represents empty space.

Problem is, my algorithm generates some gaps that I would like to eliminate. What I mean is something like this

 111
 101
 111
 

As you can see, there is a one cell in middle of walls. I like it to change into this:

 111
 111
 111
 

How can I achieve it?

Thanks.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Headworker · Jan 29, 2014 at 03:48 PM 1
Share

Well there a some problems with your question:

  1. This is not Unity related.

  2. According to you the problem lies within the algorithm, how can anybody help you if you if you didn't post the algorithm?

Please correct/improve your question.

avatar image UnbreakableOne · Jan 29, 2014 at 05:30 PM 0
Share
  1. I know it's not Unity related but I thought it would be a problem that another game dev might've faced before.

  2. I'm afraid I can't fix the algorithm, I just need to fix the gaps that the algorithm generates in maps.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to remove null's from 2d array ? It's removing but only 2 out of 4 null's. 0 Answers

2D Array of GameObjects... 1 Answer

my2dArray.Length(0) 2 Answers

Convert 1D array to 2D array 2 Answers

How to Instantiate Objects at specific Spawn Points without overlapping? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges