Code Monkey home page Code Monkey logo

mcworld's People

Contributors

ergor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mcworld's Issues

Block wrappers for NBT tags can be static

The Block class and its subclasses can be statically initialized. There is no need to create new objects each time we want to add a block to a world; the NBT lib doesn't seem to care.

Consider writing compute intensive segments in Rust

I believe Java suffers from not having value-type structs. We cannot pass a coordinate, nor return one, without allocating it on the heap. There are millions of allocations being done while rendering, which must unnecessarily slow down the process.

Consider the following options:

  • Keep using Java only. Try to profile the program and find out whether it is possible to optimize.
  • Re-write the rendering logic in Rust. The Java part of the program shall deal with input and preprocessing, and delegate the heavy lifting to the Rust program.
  • Re-write the complete program in Rust.

Detect hills/mountains

Detect hills and mountains in order to render the slopes as pure stone.

Currently they just look like heaps of dirt.

OpenStreetMap format support

Add support for OpenStreetMap (.osm) exports.
Can extract lots of surface data like roads, streets, forests, beach etc.

Multiple input layers

Add support for additional data:

  • Roads/streets
  • Landscapes: forests, beaches, etc
  • Lakes

Don't assume meters per pixel

In WorldMapper#toChunkBuilders, it is currently assumed that the distance unit per pixel is in meters per pixel.

Need to account for other units as well.

Re-do the rendering mechanism

Currently the rendering works on a per source height map basis.
But it should be working on a per chunk basis.

I.e. now it takes a height map and figures out which chunks they will become. But it should be the reverse; it should take a chunk coordinate, and figure out what source height map it needs to read from as well as which points it needs to read.

The rendering should be able to render any 1 chunk, fully independently from other chunks.

It should work as follows:

  • The program shall take as input what real-world coordinate should be defined as in-game block coordinate (0, 0).
  • Given a chunk coordinate, the renderer should select the appropriate source height map, or height maps if the chunk overlaps multiple source height maps.

The chunk first approach is better suited for streaming live data, e.g. for use in a server plugin with live data loading.

input heightmap range scaling

If the input heightmap has heights greater than 255, it can't fit in the game. There should be several options for how to deal with this:

  • No scaling (clipping)
  • Linear scaling
  • Logarithmic scaling

Tree generator

Ties in with #5

At first we can test with generating the trees and place them randomly.

Then eventually we can use the generator with the input layers of #5 to place trees accoring to rela data.

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.