Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Which programming language did you choose and why?

Joined
Dec 17, 2013
Messages
5,339
Btw, that's another beautiful thing about Python that a lot of people don't appreciate, the ability to switch between procedural and OOP on the fly. A lot of OOP languages force you to use classes in every instance, which is completely unnecessary, and in fact makes it harder to code, as you have to think about what class to put some clearly procedural code into. Meanwhile purely procedural languages like C completely miss out on the advantages of OOP. In Python, just use whatever is the best approach, procedural code goes into functions, reusable code goes into classes, perfecto.
 

Gammer

Learned
Joined
Jul 21, 2021
Messages
358
Location
The End
you can write OOP in pure C with a few custom types and v-tables, you can also write c++ without defining any classes
 
Joined
Dec 17, 2013
Messages
5,339
If you could write OOP in pure C, they wouldn't have created C++, eh grandma? There is a lot of shit you can do with some duct type, doesn't mean the language supports it.
 

Cerulean

Cipher
Joined
Aug 29, 2015
Messages
808
Not disagreeing, but I think this is interesting... Python is never used for the core of the engine (that's almost always C/C++ as a far as I know), but Python has been used before for game logic:
https://en.wikipedia.org/wiki/Category:Python_(programming_language)-scripted_video_games

I recall Eve Online used a variant of Python called "Stackless" which was used for a ton of that MMO's logic.

Anyway, it's probably a lot more common to use Lua now.
https://en.wikipedia.org/wiki/Category:Lua_(programming_language)-scripted_video_games
 

tomphonse

Literate
Patron
Joined
May 11, 2024
Messages
42
Location
New Zealand
Enjoy the Revolution! Another revolution around the sun that is.
I mean there are some itch io projects I am sure made using pygame. But lets just say that in SoftEng majors related to GameDev python isn't taught at all except for explaining basic programing fundamentals, although a lot will prefer to actually start with C/C++. There is a split on whether its better to learn more simple and abstract higher level languages and then move on to lower level and vice versa. Also there are no game dev related job listings using python save for Generative AI stuff.

In terms of scripting Lua is king and in terms of high-level languages that are higher than C#/Java most would go with Javascript over Python and make it in the browser. JS Has way more game related libs than Python
 
Joined
Dec 17, 2013
Messages
5,339
Godot, the game engine, uses a scripting language that's basically Python with better multithreading support. The syntax is Python.

For the morons pushing the idea that C supports OOP, again, if it did, why would C++ become a thing? Just because you can hack something together in some language, doesn't mean it supports that something. It's like tacking a plane engine onto a Prius and claiming it's a racing car.
 

Sweeper

Arcane
Joined
Jul 28, 2018
Messages
2,989
I ain't know shit about programming, but I do know, if Porky is arguing a point just automatically agree with whomever he's arguing against.
 

tomphonse

Literate
Patron
Joined
May 11, 2024
Messages
42
Location
New Zealand
Enjoy the Revolution! Another revolution around the sun that is.
People aren't choosing or not choosing to use Python because of its syntax. Syntax is not what matters.
People don't use python because it's incredibly slow and there are few game and rendering related libraries and frameworks for it.
GDScript using a similar syntax to Python doesn't mean anything, it has no relation to its underlying systems such as performance, garbage collection etc.
 
Joined
Dec 17, 2013
Messages
5,339
Well, listen, people used to say all that about Java too, and then Notch made a game in Java and sold it for 2.5 billion dollars to Microsoft. Meanwhile code-monkeys like you keep plugging away at some autistic shit.
 
Joined
Dec 24, 2018
Messages
1,816
People aren't choosing or not choosing to use Python because of its syntax. Syntax is not what matters.
I'll be honest I find Python's syntax garbage enough that I wouldn't use it even if I was in the market for some lightweight scripting type thing.
 

Yuber

Educated
Joined
Aug 17, 2023
Messages
114
I did not choose the language for game making. In my education we used Java so that's what I have been using.
But after 3 games I am getting bored of it and want to try new things so I will try C++ next.
Just need to find something similar like libGDX for C++.
 

baboogy

Literate
Joined
Dec 22, 2023
Messages
43
Just need to find something similar like libGDX for C++.
RayLib is probably the most popular lightweight games library right now.
If you want to go even more barebones though there is SDL2.
Agreed, raylib is a solid pick if you want to just get up and running with the essentials. GUI good enough for prototyping, OpenGL wrapper with texture/model support, camera support out of the box, audio, file management, mouse/key/controller input, etc.

Very easy to set up, build, and start throwing something together. The API is self evident enough that you don't have to waste time on documentation, just grab the cheatsheet and get started.
 

Cerulean

Cipher
Joined
Aug 29, 2015
Messages
808
For what it's worth, I make it a habit of checking job sites like Indeed about once a month or so. There's the big five: C/C++, Java, JavaScript, Python, and C# for the Microsoft shops... and after that it drops off a cliff. Anybody who says you need to learn Rust, or Go, or whatever, they're wrong. It's the big five languages that put food on the table.
 

Not.AI

Learned
Joined
Dec 21, 2019
Messages
318
Erlang (or c++). Use those 96 cores. Use those 128 cores.

Comment. I'm impressed this thread is still going. Religious arguments are long.

Starting to play a bit more with Godot. Yeah python-likes make me sad. But the engine is pretty good.

Also less pleased with Go over time, always falling back to c++ in the end.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom