Jump to content
  • Advertisement
Sign in to follow this  
JonathanAVazquez

Best 2D game development library for C?

This topic is 567 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. 

Share this post


Link to post
Share on other sites
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. Edited by Oberon_Command

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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? Edited by Oberon_Command

Share this post


Link to post
Share on other sites

 

 

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!