-
borka
- Posts: 9965
- Joined: Thu Feb 03, 2011 7:47 pm
- Location: World of Sprucecap
Re: Questions about Client implementation details
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
-
loftar
- Posts: 9093
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Questions about Client implementation details
A custom format, but a very simple one. Each resource file is just a list of the various parts (images/sound clips/textures/meshes/whatever) that make up a single resource. Look at the Resource class for the details (in particular, the load(InputStream) method decodes the container format); again, I don't think I can document it in text much shorter than the code does it.Dreadicon wrote:Only specific questions for now would be concerning the resource files; what finalized format are they in?
Some come bundled with the client in the accompanying Jar files, but when the client lacks one that it needs, it downloads it over HTTP when the server has given it the name of the resource.Dreadicon wrote:Where are they stored?
Also, I just kinda wanted to add how I don't hold this against you at all. The client code is, as a whole, by far my least favorite part of this whole deal, and that is very much because of Java. Though, to speak ill of Java while speaking well of C# seems a bit... odd to me.Dreadicon wrote:I have a bloodoath vendetta against Java [...] (No offense to users of these languages; I just really, really don't like to use them myself.)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
marvi
- Posts: 138
- Joined: Thu Feb 18, 2010 3:41 pm
Re: Questions about Client implementation details
It's a client for the old haven. As for hafen, there are .NET libraries that allow to work with resources and there is an outdated network protocol implementation (it wasn't updated to support floating point coordinates):borka wrote:https://github.com/k-t/SharpHaven
https://github.com/k-t/haven-dotnet
It might be a bit more convoluted than the original Java implementation since I tried to support both legacy and current protocol at once.
EDIT.
Well, not really. I guess you saw code for the legacy client. I gave up on it after hafen announcement. I actually tried to experiment with Unity afterwards (and figured out how to make basic UI: https://www.youtube.com/watch?v=1Iul5fWfyUE >_>) and I'd say the main challenge is how to dynamically load all resources and 3D stuff and render it close to how original Java client does it. I'm not that experienced with Unity though.Dreadicon wrote: Aha! Sweet! This should help a ton. I'm curious how much the overall server/client comms have changes since then. It looks like the main reason he gave up was the nitty-gritty of implementation; adding all the widgets and linking them up properly.
-
Dreadicon
- Posts: 13
- Joined: Fri May 02, 2014 2:37 am
Re: Questions about Client implementation details
Thanks! Just pointing me to the right place is a great help. I appreciate it! Honestly, only thing I could ask for is more commenting in the code, but it's not expressly necessary.loftar wrote:A custom format, but a very simple one. Each resource file is just a list of the various parts (images/sound clips/textures/meshes/whatever) that make up a single resource. Look at the Resource class for the details (in particular, the load(InputStream) method decodes the container format); again, I don't think I can document it in text much shorter than the code does it.
Ahhh, that clears things up a bit. It has a caching system so that it doesn't spam the server with requests, right? I'll re-implement that ofc if I do pull assets. Hopefully there's a hash/checksum/versioning I can have the client check once per day to verify that the assets are the latest available without re-pulling from the server.loftar wrote:Some come bundled with the client in the accompanying Jar files, but when the client lacks one that it needs, it downloads it over HTTP when the server has given it the name of the resource.
Hehe, I think we dislike Java for different reasons is why. You dislike it (I'm guessing) for the same reason my C++ programming friends do: It's a managed language and a counter-intuitive (to C++ and lower level programmers) combination of hands-on and hands-off when it comes to optimization. C# isn't much better from that point of view. But if one accepts that managed is OK, and that the level of hands-on management makes sense, then if you compare C# and Java, the former shines while the latter dulls to mud. C# has a more robust IDE, is possibly the most well documented language in existence, has very clear guidelines for style and format that make reading it easier between programmers, it's GC is tight and predictable, and users aren't CONSTANTLY fighting with their managed language VM between 5 versions and breaking changes (looking at you, Java7/8/9/x32/x64/web/desktop/global). Java, like PHP, also has a long history of very bad programmers building the most prominent applications for it (Minecraft, for example), and as such there is a lot of breaky, quirky bits of the language that continue to be supported and added to.loftar wrote:Though, to speak ill of Java while speaking well of C# seems a bit... odd to me.
TL;DR: I speak ill of it not because I disapprove of the kind of language it is, but because I dislike the implementation for it's class of programming language.
I see. Building the meshes should be dead easy. Unity allows you to construct meshes on the fly without much work, all considered (I've done this before). I haven't looked into their animation building or texture mapping manual operations though, so offhand I can't say for sure. But it should be possible, if not easy as well. Ultimately the best thing to do would be to write a converter into a common format that Unity can load at runtime, which would bypass all those concerns. If you happen to have that Unity project laying around, I'd love to have itmarvi wrote:I gave up on it after hafen announcement. I actually tried to experiment with Unity afterwards (and figured out how to make basic UI: https://www.youtube.com/watch?v=1Iul5fWfyUE >_>) and I'd say the main challenge is how to dynamically load all resources and 3D stuff and render it close to how original Java client does it. I'm not that experienced with Unity though.
So, that unity test was using your library to log in? That's great! Honestly I can handle picking apart the data given some time I think. Looks like from here a C# Unity Haven is just a matter of grunt work and time.
EDIT: PS, if anyone would like to work with me on this who also has C# experience, just let me know via PM. I'll get you into the messengers I use (Hangouts, Discord, Steam, or Skype) so we can talk more.
-
Paradoxs
- Posts: 294
- Joined: Tue Aug 25, 2015 7:16 am
Re: Questions about Client implementation details
After you see something it gets stored into your hafen.jar from what I can tell, it might be put into builtin.jar too, but I don't think so.Dreadicon wrote: Ahhh, that clears things up a bit. It has a caching system so that it doesn't spam the server with requests, right? I'll re-implement that ofc if I do pull assets. Hopefully there's a hash/checksum/versioning I can have the client check once per day to verify that the assets are the latest available without re-pulling from the server.
It appears that the resources also have a version tag, its used in a small check that
Code: Select all
if (this.ver == -1)
this.ver = ver;
else if (ver != this.ver)
throw (new LoadException("Wrong res version (" + ver + " != " + this.ver + ")", this));-
gigafunk
- Posts: 23
- Joined: Sat Apr 21, 2012 10:28 pm
Re: Questions about Client implementation details
A unity client would mean possible Vr
integration. Holy hell i could be in haven....
Ready, Player one?
Ready, Player one?
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Questions about Client implementation details
Why would unity be needed for it?gigafunk wrote:A unity client would mean possible Vrintegration. Holy hell i could be in haven....
Ready, Player one?
I think that anything is possible, server only tells you information about objects and so on.
How you present that to the user is your choice.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
Ysh
- Posts: 5953
- Joined: Sun Jan 31, 2010 4:43 am
- Location: Chatting some friends on forum
Re: Questions about Client implementation details
Right on!shubla wrote: I think that anything is possible.
I have become victory of very nice Jordan Coles Contest! Enjoy my winning submit here if it pleasures you.Kaios wrote:Spice Girls are integral to understanding Ysh's thought process when communicating, duly noted.
-
APXEOLOG
- Posts: 1300
- Joined: Fri Apr 23, 2010 7:58 am
- Location: Somewhere on Earth
Re: Questions about Client implementation details
I know a lot about protocol level, even have my own console client written from scratch. I'm a Java programmer and i don't want to spend time on C#, but i can answer some of your questions. You can reach me in skype (apxeolog) or discord (APXEOLOG#3742)Dreadicon wrote:PS, if anyone would like to work with me on this who also has C# experience, just let me know via PM. I'll get you into the messengers I use (Hangouts, Discord, Steam, or Skype) so we can talk more.
W10 Meme Plot | W9 Mantis Garden | W8 Core | W7 Ofir | W6 the City of Dis | W5 Vitterstad | W4 A.D. | W3 Mirniy
jorb wrote:All your characters will be deleted, and I will level every village any one of them were ever members of.