Is this still a current client path, with the new client implemented?
**Edit: nm found a way to fetch it from my phone
-
kirion
- Posts: 378
- Joined: Sat Jul 31, 2010 11:45 pm
Re: Client source code
Would someone please explain how to setup a project using NetBeans or Eclipse, step by step? I'm unfamiliar with java's IDEs, even more on how to import from Git...
-
TheMephProject
- Posts: 32
- Joined: Fri Mar 27, 2015 9:36 pm
Re: Client source code
recoment seaching Youtube or google ...kirion wrote:Would someone please explain how to setup a project using NetBeans or Eclipse, step by step? I'm unfamiliar with java's IDEs, even more on how to import from Git...
-
Händler
- Posts: 108
- Joined: Thu Aug 29, 2013 12:39 am
Re: Client source code
Got the client.
Made a build with ant.
Ran client with
Successfully connects to the server.
Can login to my account, move around, use UI and everything with a new character (fairy orb 3D model).
But once the game tries to load my human character model, game freezes.
Is this client the vanilla client ready to go and ready to get extra modification or does it require some extra setup to run the vanilla version? Do I need to fetch the gfx resources like for the characters from the server and unpack them into a jar or something?
Made a build with ant.
Ran client with
Code: Select all
javaw -Xss1024k -Xms512m -Xmx1024m -jar hafen.jar -U http://game.havenandhearth.com/hres/ game.havenandhearth.comCan login to my account, move around, use UI and everything with a new character (fairy orb 3D model).
But once the game tries to load my human character model, game freezes.
Is this client the vanilla client ready to go and ready to get extra modification or does it require some extra setup to run the vanilla version? Do I need to fetch the gfx resources like for the characters from the server and unpack them into a jar or something?
-
Ysh
- Posts: 5953
- Joined: Sun Jan 31, 2010 4:43 am
- Location: Chatting some friends on forum
Re: Client source code
I must add properties from autohaven launcher to use vanilla client from repo. Some thing like this in MainFrame.java:Händler wrote:Got the client.
Made a build with ant.
Ran client withSuccessfully connects to the server.Code: Select all
javaw -Xss1024k -Xms512m -Xmx1024m -jar hafen.jar -U http://game.havenandhearth.com/hres/ game.havenandhearth.com
Can login to my account, move around, use UI and everything with a new character (fairy orb 3D model).
But once the game tries to load my human character model, game freezes.
Is this client the vanilla client ready to go and ready to get extra modification or does it require some extra setup to run the vanilla version? Do I need to fetch the gfx resources like for the characters from the server and unpack them into a jar or something?
Code: Select all
private static void main2(String[] args) {
// https://game.havenandhearth.com/java/hafen.hl
System.setProperty("haven.errorurl", "http://game.havenandhearth.com/java/error");
System.setProperty("haven.defserv", "game.havenandhearth.com");
System.setProperty("haven.resurl", "https://game.havenandhearth.com/res/");
System.setProperty("haven.screenurl", "http://game.havenandhearth.com/mt/ss");
System.setProperty("haven.cachebase", "http://game.havenandhearth.com/render/");
System.setProperty("haven.mapbase", "http://game.havenandhearth.com/java/");
System.setProperty("haven.fullscreen", "off");
System.setProperty("haven.sun.java2d.uiScale.enabled", "false");
Config.cmdline(args);
...Kaios wrote:Spice Girls are integral to understanding Ysh's thought process when communicating, duly noted.
I have become victory of very nice Jordan Coles Contest! Enjoy my winning submit here if it pleasures you.
-
loftar
- Posts: 9092
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: Client source code
Not sure if that's your only problem, but that's the URL for the pre-render resources. The new one is just res instead of hres.Händler wrote:-U http://game.havenandhearth.com/hres/
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
kmarad
- Posts: 150
- Joined: Mon Jan 06, 2020 7:46 pm
Re: Client source code
I'm coding a client in python, and I have a little question about Hafen code :
OCache.java seems to get the "Delta" messages, and updates the client accordingly.
There is a lot of types of "delta" messages, and I don't really need all of them.
Especially for a beginning. I'd like to just get gobs, their movement, and their removal.
But since those messages are all packed in a bigger one, It looks like I must treat every single one to be sure to get those that I need.
Is that right or is there a lovely work-around ?
OCache.java seems to get the "Delta" messages, and updates the client accordingly.
There is a lot of types of "delta" messages, and I don't really need all of them.
Especially for a beginning. I'd like to just get gobs, their movement, and their removal.
But since those messages are all packed in a bigger one, It looks like I must treat every single one to be sure to get those that I need.
Is that right or is there a lovely work-around ?
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Client source code
Well you don't have to simulate them all, you can just read enough to ignore them. Literally copy paste code from OCache.java, maybe 1 hour of work.kmarad wrote:I'm coding a client in python, and I have a little question about Hafen code :
OCache.java seems to get the "Delta" messages, and updates the client accordingly.
There is a lot of types of "delta" messages, and I don't really need all of them.
Especially for a beginning. I'd like to just get gobs, their movement, and their removal.
But since those messages are all packed in a bigger one, It looks like I must treat every single one to be sure to get those that I need.
Is that right or is there a lovely work-around ?

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
-
kmarad
- Posts: 150
- Joined: Mon Jan 06, 2020 7:46 pm
Re: Client source code
Haha, I'd gladly watch anyone translate OCache.java to it's python equivalent in an hour.shubla wrote:Well you don't have to simulate them all, you can just read enough to ignore them. Literally copy paste code from OCache.java, maybe 1 hour of work.
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Client source code
Well you should of course implement Message.java first, because its quite core part of communication, and helpful as then you can just use same function names to read the messages.kmarad wrote:Haha, I'd gladly watch anyone translate OCache.java to it's python equivalent in an hour.shubla wrote:Well you don't have to simulate them all, you can just read enough to ignore them. Literally copy paste code from OCache.java, maybe 1 hour of work.
After that OCache is just copy pasting, even in python, because there is almost no difference to how you would do them in python or any other object oriented capable language really.
You should also notice that most things in OCache consist of two functions. 1 Function that parses the message that server sent, and another that processes that information. You can only implement the first kind of function which parses the messages that server sends.
For example you won't have to do public static void overlay(Gob g, int olid, boolean prs, Indir<Resource> resid, Message sdt) {, It sufficies to do public Delta overlay(Message msg) {, which is maybe 3 or 4 rows in python, if you ignore all the data.
Look at this example:
IN java
Code: Select all
public Delta overlay(Message msg) {
int olidf = msg.int32();
boolean prs = (olidf & 1) != 0;
int olid = olidf >>> 1;
int resid = msg.uint16();
Indir<Resource> res;
Message sdt;
if(resid == 65535) {
res = null;
sdt = Message.nil;
} else {
if((resid & 0x8000) != 0) {
resid &= ~0x8000;
sdt = new MessageBuf(msg.bytes(msg.uint8()));
} else {
sdt = Message.nil;
}
res = getres(resid);
}
return(gob -> overlay(gob, olid, prs, res, sdt));
}Code: Select all
def overlay(gob, msg):
olid = msg.getint32()
resid = msg.getuint16()
if resid == 65535:
pass
else:
if (resid & 0x8000) != 0:
Message().addBytes(msg.getBytes(msg.getuint8()))
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