Though Java was used, this game is inaccessible to Mac, iPhone, and Android users. Porting to all these platforms is inefficient compared to just using the web.
It also requires a 60MB download, which is not very space efficient for a relatively simple 2D game (NES Tetris fit on a 24KB ROM). People have implemented Tetris in as little as 446 bytes [1]. Full color JS versions have been done at 16KB or less [2][3]. A JS version from 2004 came in at 1.5kb [4].
Haven't done memory efficiency analysis, but willing to bet the average JS Tetris implementation has dramatically better memory efficiency as well.
[1] https://hackaday.com/2016/10/06/tetris-in-446-bytes/ [2] https://github.com/cztomczak/jstetris [3] https://codeincomplete.com/articles/javascript-tetris/ [4] https://joriszwart.nl/games/javascript-tetris-1.5kb
It's funny that when people say that hardware is cheap, but frown on a 60MB explicit download. Our browsers spend several 60MBs per day to show us ads, and we don't tell a word, but "a 60 MB game. Heresy!", we cry.
I'm no stranger to hyper-efficient implementations as a demo scene enthusiast, yet this is no demo, and is a cross platform game, where the author decided to code in Java. I don't understand the criticism, because I'm aware of no rule that any software we develop shall run on Big5 (iOS/macOS/Android/Linux/Windows), plus web browser and my car key fob.
Actually, when I look the files, the game is 20MB assets + 110K executable + 40MB JRE. So the developer decided to bundle the JRE to make sure it runs. That's a fair (even small) size given today's lassiez faire attitude where people chant "Hardware is cheap, network is reliable".
Yes, one might do this in 100K altogether, but, personally, I'm no judge. It's a good game, runs on my favorite OS, and enjoyable. That's enough for me.
If the idea is that good, let Setris clones show us the way.
Would love to see the author's actual comment on this rather than your presumptions about it. If it's trivial to compile and run, why leave out a huge market for what you make out to be minutes of effort?
> Our browsers spend several 60MBs per day to show us ads
When I'm browsing, I run an ad blocker. As a digital nomad, I'm also regularly on 4G and hit my data caps often. I would never wait for 60MB of download for a simple game.
> yet this is no demo, and is a cross platform game
Right, I just used some examples to show how little memory a game like Tetris needs, including high quality production implementations, like the original NES version, as well as most major Tetris PC, console and handheld releases in the last 30 years.
The JS examples above are inherently cross platform. A browser based game will run on every single consumer grade device that has access to the internet.
Higher quality JS versions can be found, including the official version: https://tetris.com/play-tetris That version is 4.9MB, 2.5MB of which are MP3 files, much of the rest of it is high-quality full-color PNG assets.
Clearly the assets should be reduced in size. No need to ship a runtime if you use JS. Another benefit is it runs in a sandboxed browser environment and I don't have to worry about running an executable locally.
Again, all this is a response to your assertion that "It's probably 10x more efficient than a possible JS implementation, tho." It doesn't run on my OS, and that's part of the reason I'm complaining about it.
More efficient to develope? Possible, depending on the devs skill set, but hardly relevant for the end user who want to play the game on possible low performant hardware?
Oh and I think wasm can beat java in several cases.
No, as a high performance software developer, my aim was not to devolve the discussion into a pedantic "stone throw".
> Well, what did you mean by more efficient if not more performant, the usual metric?
Watt per instruction. IOW, power consumption. As a person who lives in HPC world, inefficiency is bane of my existence. Two software can be equally performant while having different power profiles. I'm focusing on power.
What does this brings, you may say. Throttling is the simple answer. If you waste more power, you'll hit the throttling wall faster, use more battery, and will lower the quality of the experience. From your phone to biggest supercomputers have thermal budgets, and none of them are unhittable.
> but hardly relevant for the end user who want to play the game on possible low performant hardware?
Not all of us have latest processors, tons of RAM, and JS microbenchmarks show that browser JS engines have wildly different performance characteristics for some loads. Using a native platform pushes these concerns out of the picture.
> Oh and I think wasm can beat java in several cases.
Have no experience with that, need to test and see.
Well yes, but this project was made with java. And by now I don't think java is more performant or efficient than the browser. In general, as you are surely aware, if you are looking for the most efficient solution, than obviously neither java nor the web is the right plattform. But for a casual game, both is fine.