Atomicscottsman wrote:So i have a basic understand of java, and a very basic understanding of game design in java. I was just wondering about something dealing with coordinates: since the client has to consistently keep the players x and y(that way the client knows where you are compared to the server), why can't a custom client simply take that info and display it?
Is it because the client acts like a window to the server, and never sees the x,y, or something to do with how the client and the server talk?
Thanks for any info, and sorry if this has been answered somewhere, i searched enders client post but saw nothing.
Coordinates of objects are stored in
https://github.com/dolda2000/haven-clie ... n/Gob.java . You can get them via gobvar.getc() where gobvar is some Gob class variable.
As mvgulik mentioned, these are randomized every time you log in, change maps, and teleport. It used to be non-randomized and people had clients to do live-tracking of all their users, but that's pretty much impossible now unless you took the time to do some custom mapping stuff so it would keep an updated map based on every minimap you get and try to match you exactly to where it expects you to be on the world map.
Atomicscottsman wrote:borka wrote:http://www.havenandhearth.com/forum/viewtopic.php?f=7&t=29915&p=386460&hilit=server+programming+language#p386460
Why is that? Do they prefer C over java, or does C allow more?
Sorry for all the questions.
I'm sure loftar has his reasons, but a few that come to my mind are:
1) In C you're not very restricted as far as what you can do with your data (ie: pointers, etc). Onto that there also might be tricks he can do in C that are needed that can't be done in Java
2) No garbage collection, all the memory is manually managed and he can manage it in a way that it won't cause delays or time issues during critical sections where you need to get the operations done quickly and a gc run during that could ruin that.