Sign in to follow this  

C++ Graphics Library

This topic is 812 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

Hey everyone! I wanted to start working on some more hobby projects. I was thinking about recreating some classics like Galaga, Breakout etc. I am trying to decide what would be a fun C++ library to use for this. I've used Allegro 4 in the past so I am considering Allegro 5. I've heard good things about SDL so I was also considering that. I could use an engine like UE4 but I feel like that's a bit much and I'd like to have less hand holding. I am trying to improve my knowledge of C++ mostly.

 

It's a tough choice to figure out what to play around with so I was hoping to get some advice. Even suggestions I haven't mentioned would be appreciated.

 

Thanks guys!

Share this post


Link to post
Share on other sites

Isn't cairo a vector font rendering system? DeFessler: if you would like to finish a game instead of prototype it for ages I'd kindly recommend Unity 3D :) With C++ you will focuns only on the mechanics/features not on the game in 99% of time. And there is a great probability it will never get done. With Unity you will have your game finished in notime but also get richer for the experience that a coder is not a game producer because you will run out on levers or excitement.

 

Did you try SDL or Alegro and the other stuff? I wish you all of luck in your project.

Share this post


Link to post
Share on other sites
It can do that too, among other things. While I have read a bit about it in the past I have not actually used it so far. The closest analogue in a nutshell is probably "something like Windows GDI" independent of any OS. That includes different output devices (a simple memory bitmap, a PDF, an OpenGL texture which was created by rendering into a framebuffer, ...). Edited by BitMaster

Share this post


Link to post
Share on other sites

Isn't cairo a vector font rendering system? DeFessler: if you would like to finish a game instead of prototype it for ages I'd kindly recommend Unity 3D smile.pngWith C++ you will focuns only on the mechanics/features not on the game in 99% of time. And there is a great probability it will never get done. With Unity you will have your game finished in notime but also get richer for the experience that a coder is not a game producer because you will run out on levers or excitement.

 

Did you try SDL or Alegro and the other stuff? I wish you all of luck in your project.

 

UE4 uses C++ for game code so I don't think that statement is exactly correct.

Share this post


Link to post
Share on other sites

It can do that too, among other things. While I have read a bit about it in the past I have not actually used it so far. The closest analogue in a nutshell is probably "something like Windows GDI" independent of any OS. That includes different output devices (a simple memory bitmap, a PDF, an OpenGL texture which was created by rendering into a framebuffer, ...).

EAWebkit uses cairo interally to render the webpages/uis you load with it out to a bitmap you can use for your rendering pipe.

Share this post


Link to post
Share on other sites

Cairo is a drawing library.  You'll still need some kind of context for rendering, like say libSDL2, so you bitmaps will appear on the screen (unless you only want to target a particular platform, say Win32 -- which is still your context, but you're going to have to manually set up and tear down everything instead of have libSDL2/SFML/Allegro do it for you).  Also, you'll need to consider more than graphics because without audio or input, all you've got is a silent movie.

Share this post


Link to post
Share on other sites

I haven't tried SDL at all but I have used Allegro 4 a long time ago. Since then Allegro 5 has come out but I figured I'd evaluate my options and see what would be cool to play with. At the moment it's more about learning C++ than it is about making games. I have a pretty strong grasp on C++ already and I've worked in web development using frameworks like Backbone and Marionette for a couple years now. I do want to learn C++ so that I can work at a company that makes games but I like the language a lot.

 

Thanks for all the suggestions; SFML looks interesting. I think I'll give that a try and if I don't like it I might give SDL a go but I think SFML might be what I am looking for.

 

Thanks again!

Share this post


Link to post
Share on other sites

I'd recommend SFML. Although personally I'd recommend OpenGL but since you want to do a 2D, SFML or SDL2. I haven't used SDL2 only SDL many years ago, been experimenting with SFML occasionally and so far I like it more than SDL I used years ago. You should surely check it out some day if not now

Edited by Bob Wade

Share this post


Link to post
Share on other sites

Oh thanks, I'll check out Clanlib to see what the differences are. I thought out trying to use OpenGL or DirectX but I imagine the APIs for that are a good deal more complicated. I want to get into them eventually though.

Share this post


Link to post
Share on other sites

Just to pop in my 2 cents, SDL (though I've never used it) seems quite solid and when i was in your position people mentioned that there are some amazing tutorials out there for it. I personally went with SFML, it has proven to be pretty easy to use and i really haven't had too many problems, there's a nice forum if you experience any difficulties and there also a nice tutorial on the SFML website. Both are quite viable options as long as you're fairly proficient at C++. 

 

Good luck with your projects mate :D

Share this post


Link to post
Share on other sites

Just to pop in my 2 cents, SDL (though I've never used it) seems quite solid and when i was in your position people mentioned that there are some amazing tutorials out there for it. I personally went with SFML, it has proven to be pretty easy to use and i really haven't had too many problems, there's a nice forum if you experience any difficulties and there also a nice tutorial on the SFML website. Both are quite viable options as long as you're fairly proficient at C++. 

 

Good luck with your projects mate biggrin.png

Thanks madgod_zhar! I started working with SFML because it seems to be the most modern and up to date. I also really like that they have everything up on Github.

Share this post


Link to post
Share on other sites


UE4 uses C++ for game code so I don't think that statement is exactly correct.

 

Whether or not you can finish your game rather than going in circles is more about how much the library and engine do for you rather than the language they're made in. A bigger library or engine means less for you to worry about 

 

Watch out though because a big engine like UE4 or unity has many bells and whistles and it's easy to get side tracked playing with them rather than what matters to your game!

Share this post


Link to post
Share on other sites

SFML is pretty nice cause they care about providing a good library API that is simple to use and staying compatible with old technology (C++98+OpenGL1.1 with shared contexts), being modern is not one of its strengths.

It seemed more modern than the other graphics libraries I was looking at and some of the tutorials mention C++11. I guess I can't tell how modern it really is very easily but it does seem like a really nice library.

 

 


UE4 uses C++ for game code so I don't think that statement is exactly correct.

 

Whether or not you can finish your game rather than going in circles is more about how much the library and engine do for you rather than the language they're made in. A bigger library or engine means less for you to worry about 

 

Watch out though because a big engine like UE4 or unity has many bells and whistles and it's easy to get side tracked playing with them rather than what matters to your game!

 

I've made some small games in UE4 and Unity and they are pretty nice and easy to use engines but UE4 has a lot of macros that kind of obscure the language for me and overall it does much more than I need for some simple games like Pong and Breakout. Unity is really easy to use but I am not a fan of the languages it uses for scripting. I do want to get more familiar with both in the future though because I feel like they will be beneficial to use.

 

 


I'd recommend SFML. Although personally I'd recommend OpenGL but since you want to do a 2D, SFML or SDL2.

 

You can use OpenGL code alongside SFML, so once the ball gets rolling, it should be a fairly easy next step.

 

I noticed that in the tutorials but didn't think of it this way. That's kind of exciting because I do want to get more familiar with OpenGL and DirectX directly so it's nice to know I can use this as a gateway to at least OpenGL.

Edited by DeFessler

Share this post


Link to post
Share on other sites

This topic is 812 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this