MCDTeam / Immersion

The Immersion Mod's Repository
2 stars 0 forks source link

Network handling & Multiplayer Support #16

Open realshaunoneill opened 9 years ago

realshaunoneill commented 9 years ago

I noticed there isn't a network handler so I'm just going to implement one of the basic wrappers.

As for multiplayer support, I had the idea that when a player goes to join a server, the server sends the client a packet deciding which features the client should load, I haven't really any idea how to go about doing that though ^

bcwadsworth commented 9 years ago

We are going to have to change how features, crafting, and the loader works, but I am down for it. I can write the changes if you can integrate them. On Dec 13, 2014 3:58 PM, "XeliteXirish" notifications@github.com wrote:

I noticed there isn't a network handler so I'm just going to implement one of the basic wrappers.

As for multiplayer support, I had the idea that when a player goes to join a server, the server sends the client a packet deciding which features the client should load, I haven't really any idea how to go about doing that though ^

— Reply to this email directly or view it on GitHub https://github.com/Mc-Immersion/Immersion/issues/16.

realshaunoneill commented 9 years ago

Ye that'd be great :) I think it'd be really good few servers to have control over it

bcwadsworth commented 9 years ago

For crafting, we are going to have to redo EVERYTHING including vanilla into a custom crafting handler, so at the same time, I am going to implement some basic config based crafting changes.

bcwadsworth commented 9 years ago

Why don't you finish your work on UTILS and NETWORK, then I will rewrite the Feature System

realshaunoneill commented 9 years ago

Just wondering, why would crafting need to be re-done? As for networking and utils, il finish then this evening

bcwadsworth commented 9 years ago

In order for per world or per server feature configs to work, all blocks have to be loaded, meaning the only way to stop access is to stop crafting and/or stop placement

realshaunoneill commented 9 years ago

Would it be possible to just manipulate the feature repo? And control how many are registered?

bcwadsworth commented 9 years ago
  1. In order to just manipulate the feature repo, we would basically have to stop the client from entering the server/world, change the configs accordingly, reboot (and reload minecraft) then hope that it works. All we can do with the repo is load more
  2. If we register everything (so nothing has to be shut down between world loadings) we have to be able to limit it
  3. Once blocks are registered, they are there. Taking/changing causes a crash (I think). Even if it doesn't, its a large hassle to sync when you are changing that configuration while in play.
  4. Therefore, the best way of control is through a stop crafting system. We would probably add a delete on place as well.

Benjamin Wadsworth

On Mon, Dec 15, 2014 at 9:36 AM, XeliteXirish notifications@github.com wrote:

Would it be possible to just manipulate the feature repo? And control how many are registered?

— Reply to this email directly or view it on GitHub https://github.com/Mc-Immersion/Immersion/issues/16#issuecomment-67022467 .

realshaunoneill commented 9 years ago

Okay Ye fair enough, it doesn't seem that hard tbh, (haha xD) should we just sent a packet with an array (possibly assign each feature an identifier?) that tells the client which to load?

bcwadsworth commented 9 years ago

Its more of a problem of loading before... we actually have to load the "objects" before we get onto the main menu

Benjamin Wadsworth

On Mon, Dec 15, 2014 at 3:52 PM, XeliteXirish notifications@github.com wrote:

Okay Ye fair enough, it doesn't seem that hard tbh, (haha xD) should we just sent a packet with an array (possibly assign each feature an identifier?) that tells the client which to load?

— Reply to this email directly or view it on GitHub https://github.com/Mc-Immersion/Immersion/issues/16#issuecomment-67081920 .

realshaunoneill commented 9 years ago

Would it be a better idea to just disallow clients with the wrong features to not connect to the server? Like the way minecraft does? And it returns a list of features needed.

bcwadsworth commented 9 years ago

I think one of the strengths of the system is the fact we don't need to reload, however, to limit ram/cpu usage, I will probably implement a text config override of loading.

Benjamin Wadsworth

realshaunoneill commented 9 years ago

I noticed there is a @NetworkCheckHandler that checks if both client side and server side mods are present, your able to modify it a bit. It documents that you can't do any extra managing - "NOTE: the server will not be setup at any point when this method is called. Do not try and interact with the server

But I was thinking, could you possibly do a InputStream or something to check if both of the configs are the same? I've never really done anything so its all new to me haha

bcwadsworth commented 9 years ago

What I was going to do is on a player join world event, the server sends a packet with per world configs. With my new filereader (see featureapi utils) all files will work as nbt tags we can send as network messages. The client is then responsible for making its crafting/ore dictionary compliant. On Dec 21, 2014 3:26 PM, "XeliteXirish" notifications@github.com wrote:

I noticed there is a @NetworkCheckHandler that checks if both client side and server side mods are present, your able to modify it a bit. It documents that you can't do any extra managing - "NOTE: the server will not be setup at any point when this method is called. Do not try and interact with the server

  • or the client in any way, except to accept or reject the list of mods."

But I was thinking, could you possibly do a InputStream or something to check if both of the configs are the same? I've never really done anything so its all new to me haha

— Reply to this email directly or view it on GitHub https://github.com/MCDTeam/Immersion/issues/16#issuecomment-67787665.

realshaunoneill commented 9 years ago

Oh I must look at that, just glanced at FeatureAPI haha Oh and I was just looking around, I noticed there's a few errors in your magic branch, want me to resolve them or are they just in-committed haha? Just it looks really cool xD

bcwadsworth commented 9 years ago

​I need to work slightly on magic until the mana system is complete, then I will turn it over (since you seem to be good at content)