Poll: Should Cuberite implement protocol code in lua?
You do not have permission to vote in this poll.
Yes, using that guy’s code
0%
0 0%
Yes, using C++ raknet code with lua bindings
0%
0 0%
Yes, using luasocket and implementing raknet from scratch
0%
0 0%
Yes, using any
14.29%
1 14.29%
I don’t care
42.86%
3 42.86%
No, What have you been smoking?
42.86%
3 42.86%
Other
0%
0 0%
Total 7 vote(s) 100%
* You voted for this item. [Show Results]

Reimplement Minecraft Java and implement Minecraft PE protocol with luaJIT
#1
Rainbow 
Today I was chatting with @Mathias on Matrix/IRC about the current Minecraft situation and I had the following idea: what if protocol code used lua? 
I have been playing with GroupButler, a lua telegram bot, and learning about openresty and non-blocking i/o libraries, like pgmoon.

The funny thing its, most of these libraries are written in lua, and since openresty uses luaJIT, there are situations where lua code outperforms C code: https://www.cryptobells.com/resty-core-t...the-jit-y/

Ok, so that could work on cuberite too, right? right??? ?

Reimplementing Minecraft Java protocol in lua should make it straight forward to support multiple (all?) protocol versions without problems that sometimes occur currently when cuberite is updated to support a newer protocol. Although this issue is not related to C++, decoupling game logic from protocol is what would fix that. Bonus: making forge mods or other protocol changing plugins would be as easy as building a Cuberite plugin. ? 
For Java, LuaSocket TCP should be enough.

Minecraft PE on the other hand can be implemented in a number of ways: using this guy’s lua code https://github.com/pabloko/Lua-JIT-RakNet, using actual C++ raknet code and creating lua bindings, reimplementing raknet purely in luaJIT, etc.
For the protocol, our friends at MiNET have us covered: “As part of the project, I also deliver an up-to-date automatically generated MCPE Protocol Specification.” 

Bonus: Cuberite would become a “generic voxel game server”, meaning it could allow for crossplaying not only minecraft java and pe but also minetest and whatever comes next.

Yeah, I know. Currently protocol and logic and tightly coupled so I would suggest doing this in the following order:
  • Implement Pocket Edition protocol, by creating lua bindings and de-coupling protocol code as needed;
  • Reimplement Java Edition protocol, probably more difficult to do than PE, since Java has more features et al.
Both may be done on master, just need to have the option to turn on/off these features somewhere.

So, what do you guys think? Doable or suicidal?
Reply
Thanks given by:


Messages In This Thread
Reimplement Minecraft Java and implement Minecraft PE protocol with luaJIT - by yangm97 - 06-17-2017, 03:21 PM



Users browsing this thread: 2 Guest(s)