What library to choose to write games in C + +

Started by
8 comments, last by EddieV223 10 years, 8 months ago

Hi Everyone.

I am beginning developer. My friends and I want to write a simple rpg something like Entis online or Age of heroes only by the PC.

We want the game to be cross-platform, that is, that the library was available at least on ubuntu and windows 7. We all write in C / C + + (not perfect of course). Please advise us any library to start, we still have this little experience.

P.s. It would be a plus if the library was in OOP style

Advertisement

First of all if you are a beginner and especially a team of beginners you should really think about using something other than C++. C++ is great when you need a huge amount of performance and low-overhead access to your hardware but it is NOT good for beginners since it gives you a whole lot of rope to hang yourself. For a team of beginners it is even worse since everybody will be shooting themselves in different ways. Nobody can agree on how to write c++ and for beginners this will be even more of a problem. If you are dead set on using c++ I hear SFML is a good OO media library for games. That said OOP is not the best way to structure all programs, usually when people say "I want a library in OOP style" they mean that they want a well designed, well-documented, terse, and consistent library in /any/ style.

As for what language to use I would consider Python, or maybe Go. Go is attractive since it is really simple and good for team projects, and python has good libraries. Be aware with Go that the ecosystem is not all that great yet in terms of libraries.

unfortunately there are few really high level languages with a good type system, especially ones that are beginner-friendly.

Two things:

First: If you're beginning programming in general and not just game dev, I would probably recommend a language like C#, Python or Java over C++.

Second: If you're a programmer already and just beginning gamedev, start with something simple like pong or a clone of a classic game. I wouldn't start with an rpg. Most people don't understand how many facets there are to a game even if they've been doing application programming for like 30 years, games use skills that other specializations of programming never even touch.

If you're that vested in the path you're going on then I highly recommend SFML. It's clean and simple to use, multiplatform and uses C++ coding style. It works as a windowing library and also provides a lot of useful functions for different game dev bits. The only other real alternative is SDL, which is similar to SFML but much older and uses C style code, although it is kept up to date as well.

Some people like way older libraries like allegro but its debatable how helpful they are with getting you up to speed on more modern coding practices. C++ is a very old language and a lot of code out there for it is partially C or just designed for computers that wouldn't run your cellphone.

Do you want to make games in 2D or 3D ?

For 2D, as other said, SFML is pretty good. If you are interested in C#, I heard Monogame is hot these days.

For 3D, you could use Ogre3D (it's very OOP). It's pretty easy to have a model on your screen. Just follow the basic tutorials on the site and you should be up pretty fast. However Ogre is only a rendering engine, so you will have to plug other stuff like UI (CEGUI), PhysX, FMOD, etc.

I don't know what your programming level is, looks like you are a beginner. Before tackling Ogre, you should read a C++ book, like Principles and Practice Using C++.

Be patient ! C++ is hard to learn but it's very rewarding.

I agree with the other posts. If you're new to programming, I'd reccommend going with a easier language to learn. C++ can be great, but it can be hard for beginners. I know when I started out I bit off more than I could chew. However if you have some programming experience, I'd reccommend going with SDL2. Sure it's in the RC stage, but its pretty stable and I've been using. It's a much better improvement over SDL 1.2. I also finder SDL easier to work with than say SFML.

For 2D I recommend: C# with MonoGame, Python with PyGame or C++ with either SDL or SFML (personally haven't used PyGame or SFML, but friends of mine have). I've also used FlatRedBall for some quick playing around and it was decent. Also, I agree with almost everything posted above.

I'm only in my early 20's and I started programming at like 17. I had no experience with any languages and was going into it blind. Didn't really have any idea which forums to go on, I did a bit of research and decided on using C++.

I have to say, it was difficult. I was having trouble with the most basic of programs. I also wasn't committed enough and wasn't studying enough each day.

I've been through a couple of books, some weren't very detailed and didn't really explain some of the basic stuff, so when I moved onto advanced projects, it was tough. I'm actually learning C+11, decided I needed a good book and to have a go at the new standard and I'm doing way better than I did when I first went into programming.

I tried out SDL, got through several lessons, but it just felt messy. A lot of the times my code wasn't working properly. The libraries weren't linking properly. It put me off it to be honest. I've just been learning C++ and dabbled in DirectX which I really enjoyed. Jumped into SFML last week, took a bit to get it up and running, was trying to get it running on Visual Studio 2012, but it just wasn't cooperating, so I went back into the 2010 version and got it up and running. It's so much easier to use. You will get windows and shapes up in minutes of programming. The names of classes, functions, etc. are very easy to understand. They have the documentation on the website.

I would recommend SFML for someone just beginning.

I would recommend SFML for someone just beginning.

Seconded. I have used a tiny bit of SFML, and it is quite easy to get started with, stick some sprites on the screen and so on. Follow some tutorial to get over the initial hurdle of getting some app to compile, and you are set.

I'm planning to use SDL2 for a learning project precisely because it has less structure and hand-holding than SFML, and I would like to build my stuff from the ground up for once.

I would recommend SFML for someone just beginning.

Seconded. I have used a tiny bit of SFML, and it is quite easy to get started with, stick some sprites on the screen and so on. Follow some tutorial to get over the initial hurdle of getting some app to compile, and you are set.

I'm planning to use SDL2 for a learning project precisely because it has less structure and hand-holding than SFML, and I would like to build my stuff from the ground up for once.

Thirded (....). I use SFML in almost all of my project and it's great! Easy to follow, easy to understand and very well designed with OOP in mind. I feel like enough people have voiced their opinion about using C++ as beginners ( Even though you didn't ask...4+ answers basically says the same thing ).

Well if you want to make 3d and have it cross platform and write the low level stuff too, then its all about straight openGL code. As many others have mentioned this is the long narrow curvey path to the goal of making games but far more rewarding once you succeed.

As far as libraries, I use the following cross platform libraries, gflw3( context and window management ), glew( openGL function pointers ), and glm ( vector/matrix math library ). As well as for audio openAL and alut( openal utility library ).

That said, if you guys want to take the wide straight and easiest path to making a game, then Unity3D is probably what you want. It's an entire game engine that allows you to script it in C#, it is cross platform too. There is a free version too, and the commercial version is fairly priced.

Depends on what you are after, do you want to know the details of making a game, or let someone else deal with that and just focus on your games logic? You should know that it will probably take you years to get over the c++/openGL hump, to get good enough with those tools to even make a game engine.

If this post or signature was helpful and/or constructive please give rep.

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

// Easy to learn 2D Game Library c++

SFML2.2 Download http://www.sfml-dev.org/download.php

SFML2.2 Tutorials http://www.sfml-dev.org/tutorials/2.2/

// Excellent 2d physics library Box2D

http://box2d.org/about/

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

This topic is closed to new replies.

Advertisement