C++ Graphics Library

Started by
18 comments, last by DeFessler 8 years, 6 months ago

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!

Advertisement

I haven't ever used it, but there's been suggestions that cairo should be added to the standard C++ library as a standard way to do 2D drawing... So I assume it's decent! laugh.png

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.

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, ...).

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.

SFML is fun and easy to use.

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.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

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.

Stephen M. Webb
Professional Free Software Developer

SFML is fun and easy to use.


SFML is also very well designed and it uses an elegant C++ style. Many of the alternatives either present a C API or a sorry excuse of a C++ wrapper around a C API.

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!

This topic is closed to new replies.

Advertisement