SFML community forums
Help => General => Topic started by: Robmanu-xx on January 23, 2013, 10:59:30 am
-
Hello everyone.
I'm looking for a tutorial, which is making a game from the scratch on mac, using SFML.
Has anyone know any? Any help will be appriciated.
Thank you.
-
If you don't have good basic knowledge in C++, then you should first read a good book (http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list), before diving into the hardest challenge in programming, mainly game programming.
After that, if you chose to use SFML, you can start with setting it up with the help of the official tutorial (http://www.sfml-dev.org/tutorials/2.0/start-osx.php).
Afterwards you can take any tutorial/book on game programming and adapt it for SFML, you preferably will keep an eye open for OpenGL related topics, rather than DirectX ones.
-
eXpl0it3r, I already set up the SFML on my mac, i had some problems though, but i'm good now. I'm only 15 years old and i started c++ programming when i was 14. I really want to experiment with the programming games, as I want to be a game developer in future. All i found are pc games tutorials. Could i follow tutorial for the pc and will it still work on mac?
Thanks
-
If you don't use platform specific code, it doesn't matter.
SFML is crossplatform, thus if you use it, you should be able to compile it on Wibdows, Linux and Mac, without changing anything.
-
Would you give me any hints? And also Should i be using CMake?
Thank you
-
And also Should i be using CMake?
Depends on if you want to make your projects cross-platform. If so, then CMake is certainly one of the better ways.
But I'd say you first want to get more familiar with game programming with Xcode.
Would you give me any hints?
Hint on what? Game programming in general?
Usually people just start with small clones, like a pong game and then a snake game and then a Tetris clone, etc. And after month/years of learning the ways of game programming and programming in general one can start with the own small game ideas. Trying to write the one big idea you always had, will most certainly fail, even after years of studying game programming, but it sure is a great motivator to keep you going. ;)
-
Ok, thanks ;)
But it seems there are no tutorials for mac.
I will try out the pc ones, but i'm afraid they might not work propely.
-
But it seems there are no tutorials for mac.
I will try out the pc ones, but i'm afraid they might not work propely.
As eXpl0it3r stated, you can develop platform-independently with SFML. So, the only thing that differs is how to setup compiler, linker, or how to generate executables, etc. For this part, you will certainly find Mac tutorials.
Game programming consists of many topics, and setting up the environment is only the very basic step. A lot of articles, books and tutorials are written to work independent of the operating system.
-
The best advice would be to get to know the language you are programming in very well, many people start without knowing the language and sometimes end up with bad practices or overseeing features that could have made their life easier from the start. Also note that C++ isn't particularly easy to learn, either if you know how to program in another language or if you start from the very bottom, but it certainly pays off in the end. I prefer the language a lot more than Java now that I've taken my time to learn it well.
I don't know if there really is a tutorial that holds your hand through the entire process, and even if there is one it's even more unlikely that you will find one in SFML (A multimedia library that's just beginning to become important in the market, but will become bigger and more important) since it's relatively new in comparison to other projects. So even it there is such a tutorial it might be hard to find, if not nigh impossible.
Also be in to have the need to learn tons of math, it will become necessary depending on what you want.
I will try out the pc ones, but i'm afraid they might not work propely.
If they are from SFML only they will work, else you will have to adapt code and so on. Note that there are many tutorials and articles that are general and can apply to whatever framework you are using for your programming by only adapting them to your programming language.
-
As people suggested, diving into graphic coding head first may not be the best approach. Personally, I would develop console (text only) games -- even a text adventure as your first project so you have some grounding on C++.
SFML is cross platform, so other then setup, you should be fine using whichever tutorial :).
I had this in my bookmarks -- I haven't really read through it or know how well it is written, but it may be useful. It is a 1.6 tutorial, so there will be some differences in code to 2.0
http://www.gamedev.net/topic/610246-a-complete-c-game-from-scratch-using-sfml/
which links to http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx
-
Ok, Thanks everyone for the advice.