- Joined
- Jul 10, 2007
- Messages
- 6,306
I was recently browsing for a good way to render 2D graphics and do windows in c++ w/o using an overbearing engine or library >.<. For example, I avoided things like win32 code (horribly ugly), divx (overcomplicated), opengl (wtfx), and various game engines (cramming things into a box and calling it art is never a good idea).
I found a thing called SFML, which allows you to create windows and graphics with extremely nice looking code ^)^. It works for c++, which is also a major plus. Furthermore, you can use standard c++ (no weird wtf languages or entry points). It also works on Windows, Mac, and Linux (gg). It runs on OpenGL as well and you can do graphics through OpenGL if you want something more complicated (ok I suppose, but OpenGL needs some heavy loving before I'd support it myself).
Here is code for creating a window and waiting for it to close
Very easy to understand code, main method entry point, and object orientated. If you want to embed OpenGL into the window, you can do that too ^_^.
SFML also has networking, audio playing, and 3D sound playing. The great thing is that again, these libs work across windows, mac, and linux. It's very difficult to find a lib that is fast on those 3 operating systems (one that even works on all 3 without weird things like ming).
If you don't need the sound or networking, you don't need to use them. All of SFML's features are modular (they are all in their own libs). When you want to use a feature, you just link to the lib and you are good to go. This means that you could easily replace SFML's audio with a better sound engine like FMOD if you wanted to.
I think that it is an excellent framework if you want to start to get into game development w/o being overwhelmed by a huge game engine ^_^. This also allows you to work on your own game engine quickly and easily. Furthermore, it is fast ;o.
I have found a couple of problems with SFML (one rather major), but other than that it is great to work with. It is also being actively developed and its tutorials are constantly updated. If you look at the tutorials, you will realize just how small SFML really is, and you only even need a few of the features out of it.
http://www.sfml-dev.org/
I found a thing called SFML, which allows you to create windows and graphics with extremely nice looking code ^)^. It works for c++, which is also a major plus. Furthermore, you can use standard c++ (no weird wtf languages or entry points). It also works on Windows, Mac, and Linux (gg). It runs on OpenGL as well and you can do graphics through OpenGL if you want something more complicated (ok I suppose, but OpenGL needs some heavy loving before I'd support it myself).
Here is code for creating a window and waiting for it to close
Code:
#include <SFML/Window.hpp>
int main()
{
//used for catching events like keyboard input etc
sf::Event event;
//800x600 window
//title: My window
sf::Window window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
//there are many other cool events, check them out ^)^
//i did a notepad thing, was pretty cool ;D. I also did a chat
//thing
}
}
return 0;
}
Very easy to understand code, main method entry point, and object orientated. If you want to embed OpenGL into the window, you can do that too ^_^.
SFML also has networking, audio playing, and 3D sound playing. The great thing is that again, these libs work across windows, mac, and linux. It's very difficult to find a lib that is fast on those 3 operating systems (one that even works on all 3 without weird things like ming).
If you don't need the sound or networking, you don't need to use them. All of SFML's features are modular (they are all in their own libs). When you want to use a feature, you just link to the lib and you are good to go. This means that you could easily replace SFML's audio with a better sound engine like FMOD if you wanted to.
I think that it is an excellent framework if you want to start to get into game development w/o being overwhelmed by a huge game engine ^_^. This also allows you to work on your own game engine quickly and easily. Furthermore, it is fast ;o.
I have found a couple of problems with SFML (one rather major), but other than that it is great to work with. It is also being actively developed and its tutorials are constantly updated. If you look at the tutorials, you will realize just how small SFML really is, and you only even need a few of the features out of it.
http://www.sfml-dev.org/