使用ThreeJS,ReactJS,GraphQL和NodeJS构建的开源Minecraft克隆
使用ThreeJS,ReactJS,GraphQL和NodeJS构建的开源Minecraft克隆
JavaScript 游戏开发
共2626Star
详细介绍
Disclaimer
MC.JS brings the best-selling PC game Minecraft into the web with the power of Javascript.
Motivation
Having to open an additional app to play a game is sometimes too tiring. Therefore, I thought it'd be interesting to somehow implement Minecraft with javascript, essentially bringing the whole Minecraft game onto the web. This not only takes away the tedious process of installing the game, it also brings the entire game to players within a couple clicks.
Screenshots
These are some screenshots taken directly from the project.
User Authentication
Neatly Styled Game UI
Awesome Graphics
Build Stack
Javascript.
Frontend
Backend
Authentication
Features
- Player registration
- Save worlds
- Database support
Installation
Before cloning the repo or doing anything, be sure to install docker and node on your computer. After that, run the following commands:
# Install the prerequisite libraries
yarn global add prisma graphql-cli nodemon
# Clone the repository
git clone https://github.com/ian13456/mc.js.git
# Download packages for both server and client
yarn
# Export environment variables for prisma
# FOR WINDOWS
set PRISMA_MANAGEMENT_API_SECRET=my-secret
# FOR MAC/LINUX (recommend putting this into .bashrc)
export PRISMA_MANAGEMENT_API_SECRET=my-secret
# Start all services
yarn run init # only needed when running for the first time
yarn run start
After these commands, visit localhost:3000
Note