As you all know, snapshot 12w18a has drastically improved the speed at which new features can be added to Minecraft. The singleplayer client is now essentially its own server and client.
Previously, there were three parts to Minecraft that would each have to be updated when a new feature was added. The server logic, the singleplayer client logic, and the multiplayer client logic. This made it easy for bugs to pop up when the client forgot to not perform tasks that the server should perform, such as splitting slimes and spawning mobs from spawners. (Remember those bugs?)
Now, there are only two parts to Minecraft: Server-Side logic, and Client-Side logic. The client only has to display everything and tell the server what it wants to do, and he server only has to do all the calculations and moving of mobs. This means that the same code will work for both singleplayer and multiplayer and there does not have to be any "oh I have to remember not to do this in multiplayer and instead listen to what the server tells me to do". Instead, it is more like "I just have to listen to what the server tells me to do and not have to remember anything else".
While this makes adding new features to Minecraft drastically easier (and will make it easier for mods to be multiplayer compatible), it introduces the world of chaos that is multiplayer, to singleplayer.
No longer can you truly pause the game. Entities now will behave as in multiplayer. other multiplayer problems are coming to singleplayer.
I am proposing yet another design change to fix all this. There needs to be a middle man, two different kinds of middle men, actually. One for when you are playing singleplayer, one for when you are playing multiplayer.
I propose GameLogic<->ClientLogic interfaces. Not java interfaces, the classes that interface with the client and server to allow the same behavior in bothsingleplayer and multiplayer.
Wait, what? Didn't I just say...but...huh?
Well,consider this: The client and server have to send and receive data across the internet with sockets when in multiplayer, but they only need to communicate directly when in singleplayer. This means that data has to be transferred in two very different ways.
With middle-men classes, the server and client could communicate with each other without caring if they were in multiplayer or singleplayer. Something like, class MiddleMan{}, class MPMan extends MiddleMan{}, class SPMan extends MiddleMan{}. MP- and SP-Man classes would handle Multiplayer data transfer and sigleplayer data transfer respectively.
The server logic classes can now communicate with an instance of a MiddleMan and then depending on which middle man class it is an instance of it would either directly relay the data to the client logic classes or send it across the internet. The same applies to the client logic classes and their instance of a middle man.
DISCLAIMER: I have never seen any of Minecraft's internal workings or code and I only understand things from gueswork on my part and facts I have read elsewhere. Eerything I stated above could be completely insane and irrelevant to how Minecraft works. Read at your own risk.
I thought when no one is on but you on your server, you could pause the game like singleplayer. But then again I'm not certian so i can't be against this.
It is not possible to pause the gameplay even if you are the only one on. I also don't believe that clicking singleplayer should enable multiplayer without making it an off-by-default-option...
Well we're going to have to see what new features and bug fixes are going to be out in 12w19a because this is only the first version of the client-server mix. That and they release snapshots every week even if the snapshot is buggy.
Rollback Post to RevisionRollBack
Arrival of Darkness, Darker yet recognizable textures.
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumPreviously, there were three parts to Minecraft that would each have to be updated when a new feature was added. The server logic, the singleplayer client logic, and the multiplayer client logic. This made it easy for bugs to pop up when the client forgot to not perform tasks that the server should perform, such as splitting slimes and spawning mobs from spawners. (Remember those bugs?)
Now, there are only two parts to Minecraft: Server-Side logic, and Client-Side logic. The client only has to display everything and tell the server what it wants to do, and he server only has to do all the calculations and moving of mobs. This means that the same code will work for both singleplayer and multiplayer and there does not have to be any "oh I have to remember not to do this in multiplayer and instead listen to what the server tells me to do". Instead, it is more like "I just have to listen to what the server tells me to do and not have to remember anything else".
While this makes adding new features to Minecraft drastically easier (and will make it easier for mods to be multiplayer compatible), it introduces the world of chaos that is multiplayer, to singleplayer.
No longer can you truly pause the game. Entities now will behave as in multiplayer. other multiplayer problems are coming to singleplayer.
I am proposing yet another design change to fix all this. There needs to be a middle man, two different kinds of middle men, actually. One for when you are playing singleplayer, one for when you are playing multiplayer.
I propose GameLogic<->ClientLogic interfaces. Not java interfaces, the classes that interface with the client and server to allow the same behavior in bothsingleplayer and multiplayer.
Wait, what? Didn't I just say...but...huh?
Well,consider this: The client and server have to send and receive data across the internet with sockets when in multiplayer, but they only need to communicate directly when in singleplayer. This means that data has to be transferred in two very different ways.
With middle-men classes, the server and client could communicate with each other without caring if they were in multiplayer or singleplayer. Something like, class MiddleMan{}, class MPMan extends MiddleMan{}, class SPMan extends MiddleMan{}. MP- and SP-Man classes would handle Multiplayer data transfer and sigleplayer data transfer respectively.
The server logic classes can now communicate with an instance of a MiddleMan and then depending on which middle man class it is an instance of it would either directly relay the data to the client logic classes or send it across the internet. The same applies to the client logic classes and their instance of a middle man.
DISCLAIMER: I have never seen any of Minecraft's internal workings or code and I only understand things from gueswork on my part and facts I have read elsewhere. Eerything I stated above could be completely insane and irrelevant to how Minecraft works. Read at your own risk.
http://tinyurl.com/LB-SSS
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumhttp://tinyurl.com/LB-SSS
-
View User Profile
-
View Posts
-
Send Message
Curse Premium