ID:151270
 
Hi All,
A little while back I posted about how to create a Map Generation System in "Developer How-To", well no responded and so I've been tackling it blindly, haha!

Well I'm working on it in the form of a Library so when I'm done, I can allow everyone to use it. So far it's pretty bare, it has the functions to:

1: Generate Map world.maxx and maxy
2: It takes in args for creating (X) amount of water in Rivers
3: Generates overall tree's
4: Takes Trees and for select area's builds a forest directly off the src tree

Report:
I'm trying to get the Generate_Forest(T) to recognize when it is over a water obj and delete itself. It works in Generate_Trees(T), but now it isn't. Once I fix this bug, I'm going to use the same general proc() to do a "Generate_Lakes()"

If it's ok with the Admin's and Moderator's, I'd like to post the Full Code that I have at this point here. But I want to make sure it's ok first.

P.S What do you guys think of this Idea?
P.S.S Am I duplicating something that's already out there?
It's good to hear about people working on powerful and relatively unknown systems like these. I myself am a big fan of random map generators (damn, there was a name for this stuff... procedural content, was it?), yet rarely do I see it on BYOND games.

I think the proper approach to this would be for you to post a 'pseudocode' version of your code. If you'd like to discuss better programming options for a certain function or algorithm, then posting in Developer How-To would be more appropiate; but if you're interested in getting feedback on the overall pipeline of the generator, then pseudocode and a few images (graphs and arrows) always make for a clear and catchy post. :)

*****

FYI, pseudocode is basically writing code in a readable format;
Instead of typing:
for(var/turf/grass/g in view(src,1))
g.fertility ++
g.updateCropGrowth()
if(g.canHarvest == TRUE)
src << "The crops around you seem mature and ready to be harvested."
g.highlight()
else
src << "The soil smells and feels fertile; the crops are growing properly."


You'd type:

Look for grass spots around the player, and fertilize them.

If there are crops growing there, and they are ready to be harvested,
send a message to the player, and highlight the crop.
Otherwise,
keep the player noted on the crops' progress.
Hopeforthelost wrote:
If it's ok with the Admin's and Moderator's, I'd like to post the Full Code that I have at this point here. But I want to make sure it's ok first.

Just for some clarification, it's entirely alright to post some code if it helps exemplify the design you're discussing (using the proper <dm> </dm> tags, of course) as long as that's the overall goal of the post. Otherwise, it'll just get moved over to Code Problems. As Goose mentioned though, you can also post pseudocode or charts too if that would help get the idea across. It just comes down to personal preference.