Hi new here!

Hi,

I’m new here. I’m putting my Java game I’ve been working on for 3 years on Itch.io pretty soon.
I’ve been java-dev since jdk1.1. (1997? don’t remember).
Anybody else out there who has published a non-free Java game (anywhere)?
Just got on this site today because I was looking up using jpackage with JDK 12 on google and google gave a link to a post or article here.
I don’t know why I didn’t discover this site before but it’s been pretty isolated working on a Java game.
I send out a tweet once or twice looking for fellow Java game-devs with no response.
Anyway, just looking to get to know some other people who do/done this and exchange experiences.

Hi,

It is pretty difficult to publish a non-free Java game, personally, I prefer working on a free java game at home, just to rest from my work at the office. I have discovered this site months ago, and there is many interesting games, the best for me being “Naroth”. While being a C++ programmer at work, I find java to be very well suited for rapid game development, from an amateur point of view.

Hey!

Thanks for the reply. Did you publish anything written in Java. What’s particularly difficult about it? Or do you just mean difficult to get any sales? :slight_smile:

(I’m Replying from mosgrom2 because ‘mosgrom’ got locked when I set my email on my profile and it supposedly send an activation email which never arrived.)

Yes, I published “SimCar”, a small driving simulator that I wrote initially in C++ during the 90s, and then ported to Java. More recently, I published “Koin3D”, which is the java port of C++ library Coin3D. I plan to release a 3D game, “Mount Rainier Island”. You can find those projects on GitHub.

By difficult, I meant to have sales, there is so much indies games in the market. And also, if you use open source materials for your games, sometimes there is limitations in licences that keeps you from doing money with it.

Anyway, keep us informed of your current java game !

Yes getting sales is something else. I thought you meant something specifically complicated when publishing a Java game.

That make me think : When publishing a java game, it is good to include a jvm with it, not only publishing a jar. Because many games in this site don’t work anymore with a current jvm.

Yes, thanks for that. I’m aware of it. I have been using launch4j for production versions. But was looking on google into how to use OpenJDK 12 and jpackage (OpenJDK 12 doesn’t have it). That’s when I came across this site. :smiley:

If it’s all packages up nicely no one would know if it’s java or not so I wouldn’t stop doing anything just because it’s java. There are people here who have successfully published java games. Making money is a another topic entirely but it being java won’t harm that.

That what I would think. I thought it be interesting to see what people who’ve actually had a paid Java game out for a while had to say about this. I’m only including “paid” because I think that sets a certain compulsion on the developer. Which i.m.o. creates some different dynamics than when putting a game up for free.

There’s no way to make a java application appear as a single .exe with jpackage though is there? Does anybody know? What I see is it can create an exe launcher but the jar file(s) will still be under a folder in the games installation directory. With launch4j I can hide all my game jars in the exe. Although I’ve never found a way to hide the jre in the exe too.

Hi and welcome!

I’ve published on itch.io You can check out the program here: Reference Note Keyboard

I chose to use jlink to ship with a JVM. I think including a JVM is pretty important nowadays, especially with complications such as installing JavaFX and Oracle being more proprietary about their standard install. Whether you include the complete JVM or reduce it using JLINK is subject to debate. Sometimes the reduction in size (for larger games) isn’t worth the extra trouble. JLinking reduced the size of my program to something like 70 or 80 MB, or 15 to 20 MB download (I really can’t recall the exact sizes, but these figures should be in the ballpark).

With itch.io, electing to put the program in a standard Microsoft loader is kind of discouraged, but I chose to do so anyway, as I couldn’t figure out how to get the program to work with the itch.io “butler” program. Maybe you can help come up with a better approach. I think my download instructions also need be improved.

There are any number of members here who have posted games at both itch.io and steam (paging @princec) who can probably give you some great advice.

Hey! Thanks!

I like your note keyboard thingy. I actually wanted something like that. When I have my itch.io account (haven’t set anything up yet) I will buy that. What do you mean with standard microsoft loader (an .msi for installation or something?). I also don’t know what the butler program is. How is your application launched? Through a .exe or script?

There’s no way to make a java application appear as a single .exe with jpackage though is there? Does anybody know? What I see is it can create an exe launcher but the jar file(s) will still be under a folder in the games installation directory. With launch4j I can hide all my game jars in the exe. Although I’ve never found a way to hide the jre in the exe too.<<

I used jlink and Inno Setup 5 (now at version 6), with OpenJDK 11 and OpenJFX. You are welcome to download the program from itch.io and inspect the install in the Program Files area. The program (to the user) is launched via the Microsoft Start Menu or from a Desktop icon. The jvm is buried in a subfolder in the program files area.

The guide I wrote on this is here. I’m not especially advanced, and had to do a lot of the steps manually from the command line. There are some aspects of the tutorial that need to be updated, but you should be able to get the basic idea of what I did.

Butler is a tool provided by itch.io for deployment. Check their help area for info on that.

The download is an install .exe that calls the standard setup that Microsoft programs use. It looks like a standard sort of setup, the java aspect pretty much stays behind the scene.

I think your article is actually the one I discovered this site through (through google searching for jpackage or jlink maybe) ;D

Thanks! You should be able to download without signing up, I think. In any event, I DON’T recommend using the itch.io download tool. Just download the linked .exe file and run it. And you can skip past the “please donate” stuff, even though itch.io doesn’t make it obvious that this is possible.

