M
M
ModelViewWithoutControl2021-05-05 23:03:28
Java
ModelViewWithoutControl, 2021-05-05 23:03:28

How to make it possible to play Minecraft directly from the browser?

My friend and I are making a minecraft server and we want to make it possible to play on this server directly through the browser. How can this be done? What does that require?

Answer the question

In order to leave comments, you need to log in

7 answer(s)
L
lil.fxrrx, 2021-05-05
@mxrdxfxrrx

I have one question - how are you going to play a java (almost) game, .exe application in a BROWSER?
Did you mean "hosting"?

O
Orkhan, 2021-05-05
Hasanly @azerphoenix

Of course, I am not involved in game development, but in order to play in the browser you need the client part not in Java, but in JavaScript. And as a backend, you can take Java. So, just adapting the game will not work ... unless you rewrite it in JS. But if you have similar questions, then obviously your current level is not enough to do this...

M
MinTnt, 2021-05-05
@MinTnt

Directly - it is unlikely that something sensible will come out.
The maximum is to buy VDS for a certain amount of money and set it up like a playkey. So that later in the browser, select a certain session. And on the page itself, in the session cabinet, make a video broadcast from a dedicated server, and control buttons. But I'm guessing there will be a significant delay. Yes, and the costs will not pay off.

A
Alexander, 2021-05-06
@Aleksandr-JS-Developer

You need to write a copy of the game in js or port an existing one.
From some languages, for example, GO, you can translate the code into webasm and run it in the browser, it has a good speed.
An experienced team will have to dance hard with a tambourine for a couple of months in order to pull this off and the result will most likely not live up to expectations, because it’s okay with logic (algorithms), the main thing is rendering. For such rendering, the WebGL API will be needed. WebGL is, of course, better than just HTML svg, but it does not work in such a way that it is very fast.
In the end, it all comes down to performance. In the Web, this is a very real problem, and the Web is now taking leaps and bounds towards performance and making significant strides, but it cannot (and is unlikely to be able to) catch up with the same Java in terms of execution speed in the near future. If you're wondering why, I'll post it.
And you, by the way, with a probability of 99.99%, will have to abandon a large part of the functionality and use a rather old version of the game, and, of course, the graphics will have to be cut mercilessly and immediately. That is why 100% of new games are released on platforms and not on the web.

A
acwartz, 2021-05-06
@acwartz

It's simple - write a copy of the game client on WebAssembly & WebGL & WebSockets, and run it in the browser. You can, of course, use javascript to go, but alas, the performance will not be so hot, just like resource consumption. And yes, the usual modifications will also have to be completely rewritten for this tech. stack, essentially build into the new game client. on the github, there are a lot of options for implementing the minecraft client on the same openGL (which is native to minecraft, if anything) and C ++ instead of java. And think about the fact that the browser simply does not have normal access to the file system.

M
Mimocodil, 2021-05-06
@Ezekiel4

The easiest and cheapest (of all possible) options to do this is to write your own minecraft. As an example, I can give minecraft classic , which was made for the 10th anniversary of minecraft.

R
rPman, 2021-05-06
@rPman

Previously, it was possible, officially, through the java applet (look like it was discussed here what to slip and how)
Now this mode is disabled in browsers by default, as it is even more unreliable than flash (more problems than good)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question