News for hackers. Stuff that matters.
Re:Setris – Tetris with Sand Physics by userbinator on Tuesday May 30, 2023 @12:24AM (#36121111)
Is it just me or does 60MB - compressed - seem a little on the large side for something of this complexity?
Re:Setris – Tetris with Sand Physics by SolarNet on Tuesday May 30, 2023 @12:32AM (#36121155)
Depends how it's backed, how static it is, and so on.

The lisp runtime may fit in 20 MB, but not every language's runtime is so compressible. It may be smaller if one used something like C#/.NET where it's reasonable to assume, on windows, that everyone has specific common versions of the runtime laying around.

And then there are things like libraries. How dependent on the state of the OS do you want to be? Do you bring your own copy of SDL, or do you rely on it being installed? Even choice of graphics library can make a big difference, did you use something like DirectX which the OS will have all ready for you (assuming it supports it of course), or do you use something like OpenGL/Vulkan and invariably have to bring your own copies of various things like shader compilers and texture compression libraries.

In this case it's because it packages it's own copy of the JRE (which makes up more than 2/3rds of the contents). Which makes plain the greatest failure of Java, it was never a universal execution environment. Which is why every program ships their own copy of it and users no longer complain about "Update Java" notifications, or dealing with incompatible Java environments.

Re:Setris – Tetris with Sand Physics by grodriguez100 on Tuesday May 30, 2023 @02:34AM (#36121788)
Custom Java runtimes can be generated using jlink [1] which take a fraction of the space needed for a “full” JRE. I have some applications packaged like this and the Windows installer exe, generated using NSIS, is under 15 MB.

[1]: https://docs.oracle.com/en/java/javase/11/tools/jlink.html

Re:Setris – Tetris with Sand Physics by SolarNet on Thursday June 08, 2023 @07:25PM (#36250767)
Sure, but then you have to add back all the Java libraries they then used ontop of it. I assume the developer also used a tool like this to cut it down, the issue of bundling the custom Java runtime was never the size, it's that java was never supposed to need to do it this way (not that that is the end user developers fault of course).
Re:Setris – Tetris with Sand Physics by mslivo on Tuesday May 30, 2023 @01:16AM (#36121365)
Developer here. This game was made in Java+Libgdx so it's coming with a bundled JRE which makes up most of the filesize.
Re:Setris – Tetris with Sand Physics by nathell on Tuesday May 30, 2023 @03:04AM (#36121935)
Is there a way to just get a .jar, for those of us who already have JREs installed?
Re:Setris – Tetris with Sand Physics by mslivo on Tuesday May 30, 2023 @03:15AM (#36121999)
Not as a seperate download, but the .jar is inside the .zip/.tar archive. You can just toss the "jre" directory if you want to use your own JRE.