[quote]I’m only including “paid” because I think that sets a certain compulsion on the developer.
[/quote]
Even though it’s free, I want to sell more ambitious programs, and was thinking of the musical Keyboard as a reputation builder, something that showed a decent level of quality. So, yes, there was a “certain compulsion” there to get things right behind it.

[quote]I think your article is actually the one I discovered this site through (through google searching for jpackage or jlink maybe)
[/quote]
Would not surprise me. I spent several months thrashing around, posting questions here and at StackOverflow, trying to figure out packaging and distribution. The article was a contribution to the community to try to alleviate the need for others to go through the same agonies. But as you can see, I am kind of “prone to prose” and the tutorial errs on the side of verbosity. I think that might make it look a little intimidating. I have on my queue to write an update which includes dealing with the JavaFX separation issue, but with less explanation, just the steps. Might not get to it until January, though.

Hey philfrei!

Very nice of you to put all that info up. I might be able to do the same about a few things for example: using launch4j.

I also figured out (about half a year ago) how to use Graal.js instead of Nashorn for your javascript engine (if you’re using JavaScript in your java-app, Nashorn is deprecated and there is no alternative bundled with the JDK at the moment). At the time this was hard to figure out. All the examples assumed you wanted to use the GraalVM etc. and Maven for build/deploy which I don’t. With me you just put some Graal jars on your classpath and you can use it. I’ve been using it in my game since seemingly without problems. I think they’ve gotten a lot further with it though and there might be ‘official’ examples on how to do this now.

Another thing I generally see a lot of ‘confusion’ about (although maybe not on this forum) is Swing. People seem to think there’s something magic about it or that you have to use it (if not using something like JavaFX). My game runs purely on AWT there’s no Swing used. If you’re not using some other Java 2D/3D library I don’t understand why you would ever want to use Swing. Also as far as I’m aware: Swing is pure Java and purely build on top of AWT. 20+ years ago, in the company I worked for me and a few others build a component library (like entry-fields, lists, tree-views etc.) that had to look different from the AWT standard our selfs. With AWT there was only the AWT default look that supposedly would look the same across platforms (but it was far from pixel perfect) otherwise the components would look like what was common on the platform. There was no Swing. I guess a lot of companies did something similar to building there own components. Then Sun came out with their own solution to this called ‘Swing’. But i.m.o. Swing is for business (form like) application and then still a bit over-engineered (with a ridiculous amount of abstraction 90s style).

There’s a lot of little things I figured out about AWT too over the last 3 years: Some probably obvious: e.g. just because image rendering can be accelerated by your GPU you cannot accelerate any of the transformations (rotation etc.). How is that for JavaFX? I’ve never used it but from some of the code I see it’s more like for example OpenGL where there’s a ‘scene’ and sort of a rendering pipeline. So I assume it does accelerate transformations. Other things are some tricks on how to get bilinear-interpolation working. That fillRect is a lot slower than rendering an image etc.

Anyway as you can tell, I’m kinda excited about finding anybody at all still interested in using Java for games. It’s kinda sad what happened to Java and how a lot of people now think it’s not a good platform but are happy to use C#. I think a lot of this business and development career-boy oriented stuff like preaching about beans, spring, swing, design patterns, scrum, Maven, XML, etc. Have made it so Java is viewed as too verbose. Then what Google did with Android Java has i.m.o. hurt Java a lot. I think it’s strange google won that. I seem to remember Sun successfully sued Microsoft over introducing differences in JView (which was the Microsoft Java jvm at the time) that would cause developers to start coding for these differences and effectively split up Java in a microsoft version and a Sun version. Everybody seemed to be on board with Sun at the time. Years later: Google rips out the entire class library and effectively splits Java development in two and everybody is on Google’s side. Whatever.

Hey do you have a twitter account? Mine is @mosgrom

We’re still beavering away at it. Made a few bob over the years too.

Cas :slight_smile:

I see you were at it before most :slight_smile: 2010 Revenge of the Titans, is that the last one you did? I only started Taxinaut in 2016.

After RotT we “remastered” Titan Attacks, Droid Assault, and Ultratron. Then we put out a game made in Unity called Basingstoke, and published a casual game called Faerie Solitaire Harvest. Currently working on Battledroid (back in Java). We don’t really make any money these days but maybe that’ll change for the better again.

Cas :slight_smile:

Man that looks good! Nice to see that’s Java. Is that using LWJGL or JMonkeyEngine or something? Next project if I ever get there I might venture there.

Mine just using AWT :clue: At the time I was considering LWJGL but after some testing didn’t think I needed it for what I wanted and I would have to learn a lot. Of course in hindsight it might have been better because a good few things are now very limited (e.g. the image rendering is clearly accelerated but any rotations/scaling etc. run on the CPU). My game is pretty much flat anyway but you also can’t do any post-processing, etc. (well you would have to do it on the CPU which isn’t feasible performance wise). You can see some of it here: www.mosgrom.net I’m going to add onto my profile here pretty soon (going to put it on itch.io in january).

Jasper

Battledroid’s just LWJGL3 with our own custom engine (called “Voxoid” as it was originally conceived to be dedicated to voxel rendering but it turns out that most of it is generic).

I’d advise having a look at JavaFX if you want to up your game, it’s a league of performance ahead of AWT, but it’s still an order of magnitude less powerful than going straight to LWJGL, and it still hasn’t got any post processing support.

Cas :slight_smile: