From d196ce57e34946e5a827bea58f7e9b17f41bb3b8 Mon Sep 17 00:00:00 2001 From: circuit10 Date: Fri, 5 Nov 2021 09:20:23 +0000 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b14d495..16afb77 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,28 @@ +# Eaglercraft -## eaglercraft +[Live demo](https://games.nx-eags.tk/minecraft_demo/) -live demo available at https://games.nx-eags.tk/minecraft_demo/ -I'm currently not hosting any servers right now if you want an ingame demo compile the modified bungeecord server and download the minecraft spigot server software 1.5.2 from https://ci.md-5.net/view/SpigotMC/ +Note that the server may be down - if you still want an in-game demo compile the modified Bungeecord server found in `eaglercraftbungee` and connect it to a Minecarft 1.5.2 server. -eaglercraft is a port of minecraft 1.5.2 that runs in a web browser. it uses the decompiled source of the official minecraft 1.5.2 direct from mojang decompiled by MCP (http://www.modcoderpack.com/) and therefore it is binary compatible with any minecraft 1.5.2 server through a modified version of md_5's bungeecord which proxies the browser's websocket connection to pure TCP. TeaVM is used to compile the java source to javascript, and a special compatibility layer created by your's truly allows the fixed function opengl 1.3 based rendering engine mojang uses to operate through an html5 webgl canvas with minimal changes to the source. +## What is Eaglercraft? -to compile, simply clone the repository and import the root directory as a gradle project into eclipse. run the gradle 'teavm' compile target to generate the classes.js file from the source tree. to modify the game's assets repository (javascript/assets.epk) make your changes in lwjgl-runtime/resources/ and use the eclipse project located in epkcompiler/ to regenerate the assets.epk file and copy it to the javascript directory. to run the minecraft source in desktop java mode for quick debugging using native opengl for rendering instead of webgl create a new empty eclipse project. link the src/main/java and src/lwjgl/java as source folders and add the jars in lwjgl-rundir as dependancies. Create a run configuration and add a jvm argument pointing to the lwjgl natives folder (lwjgl-rundir/natives) like this, -Djava.library.path=natives, and make sure the working directory for the run configuration is the lwjgl-rundir folder. +Eaglercraft is a port of Minecraft 1.5.2 that runs in a web browser. It can join real Minecraft 1.5.2 servers through a custom proxy based on Bungeecord. -this project is just a proof of concept to show what can be accomplished by a skilled developer using TeaVM. it is not very fast or stable, and the only real useful portion is the emulator code which creates a makeshift fixed function opengl 1.3 context using webgl (based on opengl 3.3) operational in the browser. maybe it can be used to port other games in the future +## How does it work? + +Eaglercraft uses the decompiled source of the official version of Minecraft 1.5.2 direct from Mojang decompiled by [MCP](http://www.modcoderpack.com/), compiled using [TeaVM](https://teavm.org/). Therefore it can join any Minecraft 1.5.2 server, as it is really running a modified version on Minecraft 1.5.2 in the browser. However, due to CORS restrictions it must use a modified version of Bungeecord which proxies the browser's Websocket connection to the pure TCP connection used by Minecraft. For graphics, a custom compatibility layer created by me allows the fixed function OpenGL 1.3 based rendering engine mojang uses to operate through an HTML5 WebGL canvas with minimal changes to the source. + +## Compiling + +To compile for the web, run the gradle 'teavm' compile target to generate the classes.js file. + +To complile to regular desktop Java for quick debugging, using native OpenGL for rendering instead of WebGL: +- Create a new empty eclipse project +- Link the src/main/java and src/lwjgl/java as source folders and add the jars in lwjgl-rundir as dependencies +- Create a run configuration and add a jvm argument pointing to the lwjgl natives folder (lwjgl-rundir/natives) like this: `-Djava.library.path=natives`, and make sure the working directory for the run configuration is the lwjgl-rundir folder. + + +To modify the game's assets repository (javascript/assets.epk), make your changes in lwjgl-runtime/resources/ and use the Eclipse project located in epkcompiler/ to regenerate the assets.epk file and copy it to the Javascript directory. + + +This project is just a proof of concept to show what can be accomplished by a skilled developer using TeaVM. It is not very fast or stable, and the only real useful portion is the emulator code which creates a makeshift fixed function OpenGL 1.3 context using webgl (based on OpenGL 3.3) operational in the browser. Maybe it can be used to port other games in the future.