Comments (6)
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.
Is it sticky just to the tile that was placed last, or to all tiles surrounding it?
Thanks for your help!
from adarkroom.
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.
OK.
Also, does this mean it's a two-dimensional array?
map[World.RADIUS][World.RADIUS] = World.TILE.VILLAGE;
from adarkroom.
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.
All right! Thank you so much! :D
from adarkroom.
Related Issues (20)
- Problems returning to village? HOT 1
- Mobile / desktop connect HOT 2
- The wiki should have a guide to reading the codebase for the first time
- unarmed master has lower damage multiplier than martial artist HOT 1
- I want to know what's the use of going to an alien HOT 2
- Create SECURITY.md
- a problem about the bacon number HOT 1
- Alert when out of resources HOT 1
- Modifying Base64 save file to a high number breaks the game
- question HOT 2
- I'd like to translate an Android version HOT 1
- When you buy a map while your world is fully uncovered, the game crashes HOT 2
- URL to candybox is dead HOT 4
- Audio won't after changing language
- Data corrupted and game UI not show after fur storage keep growing and I refreshed the page HOT 1
- Encounter Tier 1 music loops incorrectly
- Hyper mode is on by default it seems HOT 2
- When attacking, only the first two sounds of each weapon type are used, not the third HOT 1
- Missing () HOT 1
- Bolas stun appears to be permanent HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adarkroom.