Coder Social home page Coder Social logo

shaoruu / mine.js Goto Github PK

View Code? Open in Web Editor NEW
302.0 8.0 31.0 88.52 MB

:mount_fuji: A voxel world built with JS/TS/RS. (formerly mc.js) (maybe mine.ts? or even mine.rs?)

Home Page: https://github.com/voxelize/voxelize

License: MIT License

JavaScript 1.53% CSS 0.48% HTML 0.06% Svelte 4.07% TypeScript 36.80% GLSL 0.58% Rust 56.47%
mcjs voxel engine javascript freshkoala nodejs threejs rust actix websocket

mine.js's Introduction

MineJS has been rewritten into a customizable fullstack library called voxelize

MineJS is a multiplayer voxel engine that runs in your browser! (Probably should change the name to MineRS/MineTS)

Any PRs are welcomed! Here's the quick TODO list that we're following: Link

๐ŸŽฏ Disclaimers

This is purely a passionate project. Although inspired, I have no intention for this game to be affiliated with Minecraft, or any licensed voxel engines. Further, textures and assets used in the game are all licensed for free use. More information can be found in the last section.

๐Ÿ‘‘ Motivation

We thought it would be interesting to design a game that is inspired by popular voxel engines such as "Minetest" and "Veloren". With the combination of Rust and TypeScript, we hope to deliver quality graphics and performance, as well as interactive multiplayer game play within a 3D voxel-based environment.

๐Ÿ“ท Gallery

๐Ÿ‘ท WIP (all help welcomed!)

Terrain Generation

๐ŸŽฎ Controls

  • V: Toggle zoom
  • R: Toggle sprint
  • T: Toggle chat
  • J: Toggle debug
  • F: Toggle physics
  • C: Toggle perspective
  • K: Toggle fullscreen
  • Z: Bulk placement
  • X: Bulk destruction
  • 0-n: Change block placement
  • Space: Jump / fly up
  • W/A/S/D: Movements
  • L-Shift: Fly down
  • L-Mouse: Break block
  • M-Mouse: Get block of looking
  • R-Mouse: Place block
  • Tab: Player list

๐Ÿ Installation

# go to the folder you save ur projects
cd path/to/folder

# clone the repository
git clone https://github.com/ian13456/mine.js

# cd into mine.js
cd mine.js

# you need yarn for this project
# somewhere here https://classic.yarnpkg.com/en/docs/install/#debian-stable
# after you install yarn, install the dependencies needed
yarn

# next you need cargo watch
cargo install cargo-watch

# next compile protobuf
yarn compile

# next run server
yarn server

# next listen on client changes (separate terminal)
yarn client

# OPEN ANOTHER TERMINAL
yarn watch

# visit localhost:3000

๐Ÿ““ Citations

mine.js's People

Contributors

angristan avatar baltaazr avatar dependabot[bot] avatar fi1osof avatar foxkdev avatar gokaygurcan avatar homerchen19 avatar josephkipkemoi avatar princesselulu avatar shaoruu avatar usymmij avatar weilonge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mine.js's Issues

Some suggestions

I briefly went through your code. and did a profiling on the webpage. Your work is amazing. Just some suggestions here.

  1. Rendering every transparent material in a mesh for each chunk is a bottleneck for the rendering right now. If you can make transparent blocks in single mesh with an atlas, it will definitely improve the performance a lot.

  2. I saw you disabled frustum culling on client side. It's fairly easy to calculate a bounding box for each chunk and add back the frustum culling. It will improves reduce rendering cost by 60% based on fov.

Server CPU usage - what is normal?

I just had my first look and execution - a very nice project you have here! ๐Ÿ˜„

I am starting to pick up rust-lang and getting used to actix-web and related infrastructure. I noticed while running the server (without changing any config) on my Windows machine that it was taking close to 30% of my CPU resource after executing main.exe (yarn server). My CPU is an i7-8750H.

It seems to be quite a high CPU usage from what I expect to see based on how the world logic works. Could you please give some general indication of the resource usage that you consider normal? My cargo is using the MSVC build tools.

Thanks!

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.