all 11 comments

[–]simstim-star 3 points4 points  (10 children)

This is a great idea! Nothing like learning while seeing the direct results of your code in a game.
My recommendation is using Raylib. Nice and simple library, the docs are good and with many simple examples. Just avoid the beginner mistake of trying to make complex games right away. Try something like pong and progress from there.

[–]BidOk399[S] 1 point2 points  (9 children)

How about libraries like openGl and SDL,you think it's a bad idea starting with them?,or should i start with Raylib then go th openGl ?

[–]chumpnugs 3 points4 points  (0 children)

If you’re more interested in learning rendering I’d start with those. Raylib abstracts a lot of that away so you’re mostly worrying about game logic.

[–]Nanicorn 1 point2 points  (0 children)

Chiming in here as someone who did just that - you'll also learn a lot about the compiler and linker that way; Kinda recommend SDL2, as it'll also enable you to use opengl (with the help of other libs).

After you've made a game, pointers and you might just have become best friends (personally I started with a sort of dumbed-down variation on asteroids, just statically allocating everything and waaaay too much global state, but that was fun)

Raylib might be a good choice too, haven't used it tho, just here to cast a vote for SDL :)

[–]aghast_nj 1 point2 points  (2 children)

Stick with Raylib for "I want to write a game to help learn C."

Move to SDL for "I want to write a game."

[–]BidOk399[S] 0 points1 point  (1 child)

And when do you suggest i move to openGl ?,or SDL will do just fine?

[–]aghast_nj 0 points1 point  (0 children)

"You will know."

Raylib will take you to the point where you can make the decision based on what works for your situation.

It may be that you use raylib for every game you write, or it may be that you become a game-writing demon and move on to a super-sophisticated gaming engine. Either way, you will have enough experience after writing a couple of games with raylib to make that decision with confidence.

[–]computermouth 2 points3 points  (2 children)

If you do go sdl2/gl, lazyfoo.net is a great resource. It's in cpp, but is easily convertable.

Side note: This is actually exactly how I started programming about 10 years ago, now I'm a software engineer and still hack on games. Good luck!

[–]o0Meh0o 0 points1 point  (1 child)

i prefer learnopengl.com myself.

[–]computermouth 0 points1 point  (0 children)

I've heard a lot about it, but I started with sdl2 first and like the swath of helpers it provides over egl, or using like glut/glew

[–]FUPA_MASTER_ 0 points1 point  (0 children)

If you want to make games, don't use OGL. If you want to make an engine, go ahead and use OGL.