Hi everyone,
today I completed my work on the sfml-port-input branch. For the first
time in our SFML porting efforts I was able to actually compile, run,
and play the game. I successfully finished lvl_1.
The sfml-port-input branch has now been merged into feature-sfml-port2,
which thereby now contains a roughly playable version of TSC mostly
ported to SFML. The port still has its issues, but I think the largest
part now has been moved over. The biggest thing remaining is the porting
of the audio system from SDL_mixer to SFML’s audio module, but thanks to
kirbyfan there is a PR available for that already[1] which will
drastically simplyfy things. If I have a correct view on the topic, it
is possible for us to wipe the SDL1 dependency from the codebase after
merging kirbyfan’s audio PR.
The SFML port in feature-sfml-port2 is, as outlined, roughly
playable. It has some issues we now need to tackle:
1. Mouse button input doesn’t work. You have to navigate the game with
the keyboard, including menus.
2. Graphical glitch with blue arrows in the HUD and everywhere points
should occur. This is probably due to an unported call to
glPixelStorei() in video.cpp[2] that I don’t know how to
handle. datahead, Luiji, would be nice if one of you OpenGL people can
take a look at that and estimate what that line intended to do (and even
better, fix the problem).
There are probably numerous further issues that I haven’t spot by simply
running through lvl_1. Please compile and test feature-sfml-port2 now,
and even more important, please contribute to it. The lengthy part of
the SFML porting should be over now, so let’s finish this.
Before starting the game, move away or delete your
~/.config/tsc/config.xml file. SFML doesn’t understand the SDL
key codes (obviously) and you would be unable to input anything with
your keyboard. Deleting that file causes the game to recreate it with
the default values (jump = s, fire/iceballs = space, etc.).
If you run ArchLinux or another rolling release distribution, beware
issue #500[3]. There is an incompatibility between our old CEGUI version
and the newest version of freetype2. This doesn’t specifically affect
the feature-sfml-port2 branch, but also devel and all versions of TSC
and probably even SMC alike. The issue tracker contains a workaround for
the problem.
Let’s work on completing the move to SFML. Happy coding!
Valete,
Quintus
[1]:
https://github.com/Secretchronicles/TSC/pull/488
[2]:
https://github.com/Secretchronicles/TSC/blob/f1a7838e6265ac2fb154ec24cfea...
[3]:
https://github.com/Secretchronicles/TSC/issues/500
--
#!/sbin/quintus
Blog:
http://www.guelkerdev.de
GnuPG key: F1D8799FBCC8BC4F