Clientside Vs Serverside

View previous topic View next topic Go down

Clientside Vs Serverside

Post  Kiada on Tue Oct 19, 2010 2:49 am

Hey people, great job on the forums and the collab spreadsheet. Really useful resources.

I was kind of hoping someone with a bit of knowledge of the source code could explain a little bit about how the clientside and serverside source codes interact / what each of them basically do? I'm a little confused as to how modifying the clientside source code (i.e, the hover-boat) can work in SMP aswell? I do have a specific section of the code in mind when I write this, but first I'd be interested to see if anyone has an overeaching basic knowledge on the topic (if anybody knows the source code in that kind of depth at all really).

Basically, as it stands (and with regards to SMP) which part of the gaming experience does the client control, and which part does the server?

How do these interact?

Thanks

Kiada

Posts : 2
Join date : 2010-10-18

View user profile

Back to top Go down

Re: Clientside Vs Serverside

Post  Tei on Tue Oct 19, 2010 12:40 pm

This is probably a question for the Server community, the people of mccoalition. But I will try to add my 2 cents.

If Minecraft is something like most other games, the server generate "frames" (or you can say updates), and push these updates to all clients.
The client use that information to "rebuild" and "mantain" a copy of the data of the world (but probably one remenber 1 chunk, or a few ones), and the status of players around him.
Wen the client do stuff like rotating, or destroying a block, information about this is send to the server, so the server can update the status of that block (or not) or the angle of the entity that represent the player... that in the next frame will be broadcast to all other players near him.

It seems that a lot of the "phisics" of the player runs clientside, so is posible that the server receive a "order" to remove a adminium block, or move the server so some location in the space (flyiing) ... and if theres not sanity check, the server will "obey" (trusth) the client. Since the game is not a competitive one, this is not a problem, or has not ben a huge problem now. This also help lag, since lag only affect removing blocks, but walking around and the like is lag free.

You can read the "alpha protocol" to figure out what type of messages send the clients and server.

Thats my take about this thing, anyway, I don't honestly have real data about how it really work.

Tei
Admin

Posts : 32
Join date : 2010-10-15

View user profile http://mcdocs.team-talk.net

Back to top Go down

Re: Clientside Vs Serverside

Post  omniux on Fri Oct 22, 2010 3:33 am

Just some basics I'm throwing in for the heck of it..

Actions such as a block being destroyed has both server-side and client-side aspects.

When talking about the server-side aspect, you will find controls to authenticate an action. So, you attempt to break a block. The server receives your request and checks to see if your player ID has permission to destroy blocks, later moving onto checking if you can destroy the current block you requested. If validated, the server has to handle editing the current state of that square so it can become 'empty', also possibly saving or rewriting the data location storing that information. After the state change, the server has to send the clients that position's new state so everyone can see it's empty.

On the client-sided aspect, you will have controls related to displaying and controls for you as a player. So, the key press needed to be held to request the block's state to be changed so you can destroy it. Showing the updated block become empty after the server updates it's state. More importantly though, what a block looks like for you. Notice I am sticking to the client itself when I say 'looks like for you'. Editing the client can enable you to see a block any which way you want. But, if another player is using an unedited client, they will not see that change.

This is a very general bit of information. Going deeper into Minecraft will help you determine if the server or the client is handling something. It could be different for some things, and it also can change as this game is updated. If you take anything from this, I hope it's the ability to easily figure out what should be edited, the server or the client.

Wooo, good luck~ ^^
avatar
omniux

Posts : 2
Join date : 2010-10-22
Age : 27

View user profile http://backtraced.net/

Back to top Go down

Re: Clientside Vs Serverside

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum