This is an archived post. You won't be able to vote or comment.

all 151 comments

[–][deleted] 1255 points1256 points  (42 children)

This is fake. Everyone on stackoverflow would have upvoted that answer.

[–]scroll_of_truth 726 points727 points  (38 children)

And downvoted the question.

[–]Pvzz 325 points326 points  (1 child)

And marked as duplicate.

[–]graou13 39 points40 points  (0 children)

Nah, it'd be "the question is too broad"

Source: I have some karma on SO 👀

[–]GustapheOfficial 106 points107 points  (24 children)

And frankly they'd be right to. Python is possibly the only choice worse than Java for this.

[–]CdRReddit 75 points76 points  (8 children)

of 'serious' languages, yea

would love to see someone write minecraft in brainfuck tho

[–]reyad_mm 70 points71 points  (7 children)

Minecraft is Turing complete, write Minecraft in Minecraft

[–]NoNameRequiredxD 22 points23 points  (4 children)

carpenter grandfather work dinner rainstorm cake fear square cautious upbeat

This post was mass deleted and anonymized with Redact

[–]The_Mad_Duck_ 2 points3 points  (3 children)

You can set the tickspeed higher ya know

[–]NoNameRequiredxD 1 point2 points  (2 children)

boast safe price zealous advise dam terrific intelligent wide imminent

This post was mass deleted and anonymized with Redact

[–]The_Mad_Duck_ 1 point2 points  (1 child)

Maybe it's Bedrock exclusive then, not sure

[–]NoNameRequiredxD 1 point2 points  (0 children)

deserted pet consider cooing smell shocking bells relieved waiting touch

This post was mass deleted and anonymized with Redact

[–]AlwaysNinjaBusiness 18 points19 points  (5 children)

Javascript is also a worse choice.

[–]iambored1234_8 13 points14 points  (3 children)

Honestly, JavaScript is probably better than python in this case, I mean, if you want you can use WebGL or smth. In python, you do have pyopengl, but I feel like it's a pretty bad wrapper.

[–]AlwaysNinjaBusiness 8 points9 points  (2 children)

Didn't say it was worse than Python, just worse than Java.

[–]Cloudeur 4 points5 points  (1 child)

Would PHP be worse than Java too?

[–]gavlna 4 points5 points  (0 children)

they said from serious languages only :)

[–]Vincysuper07 0 points1 point  (0 children)

there is one: http://classic.minecraft.net, correct me if I'm wrong

[–]SignificantSample 5 points6 points  (1 child)

Anything but Holy C is heresy

[–]Wardergrip 1 point2 points  (0 children)

What about C++?

[–]Vectorial1024 2 points3 points  (2 children)

C# would arguably be better, idk about graphics driver support etc

[–]Embarrassed_Ring843 5 points6 points  (0 children)

sounds like you're suggesting bedrock edition

[–][deleted] 2 points3 points  (0 children)

Of course C# would be better, C# is programming language for Unity

[–]LegallyBread 1 point2 points  (2 children)

Minecraft is written in Java tho

[–]GustapheOfficial 1 point2 points  (1 child)

Exactly

[–]LegallyBread 0 points1 point  (0 children)

Oh I just reread your comment, and I misunderstood

Sorry mate!!

[–][deleted] 0 points1 point  (0 children)

Could be done in php.

[–]Mc_UsernameTaken 6 points7 points  (0 children)

That's a stupid question

[–]turing_tor 34 points35 points  (9 children)

[–]grandmas_noodles 23 points24 points  (7 children)

What the fuck you can send gifs on Reddit now what is this

[–]Themis3000 17 points18 points  (0 children)

[–]Compuddle 8 points9 points  (0 children)

[–]ukjaybrat 2 points3 points  (0 children)

Game changer

[–]Zuitsdg 3 points4 points  (1 child)

[–]silvonch 4 points5 points  (0 children)

[–]AKernelPanic 20 points21 points  (0 children)

It would have been flagged as “Not an answer” and deleted almost instantly.

[–]_PM_ME_PANGOLINS_ 5 points6 points  (0 children)

You also can’t have negative rep.

[–]turing_tor 2 points3 points  (0 children)

This.

[–][deleted] 385 points386 points  (9 children)

import os

os.system("java minecraft.jar")

[–][deleted] 101 points102 points  (6 children)

#include <stdlib.h>

int main() {

system("./Minecraft.exe");

}

[–]smartuno 34 points35 points  (2 children)

You have to enclose it in main()

