Hacker News new | past | comments | ask | show | jobs | submit login

"A customer will not know or care if you are using Ruby, Go, PHP or any other language as long as what you have written is performant and is fit for purpose (which all modern languages are)."

Where games are concerned I'd tend to agree (though Minecraft was built in Java and was TERRIBLE for the first couple of years, now look at it).




These days, Java is on the faster side of languages in common use. At least it wasn't written in JavaScript or Python!


You can make fine games in Python. See Eve Online: https://community.eveonline.com/news/dev-blogs/stackless-pyt...


> Minecraft was built in Java and was TERRIBLE for the first couple of years, now look at it

Well, it still takes absurd amounts of memory for what it's doing, which I guess is on par for Java. (On my notebook with 4GB RAM, modpacks fall into one of three categories: "works well", "have to shut off as many OS services as possible before starting" and "forget it".)


4GB? I wouldn't expect most open world games to perform well with 4GB. I think 2010 was the last time I had a laptop with less than 8GB. My current laptop has 16GB. Game developera and certainly mod developers don't optimize for bargain basement hardware.


> Well, it still takes absurd amounts of memory for what it's doing

Does it though? There's a non-trivial amount of data being loaded (and generated) all the time.

You have mentioned modpacks. Those can be HEAVY. And a single not well programmed block can bring down and entire server.


comparing minetest (a c++ minecraft clone) and minecraft gives the following memory usage upon starting on a blank new world. Also, minecraft takes five times more time to launch.

  smem  | grep mine 
   5728 jcelerier minetest                           0   433136   439287   466348 
   7044 jcelerier java -jar /usr/share/minecr        0   691476   708501   753948


well only because java has no value types/struct like data structure.

the reason why this makes memory so heavy is because even a simple int list, needs boxing. So you end up with a big chunk of garbage which you don't need. On the server, this is not a problem because most of the time the list is a young gen object and die really fast, so G1GC solves most problems. The problem of course is really big, because arrays are a pain to work with and not many people do that.

However as soon as java 10 hits, we might get value types and maybe this changes the game (but we will see, since it would've taken way to long for that thing). Also there are more and more types inside the standard library who would be great value types, i.e. LocalDate/LocalDateTime, but at the moment they take way more memory than needed, especially since they only contain 2 immutable shorts and 1 immutable int.. in the perfect case it would be something like 8 byte, however it takes way way way way more. (basically a simple class at least takes 16 bytes, which is already double the field size, so you end up with 24 bytes [probably more due to various other stuff])

btw. for a game like minecraft you probably have a lot of types that follow the same stuff like LocalDate, small class with immutable int's/short's for position, etc. these have the same problem and will fill the memory more quickly than needed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: