2020-10-31 13:19:49

i understand python is significantly betterr than bgt, but in the skeme of thing, python is slow. why don't developers use languages like Java which run a lot faster than python.

One of the lead developers of the Final Hour audio game, currently in beta.
https://finalhour.lowerelements.club

2020-10-31 13:23:44 (edited by ogomez92 2020-10-31 13:24:09)

Python's very good for a lot of things, I never used it for games myself but don't make the mistake of saying that a language isn't good because its slow. I've used python a lot at work lately, it's really good when it comes to data science and machine learning.

ReferenceError: Signature is not defined.

2020-10-31 13:39:38

agree with @2
it has great features. comparing to those, slow is just a peace for me. that's why i love python and i use python, and, and, um i don't know what to say now. i love python

if you like this post, please thum it up!
if you like to see my projects, feel free to check out my github
if you want to contact me, you can do here by skype. or you can follow me on twitter: @bhanuponguru
discord: bhanu#7882

2020-10-31 13:59:19 (edited by CAE_Jones 2020-10-31 14:02:37)

Having tried both Java and Python, Python is just better for games. Java comes with better geometry than you can get from Pygame, and better 2d graphics, and both have extensive 3rd party libraries... But the things you have to do to get good and distributable games from Java are more troublesome (particularly for the end user) than the equivalents for Python. In addition, programming with Python is much easier, and your packages and exception handling, etc, are not overly elaborate series of needlessly verbose class and package names with two lines of content that could have fit into a couple Python functions.

That said, Java does have several features that I prefer, and I do like me some free java.awt.geom (or whatever they replaced perfectly functional stuff with since I abandoned it for BGT and Python). But Java's whole "it's cross-platform!" selling point fails in practice, and speed is irrelevant for all but the edgiest of edge cases. Are we doing complex real-time 3d rendering, particle effects, simulations, or giant servers with absurd numbers of operations per second? If not, we don't need to worry about the speed differences among programming languages.
One speed-relevant application for audio games would be 3d audio, and you'll find that 3d audio libs are in C++ and called through dlls anyway, rendering the high-level language calling them moot.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2020-10-31 14:36:06 (edited by Dragonlee 2020-10-31 14:43:45)

python is slower than Java, just as virtually all interpreted language are compared to compiled ones, however a lot of the time you don't care whether your program finishes a task in 10 ms or 100ms, but the fact the program automates a task for you that manually takes you 30 minutes to do.

personally, most of the time I use python for automation and there is a really good reason I use it and not Java.
1. writing a simple program in python is way way faster than in java. literally just write a single file and then run it.
2. Java really sucks for short running programs that you typically envoke from a command line because of latency

the latter point is due to java being a just-in-time compiled language, meaning when you envoke a java program, it actually needs to warm up by compiling the java byte code to the platform's native machine code. so for such programs python will actually give you better performance anyway.

edit:
also two other reasons many programmers choose python over java is its relatively cleaner syntax and the fact python is dynamicly typed whereas java is statically typed.

many programmers just don't like static typing and so just prefer a language like python. personally I love static typing, although I have to say Java's type system is aweful and probably a major reason why a lot of programmers are put off by static typing in general, even though it is technically superior when combined with automatic type inference like it is in Scala, typescript, Haskell, Elm, and others.

lastly, this issue isn't black and white. most programmers end up using different languages for different things. so it isn't uncommon for a programmer to use both java and python.

2020-10-31 16:56:56

Something something doesn't matter something something audiogames don't need speed anyways something something.

2020-10-31 17:10:45

Yeah I mean, pretty much.  Speed in audiogames just isn't necessary.  Shades of Doom was written something like 15 years ago and ran fine on low-end machines and audiogames basically haven't advanced since then while computers have gotten something like 1000 times faster, so it just doesn't matter anymore.  Use the slowest language you can find and you'll still be fine.

My Blog
Twitter: @ajhicks1992

2020-10-31 20:25:53

Hell, we can even run nice audiogames on smartphones, remember papa sangre? Maybe you like accessible hangman? I'm making another game now, and it uses a lot more audio than my 2 previous games, and it runs perfectly fine on my mom's iPhone 7.

ReferenceError: Signature is not defined.

2020-10-31 21:17:55

People seem to have a sense of anxiety around the percieved "speed" of Python, but as with many things it depends on a number of factors. Generally speaking, Python isn't slow, most programs rely on support libraries that are often written in more heavily optimized lower level languages anyway, and with any kind of programming what kind of performance you get really depends on implementation and optimization, regardless of language.

Granted, Python is better for some things than others from an effort standpoint, but thats also true for any language. In much the same way that you wouldn't use python for writing lower level CPU code, the same is said for writing higher level code with Assembler or C. Most programmers usually end up learning and using more than one langauge based on their needs, Python just happens to be a good place to start and branch out from.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2020-10-31 21:37:04

For some perspective, I use 3 at work.  On the same day even.  Rarely 4.  Work has 6 total that I can think off offhand, but I think there's some Lua somewhere, so it's probably 7, and if we count the sdks that we rarely have to touch and the couple things that only one or two devs ever deal with, it's somewhere around 10.

In a professional capacity, it's very hard to get below two on the same project if only because anything that's going to use the browser has no choice but to use JavaScript.

Languages solve specific problems, especially nowadays when making a new one is only ever done to solve a specific problem anyway, since there's so many general ones.  Python is just a good, neutral choice.  Not the fastest.  Not the most expressive.  Maybe not even the most productive for a particular problem.  It's like buying an oven vs that weird thing for pealing boiled eggs.  No, the oven isn't going to do much to help you with your boiled egg problem, but you get way more out of the oven and can peal the egg with your fingers.  Go the other way and there's no way you're having chicken for dinner.  Only one of them gives you a super functional kitchen.

My Blog
Twitter: @ajhicks1992

2020-11-01 16:24:52

Lol, it feels like we have this discussion at least once a month.

2020-11-01 18:51:17

@11
Yes, we do.  And it's going to keep happening until people stop trying to use BGT first, then realize that it's a dead end because you can't even get it past antivirus.

My Blog
Twitter: @ajhicks1992