8
\$\begingroup\$

My mate and I are gonna make a game for Steam and I, as the programmer, want to use Java as that is my current favorite language. So I need to know, does Steam notify the user that they need Java for a game when they buy/download/install it?

\$\endgroup\$
14
  • 4
    \$\begingroup\$ I'm voting to close this question as off-topic because it is more about a Steam feature than about game development. \$\endgroup\$
    – MAnd
    Commented Jan 29, 2016 at 19:46
  • 9
    \$\begingroup\$ Quite frankly, I would be upset if the game I bought forces me to install Java. It is a very powerful language and kudos to you for loving it but it's more of a hate-hate relationship for any average user that has to be exposed to Java. Expect inflammatory comments popping up on your game's store page which say things like "Virus simulator 2016" or "Do not install, it forces an outdated version of Java onto your machine." \$\endgroup\$
    – MonkeyZeus
    Commented Jan 29, 2016 at 20:13
  • \$\begingroup\$ @MonkeyZeus Which is precisely why things like this should be abstracted away from users -- they literally haven't a clue what they're talking about. Vulnerabilities were only in the web browser plugin (which never was a good idea). In any case, package your game up to include all resources necessary for it to run... don't assume the user has anything. Go the Minecraft route as an example, use launch4j or install4j to build a bundled installer/executable with the JRE baked in. No security vulnerabilities, and no hassle for the user. \$\endgroup\$
    – SnakeDoc
    Commented Jan 29, 2016 at 23:28
  • 3
    \$\begingroup\$ Some games install .NET for you upon first launch. \$\endgroup\$ Commented Jan 30, 2016 at 12:05
  • 1
    \$\begingroup\$ @immibis You are right BUT it only takes one semi-educated user that had a bad Java virus experience from a shady website to post a comment which gets highly upvoted or get top "funny" status. If you've never heard an IT guy mutter "Java bad" like a caveman then you are an exception in this world. Also, asking the user to download something is suggesting a lot of user-affordance especially considering how many sites would try to dupe you into installing a virus rather than the real thing. \$\endgroup\$
    – MonkeyZeus
    Commented Jan 30, 2016 at 13:45

4 Answers 4

20
\$\begingroup\$

To answer your question directly, no Steam doesn't notify the purchaser that the game needs Oracle's Java Runtime Environment installed to play the game. That's because there shouldn't be any need to, any game that has a dependency on the JRE will download and install it as part of the normal Steam installation procedure. This is no different than games that have dependencies on Microsoft's Visual Studio, DirectX or .NET runtime. There is even a standard JRE depot that you can use.

That said, I personally refuse to buy or install any game that dependent on Oracle's JRE. I don't want to have to deal with that nonsense. An alternative route would follow Minecraft's lead an include a Java VM as part of the game itself. That is, instead of installing a VM for all Java applications on the machine to use, like with the Oracle JRE, you install a VM side-by-side your game that only your game uses. I don't think you can do this with the Oracle JRE, I believe Minecraft uses one based on OpenJDK.

On the other hand, if you're just starting out, you should probably take the easy route and use the standard Oracle JRE install, and just accept some people won't like that.

\$\endgroup\$
1
14
\$\begingroup\$

This is by no means an answer, but some points to consider. It did not fit in the comments box.

I would think that even if you were to use c++, you would need to ship your game with a bunch of Redistributable, at least on Windows. Unless you can manage to not use Visual Studio tools and such. I don't know what happens for Mac users.

And if you go with Java, I believe there would be a way to ship the JVM with your game. This would increase the download size, but it would ensure

  1. that the client has a jvm, and
  2. that the client has the correct jvm version for your game

Note that it is already necessary to ship the JVM with the game if you are distributing through the Mac App Store, so if you plan on distributing beyond Steam, this may be necessary anyway.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Probably. I'm not that knowledgeable in that field though. I'd search a bit more the web. Perhaps this could be of interest to you. \$\endgroup\$
    – Vaillancourt
    Commented Jan 29, 2016 at 16:14
  • 2
    \$\begingroup\$ Or just use C. It's fast, low-level and a pain to code graphical stuff in. \$\endgroup\$
    – wizzwizz4
    Commented Jan 29, 2016 at 18:47
  • 2
    \$\begingroup\$ @AlexandreVaillancourt You said "I believe there would be a way to ship the JVM with the game". It is absolutely possible. While not a game, I do it with my Java app using launch4j. I know that there are other tools out there that can do the same. \$\endgroup\$ Commented Jan 29, 2016 at 19:33
  • 3
    \$\begingroup\$ Most Java vulnerabilities only concern java applets and when running untrusted code. If you download and run a game locally, you already (have to) trust that it won't do anything malicious. I don't think there is any more inherent risk in using java than there is in using any other framework/engine/technology. \$\endgroup\$
    – kapex
    Commented Jan 29, 2016 at 23:32
  • 2
    \$\begingroup\$ kapep SnakeDoc I updated the answer. \$\endgroup\$
    – Vaillancourt
    Commented Jan 30, 2016 at 0:32
5
\$\begingroup\$

This related question recommends using launch4j.

Based on 3 Ring's code page, it looks like they use getdown for Spiral Knights.

You might consider reaching out to Puppy Games to see if they're willing to share any insights. Similarly, there are some devs on java-gaming.org that have some experience with this.

\$\endgroup\$
0
\$\begingroup\$

You just have to make your custom Java and put it inside the install EXE along with your JAR file to put it on steam.

\$\endgroup\$
1
  • \$\begingroup\$ This answer would be more useful to future readers if it described the specific steps to take to do that. \$\endgroup\$
    – DMGregory
    Commented Jan 9 at 11:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .