| Blockland Forums > Modification Help |
| grid based pathfinding help |
| << < (4/4) |
| phflack:
--- Quote from: Kyuande on September 15, 2017, 10:55:53 PM ---I never knew you could use bitmasks to do something neat like this, I wish I knew that sooner. --- End quote --- they're pretty useful, I've been using them for pretty much everything map generating related they work well with road/maze generators because you can do a switch statement to put the correct road tile down and it's easy to generate the bitmasks in the first place (linking two nodes is just %westNode |= $paths[east]; %eastNode |= $paths[west];) |
| Kyuande:
May I see a bigger example? Would really love to try this out. |
| phflack:
https://www.cs.drexel.edu/~phf29/blockland/city.html source code is near the bottom to run it, you're going to need to find and replace 6887 with your ID run DCG_update(); to update the file (and do it after you spawn in) run DCG_buildCity(); to generate and build the city (DCG = DuckCityGenerator) |
| Navigation |
| Message Index |
| Previous page |