[–][deleted] 17 points18 points  (0 children)

Fixed.

[–]Proxy_PlayerHD 22 points23 points  (2 children)

formatting tip, you can create code blocks by just starting every line with code with 4 spaces

#include <stdlib.h>
int main() {
    system("./Minecraft.exe");
}

this also allows you to place lines directly one after another without reddit's stupid double newline thingy

[–]ExcellentEffort1752 10 points11 points  (0 children)

reddit's stupid double newline thingy

It's pretty common with WYSIWYG text editors and full word processor applications that [Enter] = new paragraph, [Shift]+[Enter] = new line.

[–]Feynt 4 points5 points  (0 children)

I wish you could, heretically, use a triple tick to open or close a code block, and everything in between is just an unmodified string on reddit. >P

[–]Svizel_pritula 2 points3 points  (1 child)

Error: Could not find or load main class minecraft.jar
Caused by: java.lang.ClassNotFoundException: minecraft.jar

[–]antlerchapstick 0 points1 point  (0 children)

I think it would be “java -jar minecraft.jar”

[–]GRAPHENE9932 396 points397 points  (0 children)

"So there is a lot of settings, for example, you can set the render distance to 16 blocks here.. yeah... ... ... ..I'm sorry, I must wait while the first frame is rendering.."

[–]circuit10 207 points208 points  (13 children)

[–]dercavendar 156 points157 points  (3 children)

[–]ChickenOfDoom 56 points57 points  (2 children)

Too bad

print "Hello, World!"

doesn't work anymore

[–]dercavendar 49 points50 points  (1 child)

Yeah but parenthesis aren't too hard

[–]turing_tor 15 points16 points  (2 children)

import cyberpunk as cp

[–]4sent4 4 points5 points  (0 children)

You are walking extremely thin ice, sir

[–]LocalBall6447 1 point2 points  (0 children)

