Why gamedevs still using this programming language??
>>730641921Good morning saar.
>>730641921Because it gets you low enough level to do things you couldn't do otherwise while also not wasting your time like going all Chris Sawyer and coding in assembly or something.Factorio for instance would not be able to be anywhere near as efficient as it is if were made in an engine or in python or something.>>730641971It's not C# dumbass
>>730642332what can C++ do that Python can't? I'm a codelet
>>730641921It's fast
>>730642383Computers run on assembly instructions (they don't it's actually uops down to binary gates but ignore that).Assume assembly is the ultimate goal.Handwriting assembly would be the fastest if you know how to and had the time because it's very verbose compared to languages that compile down to it. Assembly actually is just numbers (bytes) that a processor knows what to do with but usually an assembler is used which converts the assembly text representation to the actual bytes.Example:add eax, ecx ; same as eax += ecxYou want as few of these individual instructions as possible and depending on available scheduler ports available the order in which you do these may matter.C++ compiles down to actual assembly and can optimize extremely well for what's mentioned above. Python is dynamic so instead of compiling down to the assembly it compiles to an emulated assembly which then is in actual assembly so there's always a layer of emulation and slowness between. Some functions in Python can call to native C++ functions and between the strict input and output set it can optimize because it's just calling a native C++ function.
>>730642383C++ runs faster and lets you manage memory directly. Python is slow and generally a bloated memory hog.The two major upsides to Python are that it's significantly more readable and can easily use massive third party libraries.You could code a game entirely in Python, it'd just have to be smaller in scope.
>>730641921Most popular languages in 2025>Python>C>Java>C++>C#>Javascript>Visual Basic>Delphi>Perl>SQL>Fortran>Rust>Matlab>PHP>Go>ScratchPick your poison
>>730643526>Handwriting assembly would be the fastest if you know how to and had the timeFor clarification, anon is saying assembly is the fastest at run time, not the fastest to code, and while assembly is incredibly efficient, the tradeoff is that different architectures require different assembly instructions. Higher level languages like C/C++ allow someone to code across different types of processors with the same syntax.
>>730641921C++ is a mess but the sad part is no other language is as powerful and low level in the modern sense as C++.
>>730641921because it's an established language that despite being shit has plenty of resources for doing things with it.
>>730644312>assembly is the fastest at run timeAssuming no pathological cases in your code. If you write something in C++, compilers get you several man-centuries of optimization for whatever garbage your write, the speed of assembler is all up to you.
Can you really call yourself a real game developer if you haven't written your own programming language with a compiler?
>>730641921no real reason. the good libs are all in C and any language worth a shit has decent C FFI.
>>730642383python will be fixed soon. there adding rust to the c version of python.
>>730641921Because it's fastest and it actually works comparing it to anything else. Java - works but still jeet lang.C# - meme.Rust - troon meme lang it's more broken then C absolutely useless it caused even recent outage of internet.
It's OK to be brown. Just kidding, no it's not
>>730644696ok esl
>>730644767literally rent freeget help
>>730641921this is all you need, everything else is bloat and therefore useless.
>>730644306Where is Dart?
>>730644964Nobody uses Shart
>>730644907If you're going to read K&R, you should at least read the 2nd edition.
>>730644964Position 26https://www.tiobe.com/tiobe-index/
>>730644306where's cobol
>>730644907>>730645029Is there any real non-meme reason to use C over C++?
>>730644907Yeah, you also don't need to take a shower everyday.However, if your cute little brain can understand the lifetime of variables, C++ smart pointers will halve the amount of memory management code you're writing, and the rest of the program can still be 1488% pure C.I don't even want to know how painful must life be without templates. If you're afraid of choices, just be honest about it.
what does the C mean?
>>730645174It's the successor to B
>>730644306C + Lua
>>730644306What game is written in Visual Basic?
>>730645148cringe
>>730645174https://en.wikipedia.org/wiki/B_(programming_language)
>>730645148vased
>>730645101Probably some industry standards and sheeeit.Otherwise, 99% of C can be done in C++, and then you can just white/black-list C++ features.
It's been 5 years since I last coded in C++, but I have a few game ideas I want to prototype.So naturally I'm brushing up by reading the OpenTTD source code.I've spent most of my career coding entirely in jython so it's a bit of a paradigm shift...Anyone have any decent tips or guides not written by jeets?
>>730645101like >>730645262 said, if you do coding for industrial applications (aka not being a filthy neet), it's going to be either C or ladder logic.
>>730645295Condensed experience on what to do and not to do from the language creator himselfhttps://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
>>730645101making libs that can be called from other languages
>>730645101if you want to use the restrict keyword
>>730644306Call me brown, but C# any day.
>>730645101making globalists seethe eternally
>>730645378Neat, thanks.
>C#>it's nothing like C>it's actually javaWhat DID they mean by this???
>>730645617Brown.
>>730642332What's wrong with C#?I'm currently taking a uni class about it since it's required, and it's very similar to JavaIs it a /g/ thing to hate on it?
>>730644306C++ or C# both are pretty intuitive for me.
>>730645852a lot of unemployed people have strong opinions on programming languages for whatever reason.
>>730645926I think they get lost in the sauce. 99% of end users dont give a shit if you're doing something fancy on the backend, so long as the application works.
>>730645852There's nothing wrong with C#, people just shitpost about it because it's stereotypically used by a lot of Indians.
>>730645852Largest problem with C# for game dev is garbage collection and how allocations are handled. There's a reason object pooling is a standard practice with Unity.
ive tried learning c++ before and i hated iti get its a 100 year old language built to work on grandmas dentures, but in the year of our lord 2020+6 i see no reason why there needs to be 30 different types, each with their own unique casting paths that could just be one type like in any "modern" language.i wish there was a alternative that wasnt rust or just c but again and different
>>730645852C# is comfy but microsoft has a weird tendency to provide 50 frameworks for the same shit and give them all the same fucking name.
>>730644306God I hate python so fucking much you have no ideaWhoever came up with the idea of using whitespace instead of brackets for something that isn't running on fucking punchcards needs to be executed
>>730646118It forces people to keep their code nice & easy to read though.I actually really like python. The only time it's caught me out is that calling .isnumeric() on a string will return FALSE if the number has a decimal or a negative sign (i.e "-1.0")
>>730645245What does B mean?
>>730646336be random
>>730646297I can also just keep my code clean myself without it throwing errors if I don't do it exactly the way it wants me to
>>730646336>didn't even read three sentences into the article
>>730646336just B urself
>>730646738>B's origin is its advancements take its name away from Z>the improved version of B goes backwards?????????fuck these faggots
>>730646872sometimes, you just do something because you find it funnythere's no real significance to the names anywaysrelax
>>730646336sHE beLIEveD
>>730642383Runs several orders of magnitude faster, for a start.(I’m not shitting on Python here - you need to understand that different languages exist to fit very different purposes)
>>730642332>factorioLMAOOOOO That 2D ass game with ugly graphics could run on any pc kekking rn C++ doesn't do anything for it
>>730646987holy fucking retard
>>730642383largest differences comes down to how c++ is a compiled language while python-esque languages are interpreted/semi-interpreted. Python is great for prototyping, you can execute code as written without waiting for the whole compile process, but that comes with a performance cost.
>>730642383Python runs an interpreter that uses C++/Rust libraries, so it's a lot slower and you don't really have the features of C++/Rust. Like you can't write a driver with python even. There is no replacement for C++/Rust. It's low level, which is required for any application to even run and even the OS to run. This is why you're going to get paid a lot of cash for C++, but not for C#, because C++ is fundamentally required for practically everything if you strip away support structures like the net framework, virtual machines (java, python), etc.Programming languages are tools. You have to weigh the pros and cons yourself for your project and use case. If you're doing short term quick data analysis, then you're going for python because it has very fast prototyping, but you're not going to rely on it where you process terrabytes of data where your interface makes a 100x difference if its written in c++
test
>>730647128>he thinks writing a bunch of words a different way makes huge differences in performanceLOOOOOOOOOOOOL
>>730647462it's no fun if you don't even pretend to try
>>730641921Because there's no real alternative other than Rust, which is a very good language in general, but game devs tend to heavily dislike it since it doesn't allow you to quickly prototype and test things out, often requiring refactors to get something done.
>>730642383Increase dev time. People will be making millions while you’re still figuring out which pointers point where
A good example is BlenderIt's coded in python, It's highly accessible to make plugins and addons for, and to update as freewareBut then Blender then absolutely fucking sucks at repetitive tasks through no fault of the devs but just by how python is - Blender will shit the bed when there are too many vertices on the screen, and take a bajillion hours longer than professional competitors not coded in python or java or some other unoptimized language to render or process tasks.
tl;drLanguages at a lower level like assembly / C (not in terms of difficulty just in terms of program architecture) is generally much more time consuming and your product is far more efficient (if coded well) for it. Shit is also harder to update and add features to and the more multifunctional your program is the more shit is likely to break and harder to keep the same level of integrity.Coding at a higher level is generally easier, faster, more accessible, easy to build upon etc etc. You can pump out dozens if not hundreds of apps and programs in these coding languages in the time it takes to make one program in lower level coding where you're doing things like allocating and managing the memory.
>>730647632Rust blows for the game design part of gamedev because while runtime performance is potentially fast, its compile times are shiiiiiitttttttttYou'll have to constantly wait over 10 seconds for it to compile shit even if you just changed one variable, which is why Rust projects only use Rust on the technical engine end of things, and then integrate a scripting language like Lua for the actual design part of the game so you can tweak numbers on player and NPC stats without having to recompile everything
>>730644306PH Game Dev master here