[tut] making a simple client and making it connect to your server the simple way!
well I'm very bored and i decided to post this... oh and its my first tut (h)
superpose: to make a client and let it connect to your server.
Difficulty: 1/10 (very easy)
now you will need a base that is open source so i would go with something like soulscape or hellzend. or anything els that is open source (see downloads section)
the easy way: ok once you got the source open up client.java and press ctrl + H and type in the name of the client in the client in the find box and the name of your server in the replace with box.
and then press replace all and then compile it and run it. congratulation's! you own you very own client! (if the compiler says javac cannot be located just right click it and press edit and were it says javac place the location of javac. such as: C:/programs/java/jdk0.6.1/bin/javac java *.java and now your all finished!
the semi easy way: once you got the source open up client.java and press ctrl + f and type in the name of the client and press find... it will find it and replace that with the name you want, its the same as doing it in the top part... but wait there's an advantage! wile searching the name you might see other stuff that the login says or something and you can edit it now and not have to go back in to it later! thats a whole lot better....(c)
now we can edit it to were it will only connect to your server.. this is optional... open up client.java and search for -
and you should see...
Code:
if(super.aFrame_Sub1_15 != null)
return new URL("http://" + server + ":" + (80 + anInt958));
now erase the " + server + " and put your ip in its place.
it should look like this --
Code:
if(super.aFrame_Sub1_15 != null)
return new URL("http://your ip here:" + (80 + anInt958));
NOTICE! you must have the " mark not there to, so it should look exactly as above except with your ip in the your ip here place.
and now go and compile it make sure you have no errors.
now you can just connect to your server by just putting in your user and pass and pressing login. but to make it look better than ip address, you can go to client.java and search for ip address and erase it and put something like ip is already typed in. and compile and rune and enjoy your new client!
post any errors you get here!
this is 100% me. i made it my self :d
thank you. for any further tuts go to the tut section and find tons of tuts to make your client more advanced.