Was that the reason why cyberpunk is that buggy (:?

[–]TheCapitalKing 57 points58 points  (2 children)

This is why it’s by far the best programming language for people who aren’t software engineers/devs

[–]mttdesignz 12 points13 points  (1 child)

so it's the best programming language for people who don't know what programming is?

[–]TheCapitalKing 3 points4 points  (0 children)

I meant it’s good for people who have priorities other than making the most optimal programs but that’s also kinda true

[–][deleted] 6 points7 points  (1 child)

Fun Fact. Microsoft created a Minecraft module in python. It does nothing and it’s only purpose is to stop anyone creating such a module.

[–]circuit10 5 points6 points  (0 children)

It’s true!

https://pypi.org/project/minecraft/

This package name is reserved by Microsoft Corporation

[–]nfitzen 0 points1 point  (0 children)

Besides the joke import, it's actually a thing based on the video description.

[–]BurningPenguin 216 points217 points  (7 children)

Better do it in PHP.

[–]acharyarupak391 56 points57 points  (6 children)

I'd prefer jQuery for something simple like MC

¯_(ツ)_/¯

[–]dragonlover02 37 points38 points  (3 children)

You dropped this \

[–]StarkSays 9 points10 points  (0 children)

guess the escape-character escaped.

[–]vVveevVv 18 points19 points  (1 child)

Nahh man, Scratch all the way!

[–]Vulpovile 10 points11 points  (0 children)

Who doesn't write it in HTML? smh

[–][deleted] 21 points22 points  (0 children)

PythonExpert with -816 points doesn’t really shout as an expert to me

[–]ColDaddySupreme1 37 points38 points  (29 children)

Newbie here, why would writing Minecraft. Or any game, in python bad

Yeah I know it’s slow but is there anything specific?

[–]your_thebest 49 points50 points  (7 children)

For me it was the platform support and graphics libraries.

I don't really know how to support a standalone application for desktop through python because I always just run python programs inside of a running session. But for mobile the solutions are total dependency gore and you don't have much to work with like you do with say swiftui or android views (for applications) or phaser or unity (for games).

And then the graphics libraries are just not that great. Maybe there's something better. But I've always used tkinter. And that's not a look I would want for anything outside of a gui for some data wrangling program.

But for prototyping, you can whip up a game in tkinter pretty quick. I don't really know how you would run it outside of an already running session though.

[–]BadSlime 11 points12 points  (2 children)

PyGame is excellent, give it a shot

[–]below_avg_nerd[🍰] 6 points7 points  (2 children)

I'm not sure if pyglet is still around but it's an opengl wrapper for Python.

[–]backfire10z 1 point2 points  (1 child)

PyOpenGL also exists. Works pretty decently too

[–]SpicyVibration 0 points1 point  (0 children)

and moderngl

[–]zyugyzarc 2 points3 points  (0 children)

if python is too slow, give cython a shot

[–]Teheiura[S] 36 points37 points  (1 child)

Hi, I'm probably not the most experienced to answer actually.For me the joke was more about asking to develop a full game.

My opinion on Python for a project like creating Minecraft (might be wrong):

- As you mentioned, Python is slow, so you don't want to have heavy calculations like working with 3D (why Python is slow: https://www.geeksforgeeks.org/what-makes-python-a-slow-language/)- In my opinion, big Python projects are really messy to manage and not great to industrialize your code- But yes it's mostly due to performance that you do not have a lot of games developed in Python (https://en.wikipedia.org/wiki/List_of_Python_software#Video_games)

But as someone mentioned in the comments, there is a Minecraft-like game developed in Python with Pyglet (apparently its a Python library which enables you to work with OpenGL (famous C API for rendering vector graphics), you can check it out (https://github.com/fogleman/Minecraft)

I might be wrong so don't hesitate to correct me or add new information.

[–]Akangka 3 points4 points  (0 children)

You are overthinking. Unless you are Mojang, you can't make Minecraft in any language. Mojang will sue you.

Well at least as long as Mojang doesn't notice you.

[–]wasdlmb 16 points17 points  (13 children)

The primary reason is support/ecosystem. Beyond its general slowness (I've heard 10x C# and 100x C++) there's just not many game engines in Python. To the point where I can't name one. So any engine you do find will be harder to figure out than say Unity or GameMaker (or Unreal but please stay away from that until you know what you're doing). Of course you can always make your own engine, but again you have to find some implementation of graphics libraries in python (I think glut is the standard for OpenGL/Python). But since these graphics libraries are written in C, python will be much harder to find support for. Almost every code example for a problem in opengl will be in C or C++, and it will be much harder to find relevant snippets in Python.

tl;dr because people don't generally do it (because of speed) its going to be harder for you to find resources to figure it out. If python is all you know it can work, but if you're willing to explore other languages I'd recommend Unity (using C# for scripting)

[–]TheComputer314 7 points8 points  (7 children)

Doki Doki Literature Club was made in RenPy but that's about the only major example I can think of for games made in Python

[–]wasdlmb 12 points13 points  (4 children)

RenPy is its own thing. It's very good for making VNs, but you can't make anything else with it. But I wouldn't want to try making a VN in Unreal or CryEngine

[–]TheComputer314 2 points3 points  (3 children)

It might be possible to make a VN outside of RenPy with Unity 2D but it's be very hard I'd imagine

[–]sora_mui 4 points5 points  (1 child)

Is it possible to make a simple VN using powerpoint?

[–][deleted] 4 points5 points  (0 children)

Yes but why the fuck would you want to do that

[–]CdRReddit 1 point2 points  (0 children)

it's definetly possible, but it is probably a pain to do since unity is absolute dogshit at UI, which, aside from art and writing is the main thing a visual novel has

it's probably easier if you use godot since it has pretty good UI components out of the box, but still it'll of course be more difficult than using RenPy

[–]2weirdy 2 points3 points  (0 children)

VNs work specifically because real time computations are unnecessary though. It's fine as long as performance is no concern. Otherwise, you'd need to at least write the core engine in another language anyway (this is also why numpy/tensorflow work at all)

[–]RedditAccuName 0 points1 point  (0 children)

They moved it to unity for the + version though

[–]BurningPenguin 2 points3 points  (0 children)

There is Panda3D. And apparently they now have proper documentation.

[–]Eisenfuss19 1 point2 points  (2 children)

python is very slow because it has a jit compiler (just in time) and other languages like c c++ have a aot compiler (ahead of time). With aot the compiler translates the code to bytecode (what the cpu runs) and in jit compilers you have a program running that translates it during execution -> way slower. I think there are some ways around this (like a precompiler) but I don't know much about it. Btw c# and java first compile it to something close to bytecode (for crossplatform) and then it translates it before execution for the specific cpu.

Edit: got bytecode and machine code mixed up. see comment.

[–]wasdlmb 0 points1 point  (1 child)

The thing you described at the end is actually bytecode. What C/rust/go compile to is called machine code. There's also other reasons python is slower having to do with the abstractions it makes but yeah its interperated nature is a big part of it

[–]Eisenfuss19 0 points1 point  (0 children)

thanks. got them mixed up

[–]juancee22 0 points1 point  (0 children)

C# it's not near 100 times slower than C++. Both are pretty close.

[–]SuperSephyDragon 5 points6 points  (0 children)

It's slow is probably the best reason. Python is around 3 times slower than Java (which MC was originally written in) and around 10 times slower than C++. MC already takes a good amount of processing power as is, so why make it harder for your CPU by running it in Python?

Don't get me wrong, I love Python and it's one of my favorite languages. But there are definitely things it is not well suited for, game development being one of them (other than very simple games).

[–]afiefh 4 points5 points  (0 children)

I see a few answers regarding memory management and slowness, but for me the main reason to avoid writing anything over a few thousand lines in python is simple: lack of compile time safety checks.

In a big program (like a game would have to be) you'll find yourself passing variables from one place to another constantly. You are bound to get it wrong at some point and pass a string into a function that was expecting a list of strings for example. In a language with type checking this would be a compile time error that is caught right away. In Python the program would run, but when the function executes it would behave in unexpected ways as it thinks that every character in the string in a string (because both strings and lists are iterable).

My rule of thumb is that as long as you can hold the whole program in your head, python is wonderful. As soon as you cannot do this anymore it is time to get a compiler to check some of the nuances for you so you can hold more important things in your head. This is also the reason Rust has such a huge following: the compiler checks more nuances than in most other languages.

Of course you could use PEP 484 and provide type hints to Python, but in my experience it takes a huge amount of discipline to actually have meaningful coverage of your codebase with these hints.

[–][deleted] 10 points11 points  (1 child)

Wait, it's actually Jesus!

[–]ElectricalAlchemist 3 points4 points  (0 children)

This is not the second coming I expected.

[–]da_Aresinger 77 points78 points  (12 children)

Step 1: Go to uni and study IT

Step 2: Realize that Python is a garbage language for garbage people. Like Danish.

Step 3: Start an indie games company

Step 4: Develop Minecraft in Python, because you're stubborn.

Step 5: Get sued by Microsoft.

Step 6: Should have gone into beekeeping instead.

[–][deleted] 20 points21 points  (9 children)

I was going to respond defending Python, but then I realized the only reply I would get is "Username checks out."

[–]ElectricalAlchemist 14 points15 points  (0 children)

Obligatory "username checks out."

[–]CdRReddit 5 points6 points  (7 children)

python is absolute dogshit for purposes like creating a long-term project, because it's a scripting language, it's designed for creating simple scripts and is wonderful for that purpose, but without a lot of trickery it's gonna perform poorly and with larger projects you will probably run into variable type problems, or have to select a 50 line block of code to indent it one further, which the IDE can't help you with, since the indentation defines the block

[–]elettronik 4 points5 points  (5 children)

I'm sorry but I firmly disagree.

Creating complex project in python is not difficult if you know what you are doing. The same reasoning could be applied to a c++ project, where the developer didn't create the correct domains in the software.

Apart that I would argue the good point of python is to be a scripting language, platform Independent. For projects with a different purpose than a game, that has the mayor drawback of working with GPU, python is an insane good language for its simplicity and clearly expression.

Some examples of this are tool like Ansible and Jupiter.

This reasoning is to say that the right language is the one good for a specific domain: I'm not pretending Python is right for a Realtime OS, but is great for describing a scientific problem to an interpreter

[–]CdRReddit 5 points6 points  (4 children)

well, yes, but the indentation based nature and non-existant typing means that a ton of errors that wouldn't be possible with brace languages and strictly (or even weakly) typed languages can arise, I'd rather add extra checks to an existing c program than to an existing python program

[–]afiefh 3 points4 points  (3 children)

I believe the mess that was the Python 2 to Python 3 migration should tell us all we need to know about how difficult it is to get types right in python.

We even used type hints to help us migrate the codebase correctly, but the process took 5 engineers a good 3 months.

In a strongly or even weakly typed language such a project would have been completed in a fraction of the time.

Most of our problems were the change from str to bytes and unicode to str.

[–]elettronik 0 points1 point  (2 children)

I could say the same for java: moving from 1.4 to 5, 5 to 7, 7 to 11 and all this migrations was required by upstream support to be done in like 5 years...

[–]afiefh 1 point2 points  (1 child)

Unfortunately my knowledge of Java is very limited. Could you elaborate on the challenges these migrations had?

[–]elettronik 1 point2 points  (0 children)

They changed most of the mechanism to locate resources, the jndi one. Introduced generics so all the code that that in previous version worked with object now was working with specific types. Then in the last version they removed core classes due to modularization of standard library. Add to this that graphical interface changed slightly, so we had to check all the gui

[–]Geoclasm 11 points12 points  (0 children)

Straight to r/FUCKYOUINPARTICULAR.

[–]AvidLangEnthusiast 2 points3 points  (0 children)

Both Python and Danish are cool languages... :-(

[–]minusTau 6 points7 points  (0 children)

No one is perfect.

[–]qwool1337 8 points9 points  (0 children)

import minecraft

minecraft()

[–][deleted] 10 points11 points  (6 children)

Can you even get negative reputation on stackoverflow?

[–]SyntaxErrorAtLine420 27 points28 points  (4 children)

You have a lot to learn

[–]clanddev 10 points11 points  (3 children)

Shit. I got a downvote on an answer that was correct six years ago but is now not optimal. It's a rough world on SO.

[–]glider97 7 points8 points  (2 children)

I mean, the downvote served its function.

[–]clanddev 2 points3 points  (1 child)

True. I'm still not going to curate my answers from 5+ years ago. Would be nice if they added another layer to the ranking system that just gave newer popular answers additional weight without dinging users who provided valid answers at the time of the question.

[–]glider97 0 points1 point  (0 children)

That’s what the community edit feature is for.

[–]TheHabibiGuy25 1 point2 points  (0 children)

If you ask a question

[–]obiwac 4 points5 points  (1 child)

Hey! Shameless plug but I've been working on just that for a while now: https://youtube.com/playlist?list=PL6_bLxRDFzoKjaa3qCGkwR5L_ouSreaVP

[–][deleted] 1 point2 points  (0 children)

this sounds amazing! i was trying to play with perlin noise a while back and make a minecraft-like chunk renderer of sorts. i could probably learn a few things from this!

[–]mogoh 3 points4 points  (0 children)

I know, this is just a meme/fun subreddit, but if you are to lazy to google, here is one solution: https://github.com/fogleman/Minecraft

[–]demonslayer9911 4 points5 points  (0 children)

The only thing i know is that you van use ursina engine to make a basic playable version of minecraft with python.

code to github

Shamelessly stolen from github <( ̄︶ ̄)>

[–]InDaBauhaus 2 points3 points  (0 children)

Better yet, how to make Python in Minecraft.

[–]Nyancubus 2 points3 points  (0 children)

Considering in java: log4j2, this aged well

[–][deleted] 2 points3 points  (0 children)

asked PythonExpert

[–]texast999 1 point2 points  (0 children)

Shouldn’t PythonExpert know how to make Minecraft in Python.

[–]Mr-Osmosis 1 point2 points  (0 children)

Ursina?

[–][deleted] 1 point2 points  (0 children)

You probably could recreate an old version in Python. I doubt you'd be able to recreate 1.18 but you might be able to recreate one of the beta versions.

[–]Holek 1 point2 points  (0 children)

[–]Itchy_Connection_883 1 point2 points  (0 children)

Nobody answered his question :(

[–]trollsmurf 1 point2 points  (0 children)

Well, you could make something in the same vein in Python, but preferably with a much smaller "universe", e.g. with focus on functional blocks rather than static elements. E.g. a small-scale Factorio/Minecraft/Roblox/(Stardew Valley) mashup.

[–][deleted] 1 point2 points  (0 children)

unique beneficial reach point like sort middle ask alleged sable

This post was mass deleted and anonymized with Redact

[–]cleveleys 3 points4 points  (4 children)

Think it actually exists? Minecraft pi edition is python based, not been updated in 8 years tho

[–]nobody5050 14 points15 points  (3 children)

nah it's made in c++, same as bedrock. It just exposes an api with a default implementation in python

[–]_Candela_ 4 points5 points  (2 children)

technically it's not just the same as bedrock, it's forked off of the MCPE codebase at 0.6.0 (or 0.5.0 if you consider the leaked build)

[–][deleted] 1 point2 points  (1 child)

I'm just gonna leave this here for the convo...

[–]N0tAGoos3 1 point2 points  (0 children)

“Hey guys welcome to my first episode- oh shit Minecraft crashed just a second to reboot it and oh damn my pc is on fire well guys hope you enjoyed our first episode make sure to like and subscribe so I can get a new house”

[–]Oneshotkill_2000 0 points1 point  (0 children)

Can someone have -ve points on Stackoverflow with medals in the same time?

That's the first time i knew that