
Minecraft shows how bedroom programmers can create global hits (2013) - espeed
https://www.technologyreview.com/s/516051/the-secret-to-a-video-game-phenomenon/?
======
chillacy
> Coded in Java, a general-­purpose programming language that emphasizes speed
> and lightness over the grand capabilities of more powerful tools

I stumbled a bit while reading that. There is a comment to be made about
notch's use of java, both good and bad, but I don't think speed and lightness
when I think java, especially in the realm of 3D games.

I do think it was a good choice for cross platform play and modding though.

~~~
kpil
I wonder what are the grand capabilities it lacks? Is C++ a more powerful tool
filled with grand capabilities? It does not feel right, although it sure is a
Swiss army knife full of sharp and pointy tools in a "Don't look into laser
with remaining eye" sort of way.

Is C a more powerful tool? Absolutely not. It's powerful but not that
expressive.

Both languages are relatively low level and uses application memory
management. I think it's only the latter that really matters when writing 3d
games and other low-latency programs to be honest.

But I think the slow part of minecraft is the terrain generation, and I think
it's mainly because the world is rather large and the algorithm is complex,
not because java is slow or that the gc is a bad idea.

I don't think that the Windows 10 version run noticably faster, but I'm not
completely sure that it's C++ and not C# and gc:d.

~~~
matt_m
The biggest thing compared to C and C++ (or even C# and Go) is probably the
lack of user-defined value types. So if you want to create an array of Point2D
objects, in Java it will be an array of pointers to heap-allocated objects
(each with additional per-object overhead), which is really bad for cache
misses, memory consumption, GC pressure etc. C# is a pretty similar language
that is popular for game development (with Unity) but unlike Java it supports
value types.

~~~
kpil
I agree. It would be good with some kind of fly-weight allocation for a whole
array of objects in java.

How is garbage collection for arrays of value objects solved? Is the whole
array gc:d, or what? If an individual element is referenced somewhere the
array stays in memory?

~~~
matt_m
C# works a little differently from C/C++ in that stack vs heap allocation is
decided at the type level (using a 'struct' or 'class' keyword when defining
the type). So you can't easily have one object have a reference to an interior
Point in a Point[] array, since any Point instance variable will just be
copied by-value and not be a reference. A Point in an array can be passed by
reference into a function using the 'ref' keyword though, in which case I'd
expect the GC to keep the whole array around until the function returns? (It
seems hypothetically possible to optimize but kind of a niche case). If you
need to, you can also actually use raw C pointers with an 'unsafe' keyword,
that's outside of the GC though (useful for working with C libraries).

------
LCDninja
IMHO Markus Persson wasn't a "bedroom programmer" in the pejorative sense, he
programmed as a professional for King.Com for four years before venturing into
the land of indy dev.

[https://en.wikipedia.org/wiki/Markus_Persson](https://en.wikipedia.org/wiki/Markus_Persson)

~~~
kpil
Yes.

I think he was a rather creative developer that managed to create the game
that he wanted himself as a kid.

Maybe we can just sort this article under "slighly uninformed opinons" and
carry on with our lives...

------
KhalilK
s/Minecraft/Stardew\ Valley/ and you get the 2016 version.

~~~
pedrosorio
Wow. I wasn't aware of this Harvest Moon clone. Brings back memories.

