🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Best 2D game development library for C?

Started by
4 comments, last by TheChubu 7 years, 4 months ago

For my class (C Programming), i'm instructed to create a 2D game. Preferably some old school game like pong, snake, breakout, etc. However, i'm not sure what would be a good library for C. I've been looking for tutorials, but all i've found is C++. What is a recommended library? I'm using a Macbook Pro (xCode IDE).

Any suggestions is appreciated. I've seen SDL2 but only for C++ and not C. I understand that i can simply rewrite C++ to look and act like C, but for the sake of my sanity, i prefer something that is C specific only.

Thank You,

Jonathan V.

Advertisement
What is your source for the claim that SDL2 is C++ only? The website itself says otherwise.

SDL is written in C, works natively with C++, and there are bindings available for several other languages...


I would have said SDL was perfect for what you're looking for.

What is your source for the claim that SDL2 is C++ only? The website itself says otherwise.

SDL is written in C, works natively with C++, and there are bindings available for several other languages...

Yeah its for C but the tutorials i've seen have only been written in C++. My concern is finding a tutorial or some reference that is easier to follow over the documentation that can be a bit overwhelming.

What is your source for the claim that SDL2 is C++ only? The website itself says otherwise.

SDL is written in C, works natively with C++, and there are bindings available for several other languages...

Yeah its for C but the tutorials i've seen have only been written in C++. My concern is finding a tutorial or some reference that is easier to follow over the documentation that can be a bit overwhelming.


Last time I checked, the interface used in C++ is exactly the same as the one in C? Or is your concern that you want something written in idiomatic C?

What is your source for the claim that SDL2 is C++ only? The website itself says otherwise.

SDL is written in C, works natively with C++, and there are bindings available for several other languages...

Yeah its for C but the tutorials i've seen have only been written in C++. My concern is finding a tutorial or some reference that is easier to follow over the documentation that can be a bit overwhelming.


Last time I checked, the interface used in C++ is exactly the same as the one in C? Or is your concern that you want something written in idiomatic C?

Yeah i think i'm looking for a very specific tutorial in C. I do have another question, i just spoke with my instructor and she wants us to have the game inside of our school server. Where she can compile and run it. How can i include my project using SDL so that when she is inside the putty server, she can compile it and execute it. I dont want it to be console based but rather window based (GUI).

I'm having issues creating a game that will refresh in a console. I feel that a static window will be best, since the snake (Snake Game) will move more freely depending on input.

I suggest you best get used to not to find particular resources that use the exact combination of language/lib/platform/hardware you have.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

This topic is closed to new replies.

Advertisement