Code Monkey home page Code Monkey logo

java-weltschmerz's Introduction

Weltschmerz

Weltschmerz is a world generator for Terra.

  • weltschmerz-core: the core
  • weltschmerz-noise: noise generator using OpenSimplex/Joise
  • heightmap-generator: for generating heightmaps.

Dependency tree:

  • weltschmerz-core
    • heightmap-generator
      • weltschmerz-noise
        • SudoPlayGames/Joise

License

Licensed under MIT. See LICENSE for more information.

Questions, feedback, and contacting us

Discord chat

https://discord.starandserpent.com/

Website, email, and more links

https://www.starandserpent.com

Forums

https://community.ritualsoftheold.com/

java-weltschmerz's People

Contributors

pawlost avatar pilvinen avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pawlost

java-weltschmerz's Issues

High memory usage

There might be an issue with memory usage.

  1. It seems empty space might be taking up memory. This can be seen when the world size is set to too large so that the computer running it will eventually run out of memory. But instead of consistently running out of memory after a certain number of chunks has been generated smaller worlds can achieve a _higher chunk count, which is counter intuitive.

I am not certain whether this is Weltschmerz or Terra issue. I'm suspecting Weltschmerz so I'm opening the ticket under Weltschmerz for now.

  1. When generating terrain before any terrain is generated, but the world is up and running the memory usage climbs up steadily to around 3.5 GB. After that terrain starts appearing and taking up more memory in increments of maybe 40 MB.

  2. After a sort of "section" has been generated the world generation takes a pause, maybe 5-10 seconds. During this time no new terrain is being generated. When the generation resumes a chunk of maybe 400 MB of memory is reserved for something. After that new terrain starts appearing eating memory again in chunks of around 40 MB.

https://i.snag.gy/XRh08F.jpg

This is the shape of the area after which the terrain generation takes a small break catching it's breath for reasons unknown.

Implement performance testing

Implement performance testing so we know how (in)efficient Weltschmerz is.

  1. How long it takes to start/generate map.

  2. How fast does Weltschmerz fill maps.

Cross sector generation

Weltschmerz should handle terrain block slope between different terrains and terra should just generate this slope

Inefficient use of noise

Chunk generation calls for noise generation for each block. This results in a minimum of 4096 calls for the noise function. Each call takes about 2 ms. We need a more efficient way to call for noise - ideally only once per chunk.

Equator

Implement equator.

We need to know distance from equator. Distance from equator will be used in determining temperature among other things. It will be central for the whole climate based biomes along with height.

Set generation height (ocean level)

Currently terrain gets generated based on the load marker radius, but the only way to generate a flat surface terrain is to limit Y generation level at the max radius.

This results in terrain which is generated really high and you have to fly high up to the terrain to interact with it. This is getting increasingly annoying.

To fix the issue we should add support for setting the "ocean level" or surface generation height.

In other words terrain generation should not be influenced by the load marker. Instead the load marker should load terrain when terrain is encountered in the world.

Ultimately the goal is of course that the load marker follows the player and we load and unload terrain based on a bunch of rules.

But as far as Weltschmerz is concerned we should have support for setting the surface generation level which is not dependent on the location of the load marker. Instead the load marker and camera should be placed at the surface generation level.

Temperature

Calculate temperature depending on equator-distance and elevation. Take into
consideration the heat capacity of land and water.

Tectonic Plates

We should be able generate tectonic plates for more detailed mountain generation.

Saving generated map

Map should be saved in some file, probably JSON format, so we dont have to generate it over again. All height maps are going to be in this file, where each row is pixel and will contain one height map information.

Open tickets for Weltschmerz

Tickets are needed to form a picture of what is still missing and what the challenges are.

@Pawlost could you please open some since you have been working on Weltschmerz solely? Thank you.

Rivers and lakes

Simulate rivers based on precipitation and elevation to determine erosion. Springs
should emerge at close to local maxima with high precipitation. Determine lake positions and sizes according to rivers. Lakes should emerge at local minima with incoming rivers.

Support for entity and block packs

Right now we have hardcoded block generation. We have to build new module which will pass entities and block to Terra and Weltschmerz and then implemet it to Weltschmerz

Planetary settings for adjusting planet conditions

This is a placeholder ticket. I will fill out more information when it becomes relevant and I have time to do more research on what is needed.

But basically we want settings like:

  • Planet distance from sun.
  • Planet axis tils.

Etc. And adjusting those would affect the temperature and moisture and biome generation etc on the planet.

The end game is to have support for multiple planets for modders.

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.