this post was submitted on 20 Jul 2023
1 points (66.7% liked)

Game Development

3425 readers
9 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 1 year ago
MODERATORS
 

Im wanting to create a game and have been doing some stuff with SDL2. What libraries do you guys recommend? Is there any that are better? GLFW? GLUT? SDL? For a little context it will be a desktop game. More than that hasnt really been figured out as i just wanna build and see where it goes.

top 7 comments
sorted by: hot top controversial new old
[–] ch0ccyra1n@emeraldsocial.org 2 points 1 year ago (1 children)

@nexusnovaz I generally like SDL, and would personally recommend it

[–] nexusnovaz@lemmy.world 1 points 1 year ago (1 children)

Thanks, do you have any particular tutorials or videos that you would recommend i watch?

[–] ch0ccyra1n@emeraldsocial.org 0 points 1 year ago (1 children)
[–] nexusnovaz@lemmy.world 1 points 1 year ago (1 children)

Yeah, ive been referring a lot to it. Just wanted to see if there were any videos as i prefer watching over reading but i have been using Lazy Foo's tutorial. But thanks, ill keep reading and seeing what i can find

[–] Redkey@programming.dev 1 points 1 year ago (1 children)

Just a quick heads-up: I've been working with SDL2 and OpenGL lately, using LazyFoo's tutorials, and there's a tiny point that could save you hours of head scratching. I e-mailed them about it but either they didn't read it or thought I was mistaken, because the page hasn't changed.

In the part where they talk about "SDL and Modern OpenGL", they use OpenGL 3.1, and make a very explicit note at the bottom of the page that you DON'T need to create a vertex array object, because that only became a requirement in OpenGL 3.2 and above. That appears to be correct according to the specification, but from my searches it lools like there is more than one OpenGL implementation/driver that incorrectly DOES require VAOs, even for OpenGL 3.1. If you compile the Lazy Foo example code and it mysteriously does nothing (it won't crash, it just won't draw anything), this might be why. It may be that all you need to do is add one line that creates a VAO in the initialization. Since the example code never changes any settings, you won't have to actually do anything with it.

[–] nexusnovaz@lemmy.world 1 points 1 year ago

Oh, i hadnt gotten that far yet, but ill keep that in mind. Thanks!

[–] kartoffelsaft@programming.dev 1 points 1 year ago

One library I've become very fond of using is Raylib. It has a ridiculously simple interface. If you just want to program a game and don't want/need the details of OpenGL/Vulkan/DirectX (which I'd suggest you do at some point anyways), then It'd be my pick.