PlaneShift
Development => Development Deliberation => Topic started by: WizardsRule on January 28, 2005, 04:26:37 am
-
If i were to make some improvements in Java would there be any way for me to use them to help the program.
-
You could send them to someone who knows C++ and they could try to convert the code.
-
doubt that would work
-
You\'re right, it would be a mess.. any Java utilities would have to be standalone (i.e. they wouldn\'t talk with the C++ code very well). You could either focus on making utilities or on familiarizing yourself with the large codebase of PS if you\'re interested in the engine.
-
Unfortunately, the from what I\'ve heard, most of the PS team is uninterested in Java (standalone or otherwise). You can do Java stuff on your own and release it to the community as \"unofficial\" utilities and such. You should avoid messing with the psclient and existing apps, though, as that violate the license agreement.
-
AFAIK there is one java utility. But java will certainly never make it directly to client or server. Creating some java-C++ mess just because somebody does not know c++ is not really worth it. I don\'t personally have a big problem with java though, it would be interesting to see how would PS run if it was coded in java (with 3d engine in C++).
Messing with psclient doesn\'t violate anything, it\'s GPL.
-
If you mess with psclient and rerelease with the art you\'re violating it though (I think).
Anyway, Java\'s slowest aspect is graphics, especially 3D (it\'s actually faster than C++ in many other areas), so a psclient in Java would probably run about the same as a C++ client. I agree, though, that having Java and C++ in one app is a bad idea unless it\'s planned out carefully from the beginning.
The reason I think Java is a good solution for utilities is that the other cross-platform option is Crystal Space and that means huge files due to all the required libraries. For example, the normal updater for PS is about 20 MB. My Java updater is 29k and runs nearly the same (with a few caveats concerning zip compression... apparently it doesn\'t compress things as much as the C++ one... :\\ ). I personally would love to do things in Java for the team, but Venge would rather I continue learning C++ (which is going painfully slowly :( )...
-
Is there any way to get the ENTIRE source to the PS game?
-
Yup, CVS. You don\'t get the art, but you do get the source. It\'s down right now, though...
-
you java updater is so small just because you forgot to count the huge JRE
-
IMO, Java sucks, but I\'d rather see Java than C$, erm, I mean C# / .NET, i.e., Sun is still (a bit) better than Microtheft. :/
However, I think that it might actually be an option to have the updater in Java, selfupdate-wise.
Pros:
1) The updater could, even on W9x/ME, painlessly access the CS files, as it doesn\'t use them if it is Java
2) The JRE doesn\'t get updates as frequently as CS does
Cons:
1) updating the JRE would then require user action, which isn\'t good,
2) JRE isn\'t nearly as free as CS, so I\'d rather stick with CS.
Oh yeah, if you mod the client, or the server, you don\'t violate the license. You may, however, not redistribute the art, be it with or without the modified or unmodified versions. However, this isn\'t a real problem IMO, as the updater will fetch the art, so no need to bloat your distribution files with it.
And converting Java code to C(++) code isn\'t actually a good idea. AFAICS, it would be easier to just draw up some design documents instead of Java code and code the things in C(++) than to actually port them.
-
Originally posted by tangerine
you java updater is so small just because you forgot to count the huge JRE
Assuming you don\'t already have the JRE, it\'s only 15.1 MB which is *still* less than the size of the updater (on the Mac, at least). In addition, you *should* have the JRE anyway due to the many other Java apps and applets being put out on the web.
EDIT:
Originally posted by Seytra
However, I think that it might actually be an option to have the updater in Java, selfupdate-wise.
Pros:
1) The updater could, even on W9x/ME, painlessly access the CS files, as it doesn\'t use them if it is Java
2) The JRE doesn\'t get updates as frequently as CS does
Cons:
1) updating the JRE would then require user action, which isn\'t good,
2) JRE isn\'t nearly as free as CS, so I\'d rather stick with CS.
Add cross-platformness to the pros, 0 porting necessary. As for the cons, I\'m pretty sure XP offers to update Java for you (and I *know* Mac OS X does). It\'d also be pretty easy to code in a JRE update function for the Updater (easier than coding the PS updater was, at any rate... that took me nearly a week, 2 or 3 hours a day, though a lot of that was mucking with the zip stuff). What do you mean by the second con, though? (JRE isn\'t as free?)
-
One of the reasons for the updaters chunkyness is because psclient & the updater are still being compiled in \"debug\" mode. This is mostly so I can still read crash reports until we get most of the mac-specific bugs ironed out.
-
Ah, ok. That explains some of it. I still think Crystal space is generally more bulky than Java, though. The individual sizes for each of the Windows utility apps listed in the repository are all ranging from between .5 MB to around 2 MB (which is still a lot compared to the small Java app: considering also that you\'d probably only need a JRE update once every year (or less, as Java is very good at backwards compatibility) and that Java has the other advantages Seytra mentioned...
-
Originally posted by Cha0s
What do you mean by the second con, though? (JRE isn\'t as free?)
CS license: LGPL, i.e. sourcecode available, free as in \"speech\"
Java license: full of the usual \"you may not\" crap. No source, no nothing, just free as in \"beer\".
That alone is sufficient reason to choose CS over Java.
-
You don\'t need the source to Java. :\\
Java is the language whereas CrystalSpace is more like additional libraries. With the Java built-in libraries, it\'s black-box coding: You\'re given a method, class, etc. and told how to use it (API for Java is very good) and it works. You are allowed to redistribute the JRE as well, so I don\'t see any big problems...
EDIT: In fact, I don\'t see any reason that you\'d need the Java source... :\\
P.S. I\'ve got a bit of work to do now, but I\'ll be back on in about two hours...
-
Originally posted by Cha0s
You don\'t need the source to Java. :\\
Java is the language whereas CrystalSpace is more like additional libraries. It\'s black-box style coding: You\'re given a method and told how to use it (API for Java is very good) and it works. You are allowed to redistribute Java as well, so I don\'t see any big problems...
You don\'t need the sourcecode unless you want to modify it (fix bugs, improve things, add features, fix security flaws, etc., etc..), or learn from it. It\'s the same as with a C++ compiler, or just about any piece of software.
Therefore, CS is in keeping with the PS philosophy of \"truly free\", whereas Java isn\'t.
Edit: it\'s just like the US broadcast (DRM) flag: others dictate what you may or may not do.
-
Do you examine the source to every single C++ library you program with? The Java source code is in most cases not stuff you want to mess with in the first place. Secondly, if you want to see the code to the various Java classes, you CAN! I\'ve taken a look at some of the classes through the NetBeans IDE... As for fixing, modifying, etc. you just extend existing classes... that should cover most of the changes you\'ve mentioned unless you want to start coding in Assembly, that is...
Let\'s look at this from another point of view: Do you look at the source code to C++?
Also, comparing Java to CS makes no sense. Java is a LANGUAGE, CS is a group of libraries forming a game ENGINE.