Porting Pokémon Online to Java

Discussion in 'Development General' started by Zzyzx Road, Apr 8, 2014.

  1. Zzyzx Road

    Zzyzx Road Member

    Joined:
    Feb 16, 2012
    Messages:
    572
    Likes Received:
    2
    PO Trainer Name:
    Zzyzx Road
    Hello,

    I've been wondering if a Pokémon Online Java version would be a good way to unify the three versions of PO. I was thinking about it for a few reasons:

    • Coder availability: Sure, C++ is just about as widely used as Java, but a lot of newer programmers start with Java -- or higher-level languages, for the web or gaming for example -- and C++ is hard to get going for these new programmers. PO isn't going to be supported by the old guys forever -- and the more people, the more ideas, the more discussion and bug digging.
    • Unifying the three platforms PO is available on: This is not a big problem -- and wouldn't be 100% solved since Java performance is inferior to binary -- but it would save a lot of compilation time, bug tracking time in different platforms (most problems would be universal) and minority complaints (hey, OSX and Linux users!).
    • Repositories: Note this has nothing to do with Java in particular and could even fit a separate suggestion. A fully OOP language would make it easier to modularize code, keep a remote binary repository (thanks to #2) that updates only specific parts of the code, and all these things we know are good about repositores (for end user and developer alike).
    • User bug-tracking: Self-explanatory. More users of a single version, more bugs found and killed. Not a big deal since over 90% of PO's user base -- as 90% of the internet -- uses Windows, but still. There's me.
    • Qt is ugly. Sure, it's cool and a step forward on unifying the systems (I bet it was chosen because it pairs "decently" with Windows, Linux and MacOS), but it doesn't fit either of them 100%. Gtk+ looks better on most Linux DEs, and Windows has had Visual Studio for a while. Java just looks like Java. Or you can use Qt Jambi.
    These are just a few. I'm not a great C++ programmer, but I have a little experience with Java and I'm looking up to gather more. And seeing these advantages, I would happily rewrite PO in Java with some help from whoever wants to help.

    What do you think?
     
  2. Withoutatrace

    Withoutatrace im a filthy weeb

    Joined:
    Jun 11, 2013
    Messages:
    563
    Likes Received:
    370
    PO Trainer Name:
    Withoutatrace
    I honestly wouldn't mind this, I started out with learning Java and branching off into C++, C, etc from there.
    Although, there are thousands lines of code you'd have to be changing to Java to make this change.

    It's essentially a bitch to do.
    Of course Coyo could elaborate more onto possible changes and what could come from them, being that he coded a good majority and it's his product, but that's my very short 2 cents.
     
  3. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Qt java can't "unify" the three versions.

    First, the android client' gui will have nothing to do with the computer java's gui. There's also plenty of android-specific code in the android-client. Second, the webclient *cannot* be done in java. Java is disabled on recent browsers because of the plethora of security vulnerabilities it entails. And no web coder does anything good on the web in java anymore, everything is done in javascript nowadays (or the like).

    Coder availability is a good point, but meh. Java is ugly, C# looks like java a bit but doesn't force you to create a class for everything, and Qt takes many java concepts, the good ones.

    Repositories? I don't understand what you mean. Why would you want to update only specific things on the client?

    Qt's ugliness: well it can be fixed. Qt's style can be set to gtk+ on linux, and the css in general can be improved. Java is more ugly than Qt, too.

    Though, I welcome the thought, and if you want to work on PO Java you can try to improve the android version =).

    I'm not sure of the fate of the computer version to be honest, once the android and the web version are good.
     
    Last edited: Apr 8, 2014
  4. Zzyzx Road

    Zzyzx Road Member

    Joined:
    Feb 16, 2012
    Messages:
    572
    Likes Received:
    2
    PO Trainer Name:
    Zzyzx Road
    You can execute JavaScript from Java natively (with no need for third-party libs). I've found different opinions about MS TypeScript on Java, but it's clearly possible to implement, compile, and run without issues, if the problem here is code rewriting.

    OK, I lost this one. But still, the point in using Java in their stead is being portable.

    I think there's something like that going on already with the autoupdate feature. But classes being clearly separate (and everything being classes) allows users to replace a glitched version of a specific feature without updating the whole software. Think Linux repositories: PO (distro) has a problem in Wifi Battle Team Picker (utility/application). We fix WifiTeam.class (fix broken utility/application). Users can download the new version without having to update PO entirely (doing a dist-upgrade). The main difference here is killing system-specific bugs (just Linux, or just Mac, or just Windows).

    Not JavaFX. It's completely CSS-styled, just like Qt. I'm no Qt expert, but I believe they're pretty similar in that. But I agree, if you're talking about Swing apps, they're hell ugly.

    All right =] I'll try and see if I can help with it too, but it sucks I have no Android phone to test on (don't say emulate, it's slow as shit until I get a new core).

    And I personally like desktop PO :c
     
  5. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Yea, the only reason I bought another android phone (and I hate it, with all those apps I can't uninstall and that have permissions to everything) instead of a windows phone is because of PO Android :(
     
  6. TheUnknownOne

    TheUnknownOne Member

    Joined:
    Mar 28, 2011
    Messages:
    988
    Likes Received:
    3
    There's https://github.com/rogerwang/node-webkit, it uses CEF (Chromium Embedded Framework) and Node.js, and runs on Windows, Mac, and Linux. The benefit is that a large portion of the code and even UI can be used in the web client, plus there's even support for cross platform <audio> and canvas (2D and WebGL), and because it uses node (for its APIs such as file system access and sockets), you can include any third party module (npm).

    Android support is supposedly in the making as well, see https://github.com/rogerwang/node-webkit/issues/94
     
  7. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    I'll have to look at it, definitely. After the current webclient is done.
     
  8. SongSing

    SongSing KILLL

    Joined:
    Jan 2, 2013
    Messages:
    641
    Likes Received:
    191
    PO Trainer Name:
    SongSing
    i would like to see a rewrite of po, java or not, since alot of the foundation is odd
    but since everyones moving to webclients i doubt that could happen :<
     
  9. Deity

    Deity Designer

    Joined:
    Dec 9, 2010
    Messages:
    195
    Likes Received:
    18
    I like this idea, as far as the UI goes, PO sim definitely needs work, and using webkit would be the best way to solve that. Among other things it would greatly increase what theme designers could do as well. Just throwing my opinion in there. :3
     
  10. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Agreed on that Java tends to be more ugly than Qt when default widgets are used.

    @coyotte508 Windows Phone version would be super cool, but the OS is very limited when it comes to keep background networking running when you switch apps or even lock the phone.