I'd be a bit of a bad resource for code advice as I just started with SFML as well
.
As for how I got it to compile, hopefully these a little clearer (with the proper setup and including the ResourcePath I got no errors on building
):
1) Download zip file
2) Extract to folder Marcuzcraft 2D v0.1.3
3) Create empty code blocks project in root
4) Import Source/*
5) Import Contents/Resources/* (probably not necessary)
5.a) I created the ResourcePath.cpp & hpp
6) Global Build options, check mark follow C++11 ISO standard (I'm on codeblocks 12)
7) #defines ==> SFML_STATIC
linker settings: sfml-audio-s,sfml-graphics-s,sfml-window-s,sfml-system-s
9) search directory (compiler to sfml 2.0 include, linker to sfml 2.0 lib)
10) compile
11) move exe to Marcuzcraft 2D.app\Contents
12) copy libsndfile-1.dll and openal32.dll to where exe is now located
I haven't looked @ the code much, but one thing I did spot is you have no handling of the fps -- so I think if it were to run on a faster pc/slower pc your animation speeds would be different.
One thing that was suggested to me was to use one big image containing all your tiles then split them with setTextureRect
Take a peek @
http://en.sfml-dev.org/forums/index.php?topic=10363.0 , exploiters suggestions were incredibly helpful for me and you could probably apply some of them as well =0)