Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Hi new here!  (Read 3763 times)
0 Members and 1 Guest are viewing this topic.
Offline mosgrom

Innocent Bystander


Exp: 23 years



« Posted 2019-12-07 15:49:45 »

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.
Offline yboya
« Reply #1 - Posted 2019-12-07 16:19:51 »

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.
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #2 - Posted 2019-12-07 16:24:20 »

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? :-)

(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.)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline yboya
« Reply #3 - Posted 2019-12-07 18:29:05 »

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 !
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #4 - Posted 2019-12-07 18:42:27 »

Yes getting sales is something else. I thought you meant something specifically complicated when publishing a Java game.
Offline yboya
« Reply #5 - Posted 2019-12-07 19:05:39 »

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.
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #6 - Posted 2019-12-07 19:25:09 »

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. Cheesy
Offline abcdef
« Reply #7 - Posted 2019-12-07 19:28:19 »

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.
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #8 - Posted 2019-12-07 19:34:23 »

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.
Offline philfrei
« Reply #9 - Posted 2019-12-07 19:37:42 »

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.

music and music apps: http://adonax.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #10 - Posted 2019-12-07 19:43:53 »

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?
Offline philfrei
« Reply #11 - Posted 2019-12-07 19:47:08 »

>>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.

music and music apps: http://adonax.com
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #12 - Posted 2019-12-07 19:54:02 »

I think your article is actually the one I discovered this site through (through google searching for jpackage or jlink maybe) Grin
Offline philfrei
« Reply #13 - Posted 2019-12-07 23:21:16 »

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.
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.
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)
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.

music and music apps: http://adonax.com
Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #14 - Posted 2019-12-08 13:00:14 »

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
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #15 - Posted 2019-12-08 22:35:36 »

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

Cas Smiley

Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #16 - Posted 2019-12-09 12:23:28 »

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

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #17 - Posted 2019-12-09 12:32:59 »

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 Smiley

Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #18 - Posted 2019-12-09 20:08:12 »

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  Clueless 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

Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #19 - Posted 2019-12-10 10:36:30 »

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 Smiley

Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #20 - Posted 2019-12-10 20:41:44 »

It's a bit late for me now to switch over. Besides does JavaFX give me any gains in performance (are transformations performed on the GPU when using JavaFX?) Anyway it will be way too much work at this point. For a new game in Java I would use LWJGL or maybe just switch over to something like Unity but I'm not going to do a new game for a long time probably because I want to build onto what I have with my current one.
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #21 - Posted 2019-12-11 09:36:23 »

JavaFX gives you hardware accelerated rendering for scaling, rotation, and alpha, in any combination. It's also designed from the bottom up to be animated smoothly at 60fps. It might be worth tinkering with if you're really in need of that hardware acceleration.

You did write your game such that the back-end was split from the front end, right?  Grin

Cas Smiley

Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #22 - Posted 2019-12-18 12:22:26 »

Hey! was away for a bit. Well the rendering is mostly separate from the game-logic. But it is uses Graphics2D extensively. There's all kinds of UI components and effects that I created that all use Graphics2D. Of course game-logic uses things like Point2D etc. in things like locations of objects and collision, etc. I've looked a few minutes at JavaFX and I think it would be a lot of work to port it over.

What happened was: I had envisioned the whole thing so that it wouldn't need "heavy" graphics processing. But then some planets came out so beautifully when I pushed the object density a bit more that it became part and parcel of the look. There's two modes possible with my game: with control-panel on the right or full wide-screen. I'll probably keep the full widescreen disabled because the whole game-loop (rendering and game-mechanics (movement & collisions etc.)) goes up to about 13ms per iteration on some planets. Which sounds fine because it's still over 60 fps, but because the images are quite sharply delineated it might look slightly not smooth. It doesn't bother me but it might bother others. I can scale down the object density easily by a simple config setting too.

