Reputation: 68847
I want to write a serious 2D game, and it would be nice if I have a version for Linux and one for Windows (and eventually OSX). Java is fantastic because it is platform independent. But Java is too slow to write a serious game. So, I thought to write it in C++. But C++ isn't very cross-platform friendly. I can find game libraries for Windows and libraries for Linux, but I'm searching one that I can use for both, by recompiling the source on a Windows platform and on a Linux platform.
Are there engines for this or is this idea irrelevant? Isn't it that easy (recompiling)?
Any advice and information about C++ libraries would be very very very appreciated!
Upvotes: 4
Views: 831
Reputation: 59269
I have use SFML to build simple games. In its own words
SFML is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs.
I really like it as it's definitely a C++ library, not C written as C++.
However, you asked about 2D engines, I've yet to find a good one. SFML and SDL are more low level media libraries.
Upvotes: 2
Reputation: 532
For 2D games I recommend SFML. It's similar in concept to SDL, having most of the same capabilities, but is much more C++ oriented (SDL is a C library), and because it uses OpenGL internally, it performs better in most cases. Besides that, in my opinion, it is much easier to use.
Upvotes: 0