Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
Windrius
.. Everything for runescape is made 100% in java. Even the client.. Thats why it's a fail game >_>
The client is made in java, i have heard before that the official server stuff might actually be made with Visual Basic or C++. (runs 2000 players on each server no lag, lag isnt much where 1500+ players are all in one spot spamming what there selling either). Also there are some server emulation softwares for RS not made in java.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
xxbrentonxx
Apache webservers have been pracitcally the best and most used webservers until litespeed came around. Yes networking is simple, but its difficult to get it working smooth in java for a high number of connections without lag. (getting right amount of users on each thread) According to the page Apache MINA is known to perform as good as C/C++ servers, there are plenty of testimonials - some from companies making online games and projects involving lots of connections. (domain registrar EURid who run the .eu sales, they handled 700,000 sales in the first 4 hours)
Apache webservers were never the "best", they were just widely used. Read the code sometime, it's a nice idea but it's horribly implemented and the code is downright ugly (unless they've cleaned it up lately).
Networking is simple period. And load balancing users on individual threads is a horrible design, because there's no such thing as a "thread" -- if the "thread" responsible for N clients gets pre-empted by the OS while another thread in the process is executing, only the connections with an active thread progress, this also causes serious starvation issues with context switches on I/O. There are so many books and papers on doing this shit correctly, in fact the "perfect" server with current OS APIs is quite a small amount of code, albeit something you can only really achieve in C++ because Java doesn't give you a natural analog to the interrupt driven interfaces most modern OS's supply you for efficient networking now days (even though NIO's Selectable interface was recently ported to use an epoll implementation on linux systems, but this completely ruins the point of interrupt driven systems -- you still have to poll the damn selector, wtf?). Again, all of this is covered in the thread I linked, you should do yourself some good and READ.
"According to Apache" <-- so you take a company's word that their product performs as well as another technology? Welcome to benchmarks. NVIDIA could say "this card outperforms all ATI cards in all scenarios" and would you really go around telling people that? Not likely, you'd check benchmarks to see if it's actually true.
I can tell you that this statement is patently false, however. Good luck getting even 1% of the efficiency of true pointer-based buffer chaining in Java. That and the inlining of binary buffer manipulation and pointer driven operations that make turnaround on byte buffer operations almost 1-1 with ASM instructions. When your server is handling PERSISTENT ACTIVE connections with thousands of clients, these and quite a few others are the things that really determine "performance" -- and you simply can't do them in Java. There are ways to hack around the garbage collector to keep it from slowing your networking code WAY down, but then why the hell are you coding in Java if you're trying to eliminate the one feature that gives it any power?
Also, let's do a little math for you:
700,000 registrations in 4 hours. Continually speaking, this would be 48 registrations per second. Let's say, without referring to statistics or anything here, that they peak at 200 registrations in some given second.
As I said before, with that few connections, even some of the worst code you can write would easily handle the load.
Now, if it handled 700,000 registrations in 1 minute, I'd still not be impressed. Then you have to ask -- how many servers are you running and what hardware are they on? If you're running a 5 R900's, I'm thoroughly unimpressed as that's ~$150,000 in hardware. Instead, spend a few days writing better software and be able to process the same data on $5000 in hardware.
Re: JaveQ Open-source Java Emulator
Apache MINA is infact faster than normal Apache according to their benchmarks, now to be honest your arguing that a shittily written C++ emulator (im not saying yours is, but you are implying its better to use C++) would be better than any Java emulator.
Before i say this i just want to say i respect what you have done with SREmu, the old original aswell as the (originally part of esro) open source C++ SREmu and ofcourse your private emulator/framework if it is as good as you claim. I know that C++ is the best option for most programming tasks, i just disagree that it is the only option.
You believe that Aion-Emu is going to fail and java sucks. Aion-Emu's developers claim there code will be a lot better than the "badly written" code for L2j.
L2j can hold 1000 or more players, with a 2.4ghz quad core processor and 8gb of ddr2 ram. Imagine how much could be done with an i7 processor and ddr3 ram?
Then we come to the record of any game server emulation. I cant find it again, but it was done using RunUO - an emulator made in C#. It held a massive amount of players.
Also there are quite a few vb6 or vb.net emulators for WoW, i cant find much info on how much players they held as the WoW community bassically only cares about Ascent and Mangos.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
xxbrentonxx
Apache MINA is infact faster than normal Apache according to their benchmarks, now to be honest your arguing that a shittily written C++ emulator (im not saying yours is, but you are implying its better to use C++) would be better than any Java emulator.
Apache forks child processes and polls connections. MINA doesn't quite. It damn well better be faster than Apache's networking.
Quote:
Originally Posted by
xxbrentonxx
Before i say this i just want to say i respect what you have done with SREmu, the old original aswell as the (originally part of esro) open source C++ SREmu and ofcourse your private emulator/framework if it is as good as you claim. I know that C++ is the best option for most programming tasks, i just disagree that it is the only option.
It's not the only, but if you want it to be ultimately useful, Java is definitely NOT even remotely the best option. There are other languages (C# even) that I would choose before Java.
Quote:
Originally Posted by
xxbrentonxx
You believe that Aion-Emu is going to fail and java sucks. Aion-Emu's developers claim there code will be a lot better than the "badly written" code for L2j. L2j can hold 1000 or more players, with a 2.4ghz quad core processor and 8gb of ddr2 ram. Imagine how much could be done with an i7 processor and ddr3 ram?
It has already failed. It's so difficult to maintain and implement new features/packets in its "framework" that the developers have slowed to a standstill. They have less than 1% of the game's netcode "implemented" and even then, no data has been dumped from game files etc. Also, their code will never hold as much as L2j can hold, even if they do use better hardware. It's simply THAT BAD. (Read the code if you don't believe me)
Quote:
Originally Posted by
xxbrentonxx
Then we come to the record of any game server emulation. I cant find it again, but it was done using RunUO - an emulator made in C#. It held a massive amount of players.
This is because C# can actually implement a lot of the things you can't in Java to make things efficient. And you CAN write C# to interface with win32's IOCP directly and use it in the appropriate interrupt-driven fashion to create quite an efficient networking core. It's a lot better a choice than Java but it's still not as good as C++.
Quote:
Originally Posted by
xxbrentonxx
Also there are quite a few vb6 or vb.net emulators for WoW, i cant find much info on how much players they held as the WoW community bassically only cares about Ascent and Mangos.
Ascent is HORRIBLE. It's based on ACE and the kids I've seen coming from it are tainted for life and actually don't know much at all. MangOS has some things right, but a lot of things horribly wrong. I got more and more disgusted the further I read into its source code. On the surface, its networking code isn't half bad, it leaves a lot to be desired and it does have some potential exploits, but it's still a heavily bloated pile :(.
Re: JaveQ Open-source Java Emulator
sure I know this project will not necessarily succeed to a full release nor has any project so far to date as by the time they get to the game server coding they then realise the amount of work required.
William the starter of this project I must say is not fully experienced with silkroad development and has little understanding of it. So it will be a learning curve for him and maybe in the future he can recreate a more efficient source in (whatever) when he has a better understanding.
So jMerliN dont go insulting projects, we are all learners at some point, like you were probably to. Critism is good to a certain to extent, so just keep it at that.
Cant you get some temporary hosting with Brian? since he hosted the originally VB6 and the site I guess?
From what I know clrscrn pretty much did the structre and everything of the VB6 SREmu, then merlin and community contributed to functions.
Re: JaveQ Open-source Java Emulator
Ok jMerlin i suppose you have a point, i was unaware that you thought C# was better than Java. I remember reading before that Java was much better than C# for a server emulator, but now i think about it i read it on Aion-Emu - they also claimed there code was better than l2j. Even if this project doesnt end up holding much players, im sure plenty of people would like to host a server and in the end there will be like a 100 servers each with 5-200 people on them. (as runescape, wow, maplestory, lineage2 and most other games where there is a open source server software end up)
Additionally i didnt comment on Ascent or Mangos (both made in C++ btw), i was just saying the WoW community only cares about them. There are server emulators made in Java, C#, Vb.net, Vb6 and a whole lot of different languages; some are most likely very shit but im sure there are a few very good ones.
Also i have seen the start of a Maplestory AutoIT3 server (it failed, or died) and a login server for sro made in AutoIT3, this is pretty cool as a toy i suppose but everyone can agree that since AutoIT3 is very slow and has no support for threads (or even multible things happening at once) it is the worst language for making a private server in. There is worse languages im sure, but lets not get into them xD.
Anyway, i remember reading about some weird programming language called Euphoria or something like that atleast 6 years ago. I remember it claimed it was easier than BASIC but more powerfull than C++. Might have to look into those claims, because if they are true and it can do networking it would be perfect. I think those claims are bullshit but ima go look it up now hehe.
Re: JaveQ Open-source Java Emulator
jMerlin, hi, I'm William, the owner of this project as you already might know. I don't pretend this is the best perfomanced server out here, since it's a learning curve (either programming + silkroad).
So I was wondering, if I could have your MSN - I'd like to talk about a few things. If you agree, could you please PM it to me? Thanks; William.
Re: JaveQ Open-source Java Emulator
@William
Why don't you continue working on this SRO Emu by telatoro. Its based on java.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
mime
@William
Why don't you continue working on this
SRO Emu by
telatoro. Its based on java.
That emulator is quite shit, he has already seen it before.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
xxbrentonxx
That emulator is quite shit, he has already seen it before.
It's not shit. A long time ago I learnt alot from that emulator. :)
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
Windrius
It's not shit. A long time ago I learnt alot from that emulator. :)
Ok its not shit, but its not worth continuing. I spose you could compare it to vb6 sremu. If you know some Java (i presume you do if u learnt from that emulator) you should join this project.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
xxbrentonxx
Ok its not shit, but its not worth continuing. I spose you could compare it to vb6 sremu. If you know some Java (i presume you do if u learnt from that emulator) you should join this project.
"java is not worth continuing xD" :) I do know java and I hate it. I'm making a server in C# and that pwns all ur java's :)
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
Windrius
"java is not worth continuing xD" :) I do know java and I hate it. I'm making a server in C# and that pwns all ur java's :)
Last i heard you were working with Lyzerk. What he has released so far is not so great, unless he has done a complete rewrite im not sure it will be too succesful.
Re: JaveQ Open-source Java Emulator
Quote:
Originally Posted by
xxbrentonxx
Last i heard you were working with Lyzerk. What he has released so far is not so great, unless he has done a complete rewrite im not sure it will be too succesful.
He did rewrite his frameworks. He made 1 shitty release. He is taking a break from working cuz he has collage n shit xD
Re: JaveQ Open-source Java Emulator
Well i been checking your source, i dont know java but i kinda understand whats going on and i got to say that your taking the wrong way of coding even a basic emu, you guys are just packet copying and paste everything, like in http://my-trac.assembla.com/JaveQ/br...ketSender.java for example.
After the client login u just send every packet the server sends to the client, without even checking for the proper response or validating the data being sent to the server and also instead of just doing
181 packet.putShort((short) ((0x10 >> 8) | (0x10 << 8)));
182 packet.putShort((short) ((0x2001 >> 8) | (0x2001 << 8)));
183 packet.putShort((short) ((0x0000 >> 8) | (0x0000 << 8)));
184
185 packet.put((byte) 0x0D);
186 packet.put((byte) 0x00);
187 packet.put((byte) 0x47);
188 packet.put((byte) 0x61);
189 packet.put((byte) 0x74);
190 packet.put((byte) 0x65);
191 packet.put((byte) 0x77);
192 packet.put((byte) 0x61);
193 packet.put((byte) 0x79);
194 packet.put((byte) 0x53);
195 packet.put((byte) 0x65);
196 packet.put((byte) 0x72);
197 packet.put((byte) 0x76);
198 packet.put((byte) 0x65);
199 packet.put((byte) 0x72);
200 packet.put((byte) 0x00);
try to atleast understand the sro protocol bcz if you plan to do this in all the project u wont get far, one last thing if ur gonna continue flipping the bytes, better do a function that do it or add it to the packet class.