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?

Tramboi

Prophet
Patron
Joined
May 4, 2009
Messages
1,230
Location
Paris by night
Yes, and this discussion was not restricted to games
The Object Oriented Design book is for *games*.
Yes, and this discussion was not restricted to games

Your browsers are so big and slow I don't want to use them any more. I would use something far simpler and safer, but the Internet has been broken by bloat programmers.
What are you using right now to browse the Codex ?

OpenBSD's mitigations are running all the time. Users will find the bugs faster than one programmer.
Yes. And security researchers.

Also Rust has no spec:
True. Ada has one, though.

C has a spec
Doesn't OpenBSD use gcc (now clang) extensions (ergo non standard C) ? Didn't check but Linux sure has this "issue".
 
Self-Ejected

Davaris

Self-Ejected
Developer
Joined
Mar 7, 2005
Messages
6,547
Location
Idiocracy
OpenBSD had been using an old compiler for some time, because they did not like the new license, but they have caved in because there is no other choice. I can't say more than that, because I don't follow it that closely. I only use their system because I don't trust anything made by big outfits in the US any longer.

The only thing I am interested in is games.

I have seen people say, if someone says they use Ada they are outing themselves as a defense contractor. Are you an Ada user? Just curious.
 

Azdul

Magister
Joined
Nov 3, 2011
Messages
3,785
Location
Langley, Virginia
Also, there's much more to programming than relatively simple number crunching in tight loops (...)

And remember, it's abstractions all the way down. CPUs and assembly language are abstractions too. You could go and program FPGAs directly for ultimate speed instead of using some general purpose CPU.

You just need algorithm with cute little feature - 'nobody touch anything, stop the world till I'm done' - to find out that the speed of light and size of atom (transistor) are not abstract and very much a real thing, but countless cores, 4 levels of cache and smart optimizers are all lies.

FPGAs are weaksauce. You usually get no more than 800 Mhz for a large premium over mainstream Intel / AMD.

But if you have few millions laying around and can wait 12 months - you can go ASIC - and then the sky is the limit, assuming you're smarter than that von Neumann guy.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,649
The fellow that is making Jai said as a game developer, he was perpetually on the edge of bankruptcy because of the friction in C++.

Jonathan Blow. I thought he got rich making that one game, what was that.. anyway, I like him. In one of his best videos he was trying out a gaming keyboard, couldn't make it work and just threw it away, probably destroying it. I like that kind of thinking. First get a crappy product, then whine when you don't know how to use it and then break it. His adventure on creating a better than C++ language is on another level. But who knows, he could actually invent something new, it's always possible when a guy is as stubborn as he is.
 

ChaDargo

Arcane
Joined
Feb 19, 2018
Messages
425
Location
Texas
The fellow that is making Jai said as a game developer, he was perpetually on the edge of bankruptcy because of the friction in C++.

Jonathan Blow. I thought he got rich making that one game, what was that.. anyway, I like him. In one of his best videos he was trying out a gaming keyboard, couldn't make it work and just threw it away, probably destroying it. I like that kind of thinking. First get a crappy product, then whine when you don't know how to use it and then break it. His adventure on creating a better than C++ language is on another level. But who knows, he could actually invent something new, it's always possible when a guy is as stubborn as he is.

Braid?
 

d1nolore

Savant
Joined
May 31, 2017
Messages
721
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?
 

ChaDargo

Arcane
Joined
Feb 19, 2018
Messages
425
Location
Texas
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?

I'm curious about this myself. I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.
 

Catacombs

Arcane
Patron
Joined
Aug 10, 2017
Messages
6,158
I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.

Start with C. It'll teach you a lot of the fundamentals: data types, variables, conditionals, looping, functions, etc. Python can help with learning classes and OOP, should you need it.

Jonathan Blow. I thought he got rich making that one game, what was that..
The Witness.
 

Tramboi

Prophet
Patron
Joined
May 4, 2009
Messages
1,230
Location
Paris by night
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?

I'm curious about this myself. I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.

