647 reputation
48
bio website
location
age
visits member for 3 years, 3 months
seen yesterday

Jun
23
comment Algorithm for dividing a 2D grid into organic looking plates
Awesome, good for you!
Jun
3
comment Cram search results into viewport (of a search minimap)?
@helena4 I didn't mean to be picky, but rather trying to identify the best community to give a useful answer to your question.
Jun
2
comment Cram search results into viewport (of a search minimap)?
This doesn't seem to be gamedev specific -- perhaps try SO or ux.SE?
May
28
comment Algorithm for dividing a 2D grid into organic looking plates
@ChristianGeese Would you feel comfortable posting your code to a place like pastebin or something like that? I'd be happy to have a look -- I don't know C#, but maybe I'm able to spot something that might cause the slowness anyway?
May
28
comment Algorithm for dividing a 2D grid into organic looking plates
@ChristianGeese Even if you use Cell and Plate classes (instead of ints), the code should run very fast, as long as you used the same algorithmic approach.
May
20
revised Algorithm for dividing a 2D grid into organic looking plates
added 24 characters in body
May
20
comment Algorithm for dividing a 2D grid into organic looking plates
I've now updated the code slightly: the bit masks are gone and with them is the restriction of a maximum of 32 colors. The bit masks were used to store for each unfilled cell which are the candidate plates it could be assigned to. The new version simply looks that information up in the actual grid. Secondly, I added the border wrap-around. It turned out that both changes actually simplified the code somewhat. Last but not least, I changed some variable names for better readability. Enjoy!
May
20
revised Algorithm for dividing a 2D grid into organic looking plates
Updated the algorithm: no bit masks necessary, implemented wrap-around.
May
20
revised Algorithm for dividing a 2D grid into organic looking plates
added 2 characters in body
May
20
revised Algorithm for dividing a 2D grid into organic looking plates
Improved code legibility
May
19
comment Algorithm for dividing a 2D grid into organic looking plates
Storing the cells with adjacent plates might be useful if, e.g., you want to guarantee that the plates are (more or less) the same size.
May
19
revised Algorithm for dividing a 2D grid into organic looking plates
added 145 characters in body
May
19
revised Algorithm for dividing a 2D grid into organic looking plates
added 31 characters in body
May
19
comment Algorithm for dividing a 2D grid into organic looking plates
@ChristianGeese - Filled cells should never be overwritten: the cells array contains a list of all unwritten cells and a cell is removed from that list as soon as it is assigned a plate. This way it can never be overwritten. But now I'm curious: you say you already implemented it this way, yet a 500x500 grid with 6 plates take "forever" -- the above code, however, can fill 500x500 with 10 plates in under a second on my machine?!
May
19
comment Algorithm for dividing a 2D grid into organic looking plates
Well, you beat me to it ;-) But apart from that, I think it's useful in that there's some sample code to look at.
May
19
revised Algorithm for dividing a 2D grid into organic looking plates
added 740 characters in body
May
19
revised Algorithm for dividing a 2D grid into organic looking plates
added 740 characters in body
May
19
answered Algorithm for dividing a 2D grid into organic looking plates
Apr
1
awarded  Yearling
Mar
27
revised Licensing and commercial game development
Removed addressing and thank you note.