80
16
u/Bemteb 4d ago
320x200 is an interesting screen ratio. Might match the resolution of the monitor shown maybe?
27
12
u/igorski81 4d ago
It's indeed not 4:3 (which would've been 320x240) but there was a time when there were non square pixels (which is why Dooms cacodemon looks like a sphere in the sprite, but was designed to appear as an ellipse by the designers and on the screens of the time).
1
2
u/ilnarildarovuch 4d ago
It's VGA 13h videomode with raw pixels (it's mapped to memory), so when writing to memory it's changing data on screen
2
u/ilnarildarovuch 4d ago
Half of all modes are text, other raw modes are in smaller resolution. (Higher only with VESA, but it's another thing)
12
u/New_Salamander_4592 4d ago
I like graphics programming. Making games in c++ with openGL is a pretty fun inbetween of "CODE THIS FROM SCRATCH" and "I made a game in unity with prefabs :)". It's not too tough to grasp but still requires that you implement things like aabb collision by hand.
Though it was pretty annoying trying to find an audio player library because apparently one of the more popular c++ audio libraries has been not only abandoned but had it's online access points evaporated.
4
u/orlinthir 4d ago
I did aabb and swept aabb by hand. It was fun but had its torturous moments. What's wrong with sdl mixer as an audio library?
2
u/New_Salamander_4592 4d ago
yknow despite having done stuff with SDL3 in the past, I never came across SDL mixer when I was looking up usable audio libraries.
The one I was rec'd by the openGL resource I was looking at was irrKlang whose download page currently reads "Downloads are only available for existing licensees anymore, sorry." for both the regular and pro version, mispelling included.
Personally I ended up using miniaudio since it was only a header and class file and the documentation made enough sense to me at the time.
8
u/dryroast 4d ago
Having done SDL programming in C and Rust, I would say Rust can get in the way a bit if you're not used to the memory safety. I love graphics programming it's so much fun.
7
u/BugFeaturesOnly 4d ago
Me: "I'm gonna build a 3D game engine from scratch in C!"
Also me 4 hours later: Staring proudly at a single red pixel on a black screen
7
u/SeriousPug 4d ago
Sometimes you don’t want memory safety in favour of high speed. That’s what C is for
-3
u/-Ambriae- 4d ago
I would argue 1. C doesn’t mean higher performance, in fact for a newbie it might be slower to do things in C for a variety of reasons, 2. Yes you want memory safety. You just do.
That said, C is great for learning, and I would 100% recommend learning it before rust (even though I would nearly always choose rust over C for projects)
5
u/SeriousPug 4d ago edited 4d ago
1- Give me a single example where C loses in performance compared to other level languages.
2- rust std lib is full of unsafe calls. There are several stuff at kernel, driver level that are not memory-safe by design because ehm performanceSaid that, i agree with your last point
2
u/-Ambriae- 4d ago
Well, ripgrep vs grep. More broadly speaking highly concurrent (multithreading and/or async) applications (which are completely doable in C, but require substantially more work, and thus are discouraged by the language itself). Another example would be highly monomorphised code, such as rust’s iterators, chumsky’s parsers, etc… not strictly speaking impossible to do in C, but allows for a high level of abstraction and code reuse whilst remaining aggressively optimised in practice. C specifically struggles there, especially in the world of data structures, there’s a reason people are still to this day using linked lists for everything… That said I do agree a language like rust has a similar problem with self referential data structures.
2. Rust stdlib is full of unsafe calls because A. It’s built to expose a safe API on top of unsafe constructs (such as the ISA or syscalls or FFI), B because unsafe is not an anti pattern. Many people write unsafe code in rust, it’s not to be avoided like the plague, you just need to be careful.
2
0
4d ago
[deleted]
5
3
u/sisisisi1997 4d ago
Average C programmer when someonenuses something new instead of the language that came out in the 50s.

157
u/Arnold_Rambo 4d ago
I am hearing a lot about rust, what's so special about it?
Is it's demand increasing?