[Java] Possible Emulator?
It's simple discussion for now, but what do most of you think of an emulator in the Java language, opposed to the typical VC++/C++/LUA standpoint? I've been doing some research on the opposition between the two languages (10 Reasons Java has Supplanted C++) and can safely say that Java has some very powerful advantages over the C++ programming syntax.
I've got background in Java, and before I start learning C++, I figured I should throw this out here and see who has some valuable opinions concerning it. Don't post unless you have reasonable knowledge on the way FlyFF works, or valuable information.
Stay on-topic too!
Re: [Java] Possible Emulator?
I'm a certified Java programmer, and I hate it. The memory management is awful, you have no real control, and so many more downsides. This wouldn't be something I would contribute my time too. However I would contribute a ton of time to a C# emulator.
I'm a lazy programmer so GC definitely sounds appealing, C# has this too.
Build time in C++ is only bad when you're modifying the headers. The build time isn't so much important though as long as it's staying under 10 minutes and you aren't having to constantly build it.
Java has simplistic syntax, yes however C#'s syntax is even more simple.
Java's cross compatibility is a funny thing, it's only cross compatible if Java is up to date. How many of us see Java updates and click "Remind me later"? C# also has cross compatibility in the same fashion.
I honestly hate the way Java code is packaged and find the DLL system much nicer. Also, when using a graphics library combined with Java, which you will be, you still have to deal with the native DLL's.
Reflection is very useful, C# also has this.
Uh.. performance.. Yeah.. Memory management is horrid.. Just not even worth speaking about.
Pointers can be extremely useful, I don't see why they would be a problem or not be an advantage. It's better to have control and not use it than to not have control. Not having things is the Java standard I suppose. Did you know that Java doesn't support unsigned types? James Gosling did not implement them because apparently the concept is difficult to understand for programmers. So, if you want to use an unsigned type in Java, you must store it in a bigger type and than cast it to the smaller version. E.g. (int)LongVal What if you wanted an unsigned long T_T? Doesn't make things simpler at all. C# on the other hand has pointers if you specify unsafe.
This is just my opinion but this would most likely accumulate much more interest if it was done in .Net.
[Java] Possible Emulator?
Interesting OO. I must say, your points are justifiable. C-Sharp may be the superior alternative to my idea, although I'm not very good with it, so the creation of an entire emulator would be relatively difficult.
I'll think things through, and accept any more criticism people can offer.
Re: [Java] Possible Emulator?
What OO said, security flaws, and oracle's slow response to the same. If there would be any need to create an emulator, I'd say C# would be the most viable alternative unless you would require cross-platform compability.
Re: [Java] Possible Emulator?
Quote:
Originally Posted by
FilixXx
What OO said, security flaws, and oracle's slow response to the same. If there would be any need to create an emulator, I'd say C# would be the most viable alternative unless you would require cross-platform compability.
Mono + OpenGL
Re: [Java] Possible Emulator?
Quote:
Originally Posted by
ObjectOriented
Mono + OpenGL
Why would you use OpenGL? Just use a console window.
But mono would be cool. I read that using mono on linux can provide better speed than .net on windows, due to it's optimization. This also means no MSSQL, but I'm sure any emu would use mysql anyways.
Re: [Java] Possible Emulator?
"cross-platform compability." Ops, sorry I was under the impression the client would be emulated as well.
Re: [Java] Possible Emulator?
Quote:
Originally Posted by
ObjectOriented
"cross-platform compability."
implying that console windows are not cross-platform, of course
Re: [Java] Possible Emulator?
.. read the edit I made to my post above.
Re: [Java] Possible Emulator?
Quote:
Originally Posted by
ObjectOriented
.. read the edit I made to my post above.
I posted before the edit was there, I promise.
And yes, you're right about the client. I assumed that the server might be made cross-platform so that a linux host could be used. There are not enough people that use linux and play flyff enough to ever justify the conversion of the client to use openGL, though.
Re: [Java] Possible Emulator?
I wouldn't recommend a Linux host to be honest, windows is just far more solid for hosting. Also, with Mono you can still use MSSQL however I hate working with MSSQL ;s. I don't know, some people might like FlyFF on Linux, there's another thread in the general section about someone running it with wine or something.
Re: [Java] Possible Emulator?
Quote:
Originally Posted by
ObjectOriented
I wouldn't recommend a Linux host to be honest, windows is just far more solid for hosting. Also, with Mono you can still use MSSQL however I hate working with MSSQL ;s. I don't know, some people might like FlyFF on Linux, there's another thread in the general section about someone running it with wine or something.
I don't know, I always thought of linux being more stable for hosting servers, just because like, that's what everyone uses (for web servers, at least). Maybe that's not the case for other servers, such as game servers, but I don't really see why not.
Also, MSSQL can not run on linux, but you can still remote connect if that's what you meant. That would defeat the purpose of hosting on linux, though, unless you want to host on two computers for some reason, which wouldn't be too good if they were on separate networks. You can't use mono for MSSQL though because all you have is the exe, not the source. But yeah, like you said, it'd be best to avoid it.
As for the client on linux, it was all glitchy and unplayable in that thread, it just emulated DX or something else really, really slow. My point was that there's really not enough people that want to have flyff to play on their linux machine. But doing it for mac, on the other hand, might be a good reason.
Re: [Java] Possible Emulator?
Quote:
You can't use mono for MSSQL though because all you have is the exe, not the source.
What do you mean? Running MSSQL itself on Linux? Yes that is impossible. I was more talking about using a local network connection to MSSQL running on a windows server. Mono does indeed have a MSSQL connector though: SQLClient - Mono
My point in bringing up that other thread is, someone was interested in doing it. There's not a good market for FlyFF on Linux because of the fact that FlyFF really doesn't run on Linux. You'd be surprised how popular distributions like Ubuntu are getting, hell I prefer Ubuntu over Mountain Lion. Depending on what I'm doing I sometimes even prefer it over Windows. But anyway, I was just more or less mentioning the technology to get an emulated FlyFF client running on Linux is available and it's something that could be done.
As for hosting, I've always found IIS more reliable than any other web server. Mootie did an excellent job of explaining why Windows is more stable for hosting but I can't seem to find the post. If I find it I'll edit this and paste the link. The biggest issue in my opinion though is Windows tends to be more secure than Linux.
Re: [Java] Possible Emulator?
What do you mean? Running MSSQL itself on Linux? Yes that is impossible. I was more talking about using a local network connection to MSSQL running on a windows server.
Yeah I figured that's what you meant. I was just pointing out the ridiculousness of having a linux server, and another local windows server just for the purpose of using MSSQL, but I digress.
My point in bringing up that other thread is, someone was interested in doing it. There's not a good market for FlyFF on Linux because of the fact that FlyFF really doesn't run on Linux.
Yes, I'm aware. That's why I was saying that making a port would benefit very few people. Because it doesn't run on linux,people that have linux don't play/know the game. We have the same understanding for this, it's no issue.
You'd be surprised how popular distributions like Ubuntu are getting, hell I prefer Ubuntu over Mountain Lion. Depending on what I'm doing I sometimes even prefer it over Windows. But anyway, I was just more or less mentioning the technology to get an emulated FlyFF client running on Linux is available and it's something that could be done.
I know that they are popular, and I'm familiar with it. But the fact of the matter is that linux will never have DX, and people that want to play games will almost always choose windows until OpenGL surpasses DX (which I do want to happen very much) (or dual-boot, using windows for games)
As for hosting, I've always found IIS more reliable than any other web server. Mootie did an excellent job of explaining why Windows is more stable for hosting but I can't seem to find the post. If I find it I'll edit this and paste the link. The biggest issue in my opinion though is Windows tends to be more secure than Linux.
I guess I'd like to hear this reasoning, seeing that very few of the highest-traffic websites run anything other than unix/linux servers. I'm open to new information but I don't expect it to have any hard evidence that windows > linux for hosting. But again, I digress. This is supposed to be about emulators.
~~~~~~~~~~~~~~~
At the end of the day, it's a DX game. Even if there was a performance jump in making the servers compile-able in linux, it's hardly worth the effort. IMO.
Personally, I'd just like the current official servers to be stripped down and re-coded to the point that they're hardly recognizable, but better then they are now. But I guess that looking at the official source for guidance and building an emulator from the ground up would be just as nice.
I just really don't see how anyone would have the motivation to do any of this when the offi source, as it exists now, is good 'nuff to just build off of without many complications.
I'll keep the replies short and sweet after this, I just wanted to address everything.
Re: [Java] Possible Emulator?
Java is probably a good language to begin with, and no doubt it could be the base for a simple test flyff server.
But you'll most likely run into fair bit amount of problems with flyff specially due to that java does not have 64 bit unsigned integers.
There are quite a few values that the client and server must calculate with 64 bit unsigned integers. One is awakening.
While it would be good learning, and a fun project. If you're really serious about making an emulator, at least up to the point of when you can spawn in-game, then java is not the best choice (or the right choice at all depending on java's capabilities).
I have not coded java long enough to know if there are any actual workarounds for 64 bit unsigned integers and bit manipulating though.
C# would the second best choice if put in comparison to Java as they have similarities in code, as long as you discard the differences of things like camel case and placement of braces.
If the choice goes towards C#, then there are quite a few emulators already started. They provide a good knowledge beginner base for how an emulator could be structured. Obviously you shouldn't base the emulator on any of them, learn from them and create new code instead. As that is the whole reason for making an emulator in the first place.