Jump to content

Recommended Posts

Posted

Why does we need a packet handler.

What does it do?

How can i use it?

How can a programming noob use it with understanding it?

Who can explain that?

I do not read the tutorial from Forgeforum.

Because it is me to much in a line.

Do this this this and your done.

I want to know what does happen when i do this and not that.

 

Posted

I'll check back to this thread after sleeping, but to give you the first answer on how to learn these things:

http://thenewboston.org/list.php?cat=31  - Small 5 min videos, each giving you some idea of a basic part of java.

 

<-- Free lectures from Stanford university on programming in Java(and c++ later inn cs106b which also is available for free, good place to learn programming)

 

In other words, the best place to start would be to spend some time on learning programming :)

 

In simple words a packet handler works like the post office, it reads the label of a packet and then does what it's told to do with packets of the given type.

And it sends packets to destinations you specify.  Thats the silly version of explaining it :P

 

The use for it is to keep the server and client synchronized so that the server and client agree on the current state of the game.

So when a player picks and object from the ground, the server gets a packet which tells it "Player X just picked up item Y". Then the server can do it's code to despawn the item on the ground and update it's records accordingly. If you didnt send a packet to the server, another player could potentially pick up the same item which would be a weird bug :P

 

PS: "I want to know what does happen when i do this and not that." <--- Great attitude! Seek to know why and not just what to type ;)

If you guys dont get it.. then well ya.. try harder...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.