pouët.net

Go to bottom

Is C++ the most used programming language to make PC demos?

category: code [glöplog]
 
Hello,
Currently, is C++ the most used programming language to make PC demos? (is it the same when it comes to 4K or 64K intros?)
Is it better to learn C or C++? Or another language?
added on the 2020-06-12 15:25:43 by UnlkA0 UnlkA0
visit sizecoding.org, learn x86, start coding tiny intros ;-)
added on the 2020-06-12 15:45:22 by superogue superogue
+1 :D
WebGL & Javascript is quite popular nowadays.

What comes to visuals in modern demos then learning GLSL or other shading language is more the way to go. C/C++ etc are mainly for "orchestrating" the demo/intro. I'd personally opt for Rust if going to a language like C or C++ but it's really up to your preference.
added on the 2020-06-12 16:06:00 by waffle waffle
...but to answer the question, yes, C++ is the most commonly used.
added on the 2020-06-12 16:11:58 by Gargaj Gargaj
Btw is there some place to find statistics about what technologies are popular in demoscene productions? ...without actually downloading a lot of them and checking what they contain :)
added on the 2020-06-12 16:20:46 by waffle waffle
Is there an interest to learn C language intead of C++? (I don't know why, and there is no reason for that, I always had in mind that C was faster than C++. I'm certainly wrong)
added on the 2020-06-12 16:32:15 by UnlkA0 UnlkA0
in modern PC demos the "heavy lifting", most of the visuals, are done by using GPU. Shading languages like GLSL are used for GPU stuff. Performance wise it doesn't really matter that much if you use C, C++, Python or anything else you prefer.
added on the 2020-06-12 16:38:25 by waffle waffle
C is not faster than C++. Also, what waffle said.
added on the 2020-06-12 17:32:21 by Preacher Preacher
C is not faster than C++, it just introduces a different programming paradigm (objects) ... whether your intro/demo engine would benefit from coding plain "functional" C or from using OOP depends on what you wanna do. e.g. for resource management etc in a demo engine, using objects can be quite nice.
C# and Unity!! Let’s goooo!
added on the 2020-06-12 17:46:24 by MuffinHop MuffinHop
We use C and glsl for everything inside the demo and python for everything outside the demo (tools, minifier, ...)
added on the 2020-06-12 19:33:56 by NR4 NR4
Learn assembly first. It will open your eyes on how dumb all other languages are. And as RE I will tell you that C++ is real abomination among them. I've seen some wicked shit...
added on the 2020-06-12 19:38:44 by dex46... dex46...
ASM FTW. :P
added on the 2020-06-12 21:09:29 by AntDude AntDude
UnlkA0: Why don't you use your old account, toms?
added on the 2020-06-12 21:18:49 by havoc havoc
https://benchmarksgame-team.pages.debian.net/benchmarksgame
added on the 2020-06-12 21:57:09 by rutra80 rutra80
You can also code demos in Qbasic. LOL
added on the 2020-06-14 10:40:58 by Optimus Optimus
PowerBasic was quite popular for a while... ;)

Also, not sure what "most used" actually means - many productions are reusing libraries and engines over and over again, and self made or adapted/extended tools are common, too.

Note that there actually is something where C can be remarkably faster than C++: Compilation times, as C is way simpler than C++ and resolving all those zero-cost abstractions (heavy template use, compile & link time reductions) can quickly eat up a lot of memory and cpu time.
added on the 2020-06-14 11:06:07 by T$ T$
UnlkA0: just use the language you have the most fun with. If it's C++, then go for C++. If it's Java or Javascript or Rust or pure Assembly, then go for it.

The language you use it not important in the end, you will always find a way to access the hardware through some wrapper/api/lib.
added on the 2020-06-14 16:10:31 by keops keops
I guess some some high end PC demos also use the CPU the best they can while the GPU is working. If your ambition is only to push commands to the GPU, then yeah, no matter what language you want to use. But if you want the CPU to do something too (e.g. non-parallelizable algorithms), then don't go for Java or Python, choose C, C++ or Rust.
Also, you can go with Unity/C#, or even Unreal Script. That's the best way to get awesome results with a minimal programming knowledge, even a good way to beat experienced programmers.
added on the 2020-06-15 22:23:31 by Soundy Soundy
The mind is the best procedural generator
added on the 2020-06-16 11:50:23 by Optimus Optimus
People would be surprised how many demos have been, and sometimes still are made in Free Pascal (and/or Delphi). So yeah, basically just pick anything you like, or have experience with it and go for it.
added on the 2020-06-16 13:03:06 by Charlie Charlie
About 4k coding. It seems like the best results can be achieved with assembler. If you know what you're doing. That means how to produce code that the packer will crunch best, and that means that your code will look more or less crazy.

You can go for C / C++ for that but the people doing assembler (+knowing what they're doing) seem to have an advantage e.g. more content in 4k.

Learning GLSL/HLSL may give you almost everything of the 4k code anyways, common 4ks render only a fullscreen triangle and do everything you see in a pixel shader, on that triangle. But many 4ks do more, like post processing the graphics and other stuff, which takes a little more space.

Synths like 4Klang / Oidos and a minimal part of "normal" code do the rest.

A good point to start is https://www.shadertoy.com/ and finding a minimal set of code to display a fullscreen triangle using a shader from there.. I would prefer C for that triangle code, but maybe there are other languages/compilers which produce better crunching code aswell.

I hope you find your way through the options.
added on the 2020-06-18 05:12:29 by mad mad

login

Go to top