SFML community forums
General => SFML projects => Topic started by: Yatan vesh on December 24, 2015, 01:00:52 pm
-
Presenting Music Manager for you and your SFML projects! Its easy to use and sets up in minutes! :D
It works just like the one we see in racing games like Need for Speed!
...::The Music Manager::...
(http://s11.postimg.org/krgqn9vxf/zzz.jpg)
Here I'm using it in a Snake game i made :)
It loads all the tracks automatically,changes track automatically and end button changes current track.
The Music player searches and loads tracks in the "Music" folder by default. However, that can be changed using the constructor(see readme).
Github link:
https://github.com/Yatanvesh/MusicManager
important:read file rules in readme.txt
How to import:
1.Place all the files in your Project folder.
2.Import the MusicManager.cpp and MusicManager.h in your Project.
3.Create an object of the claas MusicManager and pass your renderwindow as an argument to the constructor.
MusicManager,by default will look for music files in Music/ folder of your project. However, you can change this by passing a second argument
to the constructor, a string with the location of music files.
4.use the function obj.Handler() in your main game loop and obj.DisplayPlayer() to draw the player.
5. You are done!!
Any suggestions and improvements will be cherished!
-
Somewhat similar to my Jukebox class :)
https://github.com/SFML/SFML/wiki/Source:-Jukebox
-
I checked it out. Whoa dude that code went wayyyy above me! That is much more advanced than the one i implemented!
-
I'm sorry it went over your head. I actually think it's fairly straight forward C++11 code.
I read through your implementation and my impression is that my version is somewhat of a generalization of yours but not really all that different. They both solve the same basic problem.
-
High school c++ books suck. Well I'll get started on these concepts and maybe then i'll see things more clearly. Thanks for your interest jesper.