Anyway, my concern is more that something in AWT might "break" or become badly supported (for example letter-spacing is broken in OpenJDK (and always has been I think)). A couple of years ago JavaFX seemed to be pronounced dead. So I didn't go with it since I would have to learn it and I didn't think I'de really need it. Now people seem to be talking about it all over the place.
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #23 - Posted 2019-12-18 14:39:19 »

for example letter-spacing is broken in OpenJDK (and always has been I think)). A couple of years ago JavaFX seemed to be pronounced dead.

I think the spacing may be fixed now - at least in some versions - https://bugs.openjdk.java.net/browse/JDK-8217731

JavaFX went through a bit of a period of uncertainty but I believe it may have been the "FUD" sort of uncertainty rather than a "lack of communication" sort. It was fairly clearly announced that it was (very sensibly!) being chopped out of the JDK into a separate project so it could evolve more or less independently, but of course, that sort of manoeuvre often looks like a death sentence for a bit of technology. Fortunately it seems to have flourished as OpenJFX with the help of Gluon Labs. Minor disclaimer though: I've not used OpenJFX yet; my experiences are limited still to JavaFX under OracleJDK 8 still (grr).

Cas Smiley

Offline VaTTeRGeR
« Reply #24 - Posted 2019-12-18 18:15:07 »

My experience with OpenJFX on OpenJDK 13 was pretty smooth, i'm using it for a small GUI now. Maven makes the library setup and also the jlink process a no brainer.
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #25 - Posted 2019-12-18 18:49:05 »

I had a terrible time with getting it to work with OpenJDK11 and 12, but I've recently just migrated to 13, so I might give it another go.

Cas Smiley

Offline mosgrom2

Senior Newbie


Exp: 23 years



« Reply #26 - Posted 2019-12-18 20:04:55 »

Oh, I see, letter-spacing might be fixed it was OpenJDK 11 & 12 I remember seeing it in...well, that's good news.
Offline philfrei
« Reply #27 - Posted 2019-12-19 08:06:47 »

I had a terrible time with getting it to work with OpenJDK11 and 12, but I've recently just migrated to 13, so I might give it another go.

Cas Smiley

Terrible time, how?

I can't remember, are you developing with Eclipse? I don't think I have the best set up, but I have something that works.

I've been using it as my main GUI for a while now, since switching over to OpenJDK with Java 9.

music and music apps: http://adonax.com
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #28 - Posted 2019-12-19 08:35:05 »

My problems stemmed from 3 things:
1. The module system being horribly complex and still largely unnecessary for nearly all uses of Java
2. Eclipse's module system handling being totally broken. Hm. Probably still is. Anyone remember the generics fiasco of 2005?
3. Bugs in JDK11/OpenJavaFX that meant it just didn't work properly.

Cas Smiley

Offline philfrei
« Reply #29 - Posted 2019-12-19 19:39:44 »

For what is is worth, I posted a quick wiki on what I'm currently doing for OpenJFX on Eclipse.

I won't have a chance to proof some of the issues about using environment variables PATH_TO_FX and PATH_TO_FX_MODS for a few days at best. I think Gluon documentation may be a bit spurious on not adequately emphasizing that two downloads are needed (the mods, the SDK files) and which to link where.

It's a "wiki" so people can edit what I wrote. It would be great if people do so, especially if they have better instructions or a better method!

music and music apps: http://adonax.com
Pages: [1] 2
  ignore  |  Print  
 
 

 
Riven (442 views)
2019-09-04 15:33:17

hadezbladez (5304 views)
2018-11-16 13:46:03

hadezbladez (2218 views)
2018-11-16 13:41:33

hadezbladez (5571 views)
2018-11-16 13:35:35

hadezbladez (1158 views)
2018-11-16 13:32:03

EgonOlsen (4595 views)
2018-06-10 19:43:48

EgonOlsen (5470 views)
2018-06-10 19:43:44

EgonOlsen (3132 views)
2018-06-10 19:43:20

DesertCoockie (4026 views)
2018-05-13 18:23:11

nelsongames (4744 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!