Coder Social home page Coder Social logo

Comments (1)

retroplasma avatar retroplasma commented on May 13, 2024

Probably looking at the code from the client can help put something together. I assume those engines have features to deal with octrees, frustum culling, HTTP and so on. Here's an overview of the files from the client:

  • main.cpp: Render loop, deals with the octree, requests new bulks/nodes, does culling, camera movement, decides which meshes are buffered. Calls functions from the other files
  • rocktree_util.h: Requests data from the servers and calls decoding functions
  • rocktree_http.h: HTTP. Caches some requests. The HTTP cache headers and the browser do the work in the Emscripten case. I think everything is cached for some time aside from the root meta Planetoid.
  • rocktree.proto, rocktree_decoder.h, rocktree_ex.h: Decode raw data. First protobuf, then postprocessing, then putting it in a form so it fits our octree data type and can be rendered
  • rocktree_types.h: Octree data structure with meshes, textures, matrices and download state. Grows/shrinks based on camera position. Instantiated in main
  • rocktree_math.h: Math functions for frustum culling and camera
  • rocktree_gl.h: Graphics binding. The interesting part here is the octant masking. The meshes can be sub-divided with these masks and help with level of detail. This mask binding can be improved by packing it into a smaller uniform value and unpacking it in the shader.

The crucial part is the decoding of the meshes. Everything else depends on how exhaustive and optimized it should be.

from earth-reverse-engineering.

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.