Also make sure that another port is used and communicated correctly when the default port is already in use.
This allows opening multiple singleplayer worlds on the same computer.
fixes#605
The index is then only calculated once. Individual insertions are not optimized though.
fixes#600
Also it seems that in my previous performance commit I had made a mistake in my measurement, I must have measured a buggy version which turned out to be super fast. In actuality the performance difference was much smaller, so I decided to optimize that section as well.
Now it's at 1.7 ms per chunk. Still needs more improvements, I guess.
To make this possible I switched from 3d noise offsets to a single 2d noise offset in z direction. This makes the biome structure more predictable vertically, and therefore suited for getting entire columns at once.
This introduced some artifacts at biome borders, but I could remove them by rotating the bioem map slightly, such that none of the biome borders are vertical.
In total this halfed the cost of the TerrainGenerator, which makes up most of chunk generation. Chunk generation speed is now around 1-1.2 ms per chunk.
This also opens up future optimizations, like bulk insertion into the chunk data structure.
Slightly slower, but halfs GPU memory usage and allows storing 3× more faces on the GPU.
Also makes meshing a bit slower, but transparency sorting should be a lot faster, since it's shuffling around less memory.
* Changed the saveFolder function so that it does the correct command on windows
* Changed the saveFolder function so that it does the correct command on windows
* why
* Use internal springs instead of external springs.
This is not only more efficient, but also would potentially fix a large portion of open physics issues.
* Allow stepping onto blocks if velicity is positive and define a minimum stepping height.
* Add jump cooldown and make jump-stepping onto a block smoother.
* Disable the jump cooldown when the jump button was released.
* Remove some leftover code and fix stepping too far.
Could also help with #547 once the biomes in question are transitioned to the new stalagmite structures, instead of using the old, dedicated generator.
* Fix biome structure chance, Ice and Frost
* Make grassland consistent with other changes
* Revert glacier stoneBlock
* Warm Ocean stoneBlock is now sandstone
* 1/3 forest trees are birch
* Prototype for spring-based collision boxes. It currently breaks at low fps and stairs are kind of weird
* Better stair climbing.
* Fix the problem where the player bounces off when jumping towards a block.
* Fix some things.
* More fixes