1
Audio / Re: problem with playing second music
« on: December 28, 2012, 12:23:18 am »
Solved , : my code is correct , just need to put it out of the while(opned)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
And now provide a complete example, so we actually see what's going on.
Stopping music and closing music are two different terms, so use the one that actually describes the action.
Rather than make some (hard to read, due to the lack of using a proper list or adding a space between the dash and I) listing, you should provide a complete and minimal example, that reproduces the problem.
What exactly do you mean by 'I close the first music'? And what's your 'new music'?
There are hundreds of sites that provide resources, you just need to search for them (make sure the license allows you to use it), but I don't know if you'll find something like that...
If you want exactly what you've go in your mind, then get an artist to do it.
It all depends on your game. If you have just one fixed background per level, it probably would be better to have one separated image for each level, but if the player can move around on the background it's probably better to have one texture and move the sf::View (aka camera) on top of it.see my video and tell, it's easier to put one background behind the map , but would it make it slow if it's a big file ? (3000 * 600 )
thanks, i think of making a tutorial of this if i made itbut asking if there are a tutorial talking about this stuff on sfml why not to put hereWell if there was a tutorial for collision detection regarding tile-maps and specifically for SFML that I'd know of, I would've linked it long time ago.
I guess you'll find some sample code in the forum somewhere and if you're ever curious about tutorials/source code for SFML, you can check on your own on the official SFML wiki.
but no one of your replies helped me to know what exactly should i do , why i have never found any article or tutorial talking about collision with map while it's a fundamental thing ,We won't program for you (unless you pay us), but we only give points in the direction you should go, if you don't have enough knowledge on how to approach things you can ask again, but if you don't know at all where to start, it seems to me that you like some major knowledge in programming, which is required for the level you want to achieve things.
the first thing is the code in the map.cpp wich must be changed ?
for the player just getboundingbox is ok ?
So our posts didn't say do X in file Y, but we gave you the idea you want, mainly: "Do a collision detection with each tile in the map that is interesting for the player."
If you don't understand that instruction you should ask again, but don't expect us to 'fix'/write code for you.
Also if you haven't found anything on collision with maps etc. with Google, then I'd say you didn't search hard enough or with smart enough keywords...