Author Topic: C - JAVA  (Read 2436 times)

WizardsRule

  • Hydlaa Citizen
  • *
  • Posts: 317
    • View Profile
C - JAVA
« 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.

The evils of past repeat themselves in many shapes and forms



IngeniousMask

  • Traveller
  • *
  • Posts: 13
    • View Profile
(No subject)
« Reply #1 on: February 08, 2005, 11:28:30 pm »
You could send them to someone who knows C++ and they could try to convert the code.

WizardsRule

  • Hydlaa Citizen
  • *
  • Posts: 317
    • View Profile
(No subject)
« Reply #2 on: February 09, 2005, 12:31:01 am »
doubt that would work

The evils of past repeat themselves in many shapes and forms



dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #3 on: February 09, 2005, 12:51:30 am »
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.
Quidquid latine dictum sit, altum sonatur.

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #4 on: February 10, 2005, 12:05:55 am »
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.
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

tangerine

  • Hydlaa Resident
  • *
  • Posts: 192
    • View Profile
(No subject)
« Reply #5 on: February 10, 2005, 01:02:50 am »
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.

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #6 on: February 10, 2005, 02:11:32 am »
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 :( )...
« Last Edit: February 10, 2005, 02:12:21 am by Cha0s »
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

WizardsRule

  • Hydlaa Citizen
  • *
  • Posts: 317
    • View Profile
(No subject)
« Reply #7 on: February 10, 2005, 04:32:16 am »
Is there any way to get the ENTIRE source to the PS game?

The evils of past repeat themselves in many shapes and forms



Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #8 on: February 10, 2005, 04:38:35 am »
Yup, CVS. You don\'t get the art, but you do get the source. It\'s down right now, though...
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

tangerine

  • Hydlaa Resident
  • *
  • Posts: 192
    • View Profile
(No subject)
« Reply #9 on: February 10, 2005, 08:17:18 pm »
you java updater is so small just because you forgot to count the huge JRE

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #10 on: February 10, 2005, 08:32:03 pm »
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.
« Last Edit: February 10, 2005, 08:35:51 pm by Seytra »

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #11 on: February 10, 2005, 08:36:18 pm »
Quote
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:

Quote
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?)
« Last Edit: February 10, 2005, 08:43:15 pm by Cha0s »
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #12 on: February 10, 2005, 08:48:27 pm »
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.
Quidquid latine dictum sit, altum sonatur.

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #13 on: February 10, 2005, 08:59:07 pm »
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...
« Last Edit: February 10, 2005, 08:59:58 pm by Cha0s »
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #14 on: February 10, 2005, 09:04:03 pm »
Quote
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.