forked from PrismarineJS/prismarine-web-client
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into client-mods
- Loading branch information
Showing
78 changed files
with
3,183 additions
and
2,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,25 @@ jobs: | |
# if: ${{ github.event.pull_request.base.ref == 'release' }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
dedupe-check: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.head.ref == 'next' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pnpm | ||
run: npm install -g [email protected] | ||
|
||
- name: Run pnpm dedupe | ||
run: pnpm dedupe | ||
|
||
- name: Check for changes | ||
run: | | ||
if ! git diff --exit-code --quiet pnpm-lock.yaml; then | ||
echo "pnpm dedupe introduced changes:" | ||
git diff --color=always pnpm-lock.yaml | ||
exit 1 | ||
else | ||
echo "No changes detected after pnpm dedupe in pnpm-lock.yaml" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ out | |
generated | ||
storybook-static | ||
server-jar | ||
config.local.json | ||
|
||
src/react/npmReactComponents.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ RUN npm i -g [email protected] | |
RUN npm init -yp | ||
RUN pnpm i express github:zardoy/prismarinejs-net-browserify compression cors | ||
EXPOSE 8080 | ||
VOLUME /app/dist | ||
ENTRYPOINT ["node", "server.js", "--prod"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
### Eaglercraft Comparison | ||
|
||
This project uses proxies so you can connect to almost any vanilla server. Though proxies have some limitations such as increased latency and servers will complain about using VPN (though we have a workaround for that, but ping will be much higher). | ||
This client generally has better performance but some features reproduction might be inaccurate eg its less stable and more buggy in some cases. | ||
|
||
| Feature | This project | Eaglercraft | Description | | ||
| --------------------------------- | ------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| General | | | | | ||
| Mobile Support (touch) | ✅(+) | ✅ | | | ||
| Gamepad Support | ✅ | ❌ | | | ||
| A11Y | ✅ | ❌ | We have DOM for almost all UI so your extensions and other browser features will work natively like on any other web page (but maybe it's not needed) | | ||
| Game Features | | | | | ||
| Servers Support (quality) | ❌ | ✅ | Eaglercraft is vanilla Minecraft, while this project tries to emulate original game behavior at protocol level (Mineflayer is used) | | ||
| Servers Support (any version, ip) | ✅ | ❌ | We support almost all Minecraft versions, only important if you connect to a server where you need new content like blocks or if you play with friends. And you can connect to almost any server using proxy servers! | | ||
| Singleplayer Survival Features | ❌ | ✅ | Just like Eaglercraft this project can generate and save worlds, but generator is simple and only a few survival features are supported (look here for [supported features list](https://github.com/zardoy/space-squid)) | | ||
| Singleplayer Maps | ✅ | ✅ | We support any version, but adventure maps won't work, but simple parkour and build maps might be interesting to explore... | | ||
| Singleplayer Maps World Streaming | ✅ | ❌ | Thanks to Browserfs, saves can be loaded to local singleplayer server using multiple ways: from local folder, server directory (not zip), dropbox or other cloud *backend* etc... | | ||
| P2P Multiplayer | ✅ | ✅ | A way to connect to other browser running the project. But it's almost useless here since many survival features are not implemented. Maybe only to build / explore maps together... | | ||
| Voice Chat | ❌ | ✅ | Eaglercraft has custom WebRTC voice chat implementation, though it could also be easily implemented there | | ||
| Online Servers | ✅ | ❌ | We have custom implementation (including integration on proxy side) for joining to servers | | ||
| Plugin Features | ✅ | ❌ | We have Mineflayer plugins support, like Auto Jump & Auto Parkour was added here that way | | ||
| Direct Connection | ❌ | ✅ | We have DOM for almost all UI so your extensions and other browser features will work natively like on any other web page | | ||
| Mods | ❌(roadmap) | ❌ | This project will support mods for singleplayer. In theory its possible to implement support for modded servers on protocol level (including all needed mods) | | ||
| Video Recording | ❌ | ✅ | Don't feel needed | | ||
| Metaverse Features | ❌(roadmap) | ❌ | Iframes, video streams inside of game world (custom protocol channel) | | ||
| Sounds | ✅ | ✅ | | | ||
| Resource Packs | ✅(--) | ✅ | This project has very limited support for them (only textures images are loadable for now) | | ||
| Assets Compressing & Splitting | ✅ | ❌ | We have advanced Minecraft data processing and good code chunk splitting so the web app will open much faster and use less memory | | ||
| Graphics | | | | | ||
| Fancy Graphics | ❌ | ✅ | While Eaglercraft has top-level shaders we don't even support lighting | | ||
| Fast & Efficient Graphics | ❌(+) | ❌ | Feels like no one needs to have 64 rendering distance work smoothly | | ||
| VR | ✅ | ❌ | Feels like not needed feature. UI is missing in this project since DOM can't be rendered in VR so Eaglercraft could be better in that aspect | | ||
| AR | ❌ | ❌ | Would be the most useless feature | | ||
| Minimap & Waypoints | ✅(-) | ❌ | We have buggy minimap, which can be enabled in settings and full map is opened by pressing `M` key | | ||
|
||
Features available to only this project: | ||
|
||
- CSS & JS Customization | ||
- JS Real Time Debugging & Console Scripting (eg Devtools) | ||
|
||
### Tech Stack | ||
|
||
Bundler: Rsbuild! | ||
UI: powered by React and css modules. Storybook helps with UI development. | ||
|
||
### Rare WEB Features | ||
|
||
There are a number of web features that are not commonly used but you might be interested in them if you decide to build your own game in the web. | ||
|
||
TODO | ||
|
||
| API | Usage & Description | | ||
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `Crypto` API | Used to make chat features work when joining online servers with authentication. | | ||
| `requestPointerLock({ unadjustedMovement: true })` API | Required for games. Disables system mouse acceleration (important for Mac users). Aka mouse raw input | | ||
| `navigator.keyboard.lock()` | (only in Chromium browsers) When entering fullscreen it allows to use any key combination like ctrl+w in the game | | ||
| `navigator.keyboard.getLayoutMap()` | (only in Chromium browsers) To display the right keyboard symbol for the key keybinding on different keyboard layouts (e.g. QWERTY vs AZERTY) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
"prod-start": "node server.js --prod", | ||
"test-mc-server": "tsx cypress/minecraft-server.mjs", | ||
"lint": "eslint \"{src,cypress,prismarine-viewer}/**/*.{ts,js,jsx,tsx}\"", | ||
"lint-fix": "pnpm lint --fix", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build && node scripts/build.js moveStorybookFiles", | ||
"start-experiments": "vite --config experiments/vite.config.ts --host", | ||
|
@@ -68,12 +69,12 @@ | |
"esbuild-plugin-polyfill-node": "^0.3.0", | ||
"express": "^4.18.2", | ||
"filesize": "^10.0.12", | ||
"flying-squid": "npm:@zardoy/flying-squid@^0.0.49", | ||
"flying-squid": "npm:@zardoy/flying-squid@^0.0.51", | ||
"fs-extra": "^11.1.1", | ||
"google-drive-browserfs": "github:zardoy/browserfs#google-drive", | ||
"jszip": "^3.10.1", | ||
"lodash-es": "^4.17.21", | ||
"minecraft-data": "3.80.0", | ||
"minecraft-data": "3.83.1", | ||
"minecraft-protocol": "github:PrismarineJS/node-minecraft-protocol#master", | ||
"mineflayer-item-map-downloader": "github:zardoy/mineflayer-item-map-downloader", | ||
"mojangson": "^2.0.4", | ||
|
@@ -142,7 +143,7 @@ | |
"http-browserify": "^1.7.0", | ||
"http-server": "^14.1.1", | ||
"https-browserify": "^1.0.0", | ||
"mc-assets": "^0.2.23", | ||
"mc-assets": "^0.2.28", | ||
"minecraft-inventory-gui": "github:zardoy/minecraft-inventory-gui#next", | ||
"mineflayer": "github:zardoy/mineflayer", | ||
"mineflayer-pathfinder": "^2.4.4", | ||
|
@@ -174,7 +175,7 @@ | |
"diamond-square": "github:zardoy/diamond-square", | ||
"prismarine-block": "github:zardoy/prismarine-block#next-era", | ||
"prismarine-world": "github:zardoy/prismarine-world#next-era", | ||
"minecraft-data": "3.80.0", | ||
"minecraft-data": "3.83.1", | ||
"prismarine-provider-anvil": "github:zardoy/prismarine-provider-anvil#everything", | ||
"prismarine-physics": "github:zardoy/prismarine-physics", | ||
"minecraft-protocol": "github:PrismarineJS/node-minecraft-protocol#master", | ||
|
@@ -189,7 +190,7 @@ | |
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]", | ||
"[email protected]": "patches/[email protected]", | ||
"minecraft-protocol@1.51.0": "patches/minecraft-protocol@1.49.0.patch" | ||
"minecraft-protocol@1.54.0": "patches/minecraft-protocol@1.54.0.patch" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
|
Oops, something went wrong.