I think C and Racket will cover it for you, depending if you want to learn it from top down or bottom up. Python will be easy after that, and not that interesting.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,774
Location
down under
Codex+ Now Streaming!
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?

I'm curious about this myself. I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.

I think C and Racket will cover it for you, depending if you want to learn it from top down or bottom up. Python will be easy after that, and not that interesting.

I agree, just skip Python. You can always pick it up later if you need, but it's really nothing special.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,649
If you like procedural programming then you don't need C++ and classes. However... We have couple of decades of experience from game development where C++ slowly replaced C as de facto language, because it arguably is better for large scale programming. And often people write more or less C-style code in C++, but use classes as data containers, so it wont be that much different from C.
 

ChaDargo

Arcane
Joined
Feb 19, 2018
Messages
425
Location
Texas
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?

I'm curious about this myself. I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.

I think C and Racket will cover it for you, depending if you want to learn it from top down or bottom up. Python will be easy after that, and not that interesting.

What does it mean to learn "from top down or bottom up?"

I want to learn how to make a game engine and then make my own game. Would that be from the bottom up? And would that mean I should learn C or Racket?
 

Absinthe

Arcane
Joined
Jan 6, 2012
Messages
4,062
Just learn C. The bad habits you learn in higher-level languages because of their conveniences can haunt you for a lifetime. If you want to make a game engine, you cannot afford those bad habits.

The languages that focus excessively on making programming "easy" usually make the mistake of trying to hide a lot of what code does "under the hood" and trying to use all kinds of conveniences to make it unnecessary for you to engage with bothersome aspects like careful memory management or learning how pointers really work among other things. But then you get used to all of those ridiculous crutches (and the bugs and inefficiencies that can come from relying on them) and never learn how those crutches operate or how programming works without them, which means you end up writing shitty code without even knowing what you're doing wrong, and if you want to write a game engine, efficient and bug-free code matters a lot.

It's better to start with C and move on to higher-level languages as desired than the other way around, because this way you start off with a better grasp of the fundamentals of programming.
 
Last edited:

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,774
Location
down under
Codex+ Now Streaming!
The bad habits you learn in higher-level languages because of their conveniences can haunt you for a lifetime. If you want to make a game engine, you cannot afford those bad habits.

The languages that focus excessively on making programming "easy" usually make the mistake of trying to hide a lot of what code does "under the hood" and trying to use all kinds of conveniences to make it unnecessary for you to engage with bothersome aspects like careful memory management or learning how pointers really work among other things. But then you get used to all of those ridiculous crutches (and the bugs and inefficiencies that can come from relying on them) and never learn how those crutches operate or how programming works without them, which means you end up writing shitty code without even knowing what you're doing wrong, and if you want to write a game engine, efficient and bug-free code matters a lot.

This is so wrong on so many levels... Don't listen to this guy.

C is useful to learn, but it's essentially a glorified cross-platform assembler, not much else.

If anything, higher levels of abstractions, automatic memory management and safe language semantics (e.g. avoiding mutations and manual handling of concurrency) results in fewer bugs, not more.

Some higher level language constructs are almost impossible to handle correctly with manual memory management (e.g. closures). But even with complex object graphs, you will eventually end up writing your own half-assed GC algorithm that walks the object graph etc.

Ideally, you'd learn C just to have an idea about what the machine is doing, and something high level to know about the possibilities. The order doesn't really matter, but I'd say go for the high level language first, like Racket (it will be much more fun, and if you end up just learning a single language, it's better if it's a high level one).

Also, "game engines" is a big topic. AAA rendering engines, yes, they are written in C++ (because of industry inertia and a lack of vastly better alternatives, not because those devs all really love C++). But for non-AAA games, especially if not 3D, I'd say C/C++ is overkill nowadays, you're just complicating your life for no real benefit.
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,769
What are you guys thoughts on python and C#? How about html5? For a intermediate level hobbyist?

I'm curious about this myself. I'm torn between Python, C, and Racket. I can't learn them all at once and I'm pretty much a beginner. It's very difficult to figure out where to begin.

