Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Discord Now Fully Linked With 420chan IRC

Java versus Python

Reply
- Mon, 31 Jul 2017 22:09:34 EST ddyPydmV No.37128
File: 1501553374819.jpg -(49279B / 48.12KB, 559x254) Thumbnail displayed, click image for full size. Java versus Python
If I'm interested in programming simple, 2D games, which language am I better off with? Perhaps Python is the answer? It seems to be good for making simple games due to its pygame program. On the other hand, Minecraft is programmed in Java and is a great game.

What does /prog/ think?
>>
Thomas Hottingfuck - Tue, 01 Aug 2017 02:54:32 EST cR7sUKFo No.37129 Reply
1501570472742.jpg -(63422B / 61.94KB, 640x490) Thumbnail displayed, click image for full size.
I would recommend you use Java because it is more akin to industrial standard languages than python is.

If you can pick up Java, Python will be piss easy.
Same is true the other way around, just not as much so.

BUT MOST IMPORTANTLY MORE IMPORTANT THAN WHATEVER LANGUAGE YOU DECIDE TO PERSUE:

You are not locked into that language. You can do other things. You can learn different languages. You can be AnonOfCode
>>
James Callerwodging - Wed, 02 Aug 2017 14:12:18 EST 9QSfnS0r No.37131 Reply
For simple 2d games you'd actually should have a look at processing, it has been made for this kind of stuff and just feels like programming a retro home computer.

Don't try to write games in java unless you already are proficient in it for other purposes. Using unity and c# may sound like overkill for something simple but you sure as hell would be faster than using freakin java.
>>
Hannah Gablingdale - Sun, 06 Aug 2017 08:20:25 EST Ybduti9u No.37137 Reply
I had the exact same question. Didn't answer that completely but turn out that pyglet and pygame are piss easy to use, while in java there is just a lot more boilerplate code but maybe with more possibilities with low level stuff (?? Didn't look into that much, probably you'd have more luck with c++ with low level shit like memory management)
Plus pyglet and pygame are both easy to get started with as well as possible to do advanced stuff with. For 2d games they are pretty much complete, in the end you only need images to "blit" into the window, math for collision detection, physics, 2d depth effects (if you wanted), plus basic shapes like lines, circles or rectangles. OOP should probably take care of the rest, which python is completely capable of. I'm not an advocate of OOP but for game programming it fits very well.
>>
Ebenezer Nollystone - Sun, 06 Aug 2017 18:05:27 EST gLfws0AG No.37138 Reply
>>37131
>For simple 2d games you'd actually should have a look at processing,
Yeah no, unless you want to code a pong or something extremely simple like that. It's very barebone and very slow. It's good as a pure learning experience (like bouncing squares around or whatever), but you'll probably want to switch to something else fairly quickly.

Java is fairly fast if you use an OpenGL binding like LWJGL, that's what Minecraft does. Performance is "similar" to a C++/OpenGL game speed-wise. It's also hard to do stuff the wrong way since there isn't that many ways of doing something in the first place, unlike Python. The language can get very verbose, but this is not really an issue if you use Eclipse.

I wouldn't recommend Python as a beginner because you'll most definitely use the language wrong. It can get very slow if you don't know what you're doing. This probably won't matter for whatever you will be doing, though. You will get results faster, but you won't learn as much.

I guess it depends on your abilities as a programmer.
If you don't know shit about programming then processing might be a good start.
If you programmed a few things but want to delve into game-programming big time then Java/LWJGL would be OK. Or even C++/OpenGL. The amount of things you will have to learn will be overwhelming at first, but it will definitely be worth it in the long run. It's standard and these kind of technologies will still be around for a looong time.
If you have some experience and just want to play around with shapes/colors/motions etc then Python/Pygame would be great. Python is more of a scripting language for me, I'm sure you can make great commercial games with it, but the bar is lower than with other languages.

Don't use unity or unreal because all you'll learn is either unity or unreal. You can literally drag'n drop FX from a store into your game, use visual programming for gameplay, etc. This sounds great on paper (and it is) but you'll never learn anything that way. You're a programmer, not an artist.

I never liked Python and I wrote my first game in Java so I'm pretty biased.

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.