
Glowstone: open-source Minecraft server - brian_herman
https://glowstone.net
======
kev009
When I was in college, I did one in C
[https://github.com/kev009/craftd](https://github.com/kev009/craftd). Looking
back, there are trivial concurrency bugs and some critical arch flaws that are
somewhat embarrassing and would be easy to fix now. But wow that project set
me up with a lot of useful experience I don't know how else I could have ever
gotten.

Another fond random memory was, during a scalability test with over 500 users
on a cheap linode, Notch joined thanks to a friend that became a popular live
streamer. I long for the free time and lack of organizational soul suck to do
stuff like that again.

~~~
nly
For what it's worth, coming from an outsider with no interest in the game,
that's some beautiful looking C.

------
KenanSulayman
I really don’t want to discourage you from looking into Glowstone, but a
really cool project I had stumbled over half a year ago is Cuberite[1], a
Minecraft server written in C++.

[1] [https://cuberite.org](https://cuberite.org)

------
NelsonMinar
I'm old enough to remember when buying Minecraft Alpha included a promise that
the code would be made open source some day. IIRC it was "when I'm tired of
working on it", which given the success it's been is probably never. (For some
value of "I" that's not Notch.)

~~~
justin66
Selling the product to Microsoft is pretty much the opposite of making it open
source.

~~~
petemc_
I would probably go back on a lot of things I've said if someone offered me
over a billion dollars. Also minecraft being as popular as it is you would end
up with a lot (more) pissed off clueless users. cf kodi.

------
TkTech
If you're interested in roll-your-own things like this, stop by #mcdevs on
Freenode and take a look at our documentation at
[http://wiki.vg](http://wiki.vg), where we've been RE'ing the protocol and
game internals for 8+ years.

~~~
mentos
Are Minecraft servers with a massive number of players something common or
really not something the average player cares to participate in?

I used to run my own Ultima Online server with an emulator called RunUO about
15 years ago. The same sort of fun I had running that server is what I see
people enjoying in Minecraft today. Its really great to see. It was possible
back then with a .Net windows server to support 1000+ concurrent clients with
very little noticeable lag.

I'm currently working on my own game in Unreal Engine 4 but if I could clone
myself I think I would set about creating a Minecraft client that could
connect to a RunUO server so that you could achieve those kind of 'MMO'
numbers. As well, you could leverage the RunUO codebase to add support for a
lot of the Ultima Online functionality (home ownership, spell casting, deep
crafting, etc, etc)

What is the best community to look into for supporting massive numbers of
concurrent players in Minecraft?

~~~
SpaceManiac
If you're interested in doing anything with Minecraft where starting from the
official client/server won't cut it, #mcdevs is the right place.

I have no idea about what the players want these days. The large-player-count
servers I believe still use instancing and transferring players between
servers to support those numbers.

The other hard part is the game's mechanics. You'd need a lot of careful game
design to reign in the destructible nature of the game world and all its
contents. Minecraft isn't _about_ questing and loot, it's about construction,
and if you're not leveraging this you might be better served by making your
own game. Large servers typically address this with round-based deathmatch or
deathmatch-like gameplay, not really what you seem to be interested in.

------
synchronise
This is nice, but considering the animosity the modding community receives
from official channels I'm really surprised why FOSS Minecraft clones that
specifically focus on mods, like MineTest, haven't taken off comparatively.

[https://www.minetest.net/](https://www.minetest.net/)

~~~
csallen
I see this sentiment a lot on HN. I know nothing about Minecraft, but I'd be
surprised if the factors at play here are any different from other situations
where "superior" FOSS clones fail to overtake the original closed versions:

Network effects. If Minecraft is a multiplayer game whose fun is largely
derived from sharing your experiences with others, then a new and "better"
version isn't really better at all if it's sparsely populated. Not only do the
network effects create value for players and spur growth, but they create
lock-in, too.

Risk aversion. Developers and modders have less motivation to build for a new
platform with few users and no profits because it's more likely to tank. Not
everyone wants to be a pioneering early adopter.

Economies of scale. Minecraft makes a great deal of money. That money can be
used to build features, woo developers, and launch marketing campaigns that
bring in users. It's hard to compete as a free-to-play competitor.

Awareness. How many people are aware of and care about this particular issue?
Most people aren't developers.

~~~
Sylos
So, if you've ever gone onto the Google Play Store and saw some Minecraft
clone that worked far too well for what anyone could possible hope to invest
and make money off, that's almost certainly a rebranded Minetest-version.

And there is a lot of these. It would not surprise me, if Minetest had already
silently overtaken Minecraft in terms of active players.

But yeah, this doesn't solve the awareness issue. These users don't know that
they're playing Minetest. Even if they were playing the official Minetest
Android build, they'd not know that this is the real thing.

And people interested in modding Minetest might not learn this either, so
never reach the platform in the first place. Some of these rebranded Minetests
bundle mods, icon packs etc., so you at least have an audience.

------
Filligree
I don't want to denigrate the effort, but... I'll be interested when I see
something with a Forge-equivalent API.

Porting Electrical Age to a different Java-based minecraft server is in
principle not terribly difficult, it's reasonably well abstracted already, but
there needs to be a modding api.

~~~
mattrick
I believe Sponge is built on Forge:
[https://www.spongepowered.org/](https://www.spongepowered.org/)

~~~
rstat1
Actually sponge is just an API, for which there just happens to be a
implementation built with Forge

There's also a plain Vanilla impl as well.

------
bastawhiz
Other than pistons not working it doesn't seem like there's a good list of
known issues or missing functionality. Is there a link that I'm missing?

~~~
momothereal
I think the issues on Github can give a general idea.

Pistons actually work (at least basic pushing/pulling) since a recent update,
so we should probably update that on the wiki. Other than that, I'd say the
biggest missing feature is Entity AI/Pathfinding at the moment.

------
majewsky
Does anyone know if this is less resource-intensive than the original server
(both CPU and RAM)? Or if it can at least leverage multiple cores properly?

~~~
Teknoman117
I spun it up on my server (an FX-8350) and it seems the load is higher than
the stock server w/ a view distance of 24. Mind you I'm only running one realm
(we really only stay on the default world) because it's just my ~8 person
gaming group.

It is continually surprising to me that there are all these reverse engineered
minecraft servers yet none of them seem to provide a significant performance
advantage within a single world. Cuberite, Glowstone, etc. They provide a
notable boost when your machine is serving many worlds, but it seems most
still use a single thread per world model. At least cuberite offloads chunk
generation to a second thread, but in their own documentation they claim they
don't want to support arbitrary levels of multithreading for fear it would
hurt performance on anything less than a quad core. Even though this is a bit
of a misconception, I don't understand why they wouldn't make such a thing
configurable.

~~~
SolarNet
It's a trade off, my understanding is that Glowstone's trade off is providing
customization through APIs and mechanisms that will last. E.g. simplicity and
power at the cost of performance.

As an aside they make a claim that will be familiar to many lisp programmers.
Their claim is by providing better power they will improve the average
performance in the long run for their users (e.g. people who like lots of
mods). Look at it this way, if you use horribly buggy edge cases to build
flying machines that's going to take a ton of work for the server to simulate
(minecraft flying machines often use tick perfect timings arrived at through -
effectively - busy loops); if instead you used a mod that provided flying
mechanics, and flying control blocks (e.g. that knew when to inject their
logic) you would save a lot of performance. They may not be able to have the
fastest server around, but given the things their users will use it for,
theirs will probably be faster than those efficient servers in those cases.

~~~
nly
Also, writing a plugin system that plays nice with threads is going to be a
pita.

~~~
SpaceManiac
This is the big one. Glowstone was designed to be a native implementation of
the Bukkit API (back when it was still on top), and I assure you that that
API, and thereby every plugin built against it, makes some heavy single-
threadedness assumptions.

Even if you conceive an API from scratch, Java hasn't the tools to prevent
plugin authors from doing things they shouldn't in this regard.

------
bgrohman
I just tried setting up a Glowstone server on a Linode instance. It was a very
quick experience. However, I ended up switching to the official Minecraft
server jar provided by Mojang when I realized that Glowstone doesn't support
the "allow-flight" option for flying in creative mode :/

~~~
mastercoms
You should be able to fly in creative mode.

~~~
bgrohman
Take a look at the Glowstone configuration docs here:

[https://github.com/GlowstoneMC/Glowstone/wiki/Configuration-...](https://github.com/GlowstoneMC/Glowstone/wiki/Configuration-
Guide#game)

It says for the "allow-flight" option that the default is "false" and it's
"Currently not implemented."

I tried setting it to "true" anyway, but it still didn't work.

------
grizzles
What's the best open source minecraft client? And how does it compare to the
official client?

~~~
perryprog
Here is an incomplete list:
[http://wiki.vg/Client_List](http://wiki.vg/Client_List)

you can read about the details by following the links for each client

------
cc33
Yes, I'm not really interested in gaming as of such, but that C code looks
amazing.

~~~
Kiro
What C code? I only see Java.

------
lance123
PLAY.MCPINOYZONE.COM

------
beavis2
Is Minecraft still a thing?

Have my kids (10,13) just grew out of it?

~~~
RenegadeEagle
Minecraft is still alive and well. Still has hundreds of thousands of players
daily every month on the servers. The problem is because there is a mobile app
now, people will just pay $7 and play on their phones. Therefore new players
arent entering the market.

It's a shame. Some of the things people have created for the MC community are
nothing less than truly amazing. For example

~~~
Kiro
> For example

I presume you accidentally posted too soon. Would love to see the example.

------
mabbo
I presumed for a moment someone had built a web server running off the
Minecraft redstone circuits.

------
astrodust
Great work, but...Java? Is this for compatibility with mods?

One of the biggest pain points with running a Minecraft server is the onerous
memory requirements. Java needs a ton of memory to get out of bed, and after
that it's not always pretty with how the allocator works. That's fine on an
enterprise server with 64GB of memory, but not cool when you're paying $10/mo.
per GB of memory for what should be an inexpensive hobby.

~~~
tylerhou
$10 per GB? That’s insane -- basically what high end DDR4 costs upfront.

~~~
mort96
It's basically what Digital Ocean's droplets cost:
[https://www.digitalocean.com/pricing/](https://www.digitalocean.com/pricing/)

$5/mo for 0.5G, $10/mo for 1G, $20/mo for 2G. All the standard droplets,
except for the 3G for $15/mo one, make you pay $10 more per gigabyte.

Both Vultr and Linode seem to offer twice the amount of RAM per dollar though.

~~~
TheRealPomax
They just added a $15/mo 6G plan, though, which is mighty nice.

~~~
mort96
No, it's just 3G for $15/month, so that one particular plan takes $5 per
gigabyte like Vultr and Linode.

That isn't to say it isn't a nice deal though.