I think C and Racket will cover it for you, depending if you want to learn it from top down or bottom up. Python will be easy after that, and not that interesting.

What does it mean to learn "from top down or bottom up?"

I want to learn how to make a game engine and then make my own game. Would that be from the bottom up? And would that mean I should learn C or Racket?
You sound like the target audience for a youtube series called Handmade Hero, where a competent developer writes a game from scratch in C.

I would argue that most people should use an existing engine if their goal is to produce a specific game, and not to learn graphics programming. That route essentially increases your dev team to include engine and tools developers that don't talk to you.
 

Absinthe

Arcane
Joined
Jan 6, 2012
Messages
4,062
This is so wrong on so many levels... Don't listen to this guy.

C is useful to learn, but it's essentially a glorified cross-platform assembler, not much else.
essentially a glorified cross-platform assembler, not much else.
You are a fucking idiot. I can return the "This is so wrong on so many levels... Don't listen to this guy." assessment right back at you right here. You're obviously biased against C if you try to downplay it that much.

If anything, higher levels of abstractions, automatic memory management and safe language semantics (e.g. avoiding mutations and manual handling of concurrency) results in fewer bugs, not more.
If you're manually handling shit, the bugginess is obviously contingent on how well you write your code. If you are shit, it's tons of bugs. If you are properly good, zero bugs. Relying on automatic garbage collection (ie. regularly scanning memory for what's no longer being used and removing it) is easily inferior to manual memory management when it comes to efficiency because with manual memory management you tell the program to remove the memory the moment it is no longer used instead of having a garbage collector (which is in and of itself overhead) and waiting for it to get around to it (until it does, the memory that outlived its purpose sits there, wasted), and not understanding memory management is a great way to get memory leaks. Certainly, if you never aspire beyond mediocrity, you will praise all the handholding convenience you can get. Regardless, my point is only that learning by relying on crutches to handle problems for you results in writing shitty code. The problem isn't that you have to do shit manually, but that you should understand how these things work so you can keep that into account when you write code, or you will end up writing shit logic that is buggy and inefficient.

I'm not saying you have to program in C either. Only that it makes a better starting point since it forces you to learn and engage with a lot of things that higher level languages do not. If you do not see the value in that, that says a lot about you.

Some higher level language constructs are almost impossible to handle correctly with manual memory management (e.g. closures). But even with complex object graphs, you will eventually end up writing your own half-assed GC algorithm that walks the object graph etc.
This is basically whining that lower-level languages are bad because they aren't higher-level languages. You do shit differently in C. If you want higher-level bells and whistles on top of your C, go write C++. lambda support is right there. Or use some other language if you love automated garbage collection so much (which is frankly overrated and in C++ you can just use RAII), knock yourself out. But if your complaint is "I don't like writing C-style logic so when I try to hamfist methods from higher-level languages into C it gets awkward therefore C is a shit language" then that says more about you than C. Right now you basically went into the realm of bitching that C is not an object-oriented language as a reason why C sucks, and odds are your problems originated with you learning shitty habits in a language that isn't C and being unable to break them when you started writing C and trying to force those concepts into it.

So no wonder you hate C so much and rage that it's just a "glorified cross-platform assembler" (as bone-headedly wrong as that statement obviously is). You obviously had shitty experiences trying to use C with programming concepts C is not designed for.

Ideally, you'd learn C just to have an idea about what the machine is doing, and something high level to know about the possibilities.
I actually agree with this, except I'd like to note that C is in fact a high-level programming language. It's just that compared to the ridiculously high-level languages that are around nowadays more recent programmers have taken to calling it a low-level one. Certainly, compared to most of what is used now, it is on the lower-level side of things, but strictly speaking "low-level" refers to assembly and the like.

The order doesn't really matter, but I'd say go for the high level language first, like Racket (it will be much more fun, and if you end up just learning a single language, it's better if it's a high level one).
I'd say the order obviously does matter. Case in point: You. You clearly started on a higher-level language and then got frustrated moving to C where you had to do things more manually. It's better to work your way up from C than the other way around.

Also, "game engines" is a big topic. AAA rendering engines, yes, they are written in C++ (because of industry inertia and a lack of vastly better alternatives, not because those devs all really love C++). But for non-AAA games, especially if not 3D, I'd say C/C++ is overkill nowadays, you're just complicating your life for no real benefit.
Nice attempt at shitting on C++. There are real reasons why people prefer to program game engines in C++ though. In particular, it's good at mixing lower-level and higher-level methods of doing things, which is fucking important because in a game engine there are plenty of times when you need a segment of logic to run as fast as possible (because performance matters in videogames and the difference in efficiency can be massive when you manually optimize) and other times when you may prefer high-level features.

But it's true that if performance is not a concern you can do fine without using C++.

Anyway, Rincewind is obviously biased against C and C++ and has likely had poor experiences from trying to use them the wrong way, so take his comments on this topic with a solid grain of salt.
 
Last edited:

vlzvl

Arcane
Developer
Joined
Aug 7, 2017
Messages
208
Location
Athens
This thread has (still) the most confusing title ever
Which programming language did you choose and why?

:lol:
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,774
Location
down under
Codex+ Now Streaming!
You are a fucking idiot bla bla bla...

Mostly all wrong again, mate. Look, I'm not entering a "programmer's dick measurement contest" with you. For the record, and that's where most of your assumptions are wrong, I started with assembly on C64/Amiga/x86, then learned pure C much later, C++ even later, then gradually moved to proper high level languages, etc. And that was like 30+ years ago. I used to work on commercial C projects as a pro dev, so I know what I'm talking about. And yeah, I used to be a shortsighted "real men use only C" type of guy too, and probably past me would be pissed off of my above comments, just like you are now :cool:

Some words of advice: don't get too attached to programming languages, they're just tools. Your problem (which was my problem too in my "use C or go home" days), is that you're identifying with a piece of technology. They're just tools, and that's about them. They're not an extension of you. The more tools are in your toolbox, the better -- hard to argue with that. Again, this is not a contest, but based on your writing you're simply not in a position to judge the merits of different languages, because you're just not too familiar with them, otherwise you wouldn't have written what you did.

Anyway, broadening your horizons would do you some good. So you can do that, or be the same guy I was, for whom it took 10+ years to realise there's life outside of C :cool: And when more experienced people told me essential the same advice I'm telling you know, I gave them the same bullshit as you... :D So maybe it's pointless, but some people might actually listen and learn something from this, who knows. I'm just trying to offer a shortcut to newcomers, so they'll waste less time, overall. My advice still stands: learn C, and learn some LISP/Scheme (the order doesn't matter that much, but as I explained, I'd advise people to learn some LISP/Scheme first).

In closing, here's a "riddle" for you: imagine someone who is clever enough to write a LISP in pure C, which is clearly as high-level a language as it gets. Why did he do it? For one, he's really good at C, so he can't be an "idiot", can he? :cool:

Peace brother.
 

PrettyDeadman

Guest
And yeah, I used to be a shortsighted "real men use only C" type of guy too, and probably past me would be pissed off of my above comments, just like you are now :cool:
To be honest you still kinda look like an arrogant shortsighted guy, just with a different set of ideas. Noone argues here that c/c++ are the only useable languages or that they are the only language for real developers, just that they are still useable in modern environment, which is a pretty level-headed and non-offensive opinion. You on the other hand seem to intentionally take a stand with a controversial opinion just to prove that you are smarter and more experienced than everyone else, at least this is how it looks like on a glance. A shame since your post otherwise seems to be pretty knowledgeable and interesting.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,774
Location
down under
Codex+ Now Streaming!
Noone argues here that c/c++ are the only useable languages or that they are the only language for real developers, just that they are still useable in modern environment, which is a pretty level-headed and non-offensive opinion.

Oh but that's not true! Read the past 1-2 pages please :) In my view you got things mixed up and actually I'm the level headed guy who's saying C/C++ has their place, even though they're a bit shit :) Peace.

Having said that, everybody's entitled to their viewpoint :)
 

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