Git Product home page Git Product logo

Comments (6)

Continuities avatar Continuities commented on May 27, 2024

It's all in world.js, in the function generateMap() [line 620]. Basically,
it starts from the center and spirals around, choosing the type of each
tile based on a roll of the die. The probabilities are modified based on
the existing adjacent tiles to make biomes "sticky" (ie, a tile that is
already next to a forest tile will be more likely to be a forest).

Hope that helps! I can go into more detail if you'd like.

On 27 May 2014 12:41, oriramikad [email protected] wrote:

I was extremely jealous of your terrain generation (not the cities, caves,
mines, etc, but the woods, grass, and plains), so I looked through the
code, but I couldn't find anything much. Can someone point me to where the
code for the generation is or tell me how it works?


Reply to this email directly or view it on GitHubhttps://github.com/Continuities/adarkroom/issues/83
.

from adarkroom.

oriramikad avatar oriramikad commented on May 27, 2024

Is it sticky just to the tile that was placed last, or to all tiles surrounding it?
Thanks for your help!

from adarkroom.

Continuities avatar Continuities commented on May 27, 2024

All tiles surrounding it that have already been placed. Usually, that's two.

On 27 May 2014 14:34, oriramikad [email protected] wrote:

Is it sticky just to the last placed tile, or to all tiles surrounding it?
Thanks for your help!


Reply to this email directly or view it on GitHubhttps://github.com/Continuities/adarkroom/issues/83#issuecomment-44316737
.

from adarkroom.

oriramikad avatar oriramikad commented on May 27, 2024

OK.
Also, does this mean it's a two-dimensional array?

map[World.RADIUS][World.RADIUS] = World.TILE.VILLAGE;

from adarkroom.

Continuities avatar Continuities commented on May 27, 2024

The entire map is stored as a two-dimensional array, yes.

On 27 May 2014 14:40, oriramikad [email protected] wrote:

OK.
Also, does this mean it's a two-dimensional array?

map[World.RADIUS][World.RADIUS] = World.TILE.VILLAGE;


Reply to this email directly or view it on GitHubhttps://github.com/Continuities/adarkroom/issues/83#issuecomment-44317456
.

from adarkroom.

oriramikad avatar oriramikad commented on May 27, 2024

All right! Thank you so much! :D

from adarkroom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.