sfml-snake icon indicating copy to clipboard operation
sfml-snake copied to clipboard

Need sound controller

Open ParadoxZero opened this issue 8 years ago • 10 comments

Need a class, which will handle sound.

  • [ ] Play a BGM
  • [ ] Provide interface to play sound effects. Something like playSound(Sounds::EatFood);

ParadoxZero avatar Dec 14 '16 05:12 ParadoxZero

@ParadoxZero is this issue still open ?

dev-patel2104 avatar Aug 25 '20 17:08 dev-patel2104

@dev-patel2104 Yes it is.

ParadoxZero avatar Aug 26 '20 05:08 ParadoxZero

@ParadoxZero do you want me to create an interface and then implement a class or should i just create a class with a function in it

dev-patel2104 avatar Aug 26 '20 09:08 dev-patel2104

@dev-patel2104 From top of my mind, how I'll approach this is to create an internal interface (a class) for the playing Audio etc. Perhaps declare different Audio asset via an enum. Then the components e.g. snake will play audio related to it, while eating food, eating itself etc and BGM will be controlled by the game controller.

ParadoxZero avatar Aug 26 '20 09:08 ParadoxZero

@ParadoxZero sorry to bother you but do you have any formal criteria for tests on which you will accept the pull request or that you want us to involve during testing

dev-patel2104 avatar Aug 26 '20 11:08 dev-patel2104

@dev-patel2104 This is something I made during college to learn sfml 😄 There are no formal criteria,

As long as it works that's great. I am gonna trust you on the quality of the build since you are taking time out andwriting the code. Other than that, I'll review the PR and share any recommendations I may have.

But go crazy, it's an informal project and the key is to have fun.

ParadoxZero avatar Aug 26 '20 11:08 ParadoxZero

Hey @ParadoxZero. I have been working with @dev-patel2104 on this issue since our first communication. We are a team of 10 members. Please don't assign this issue to anybody else. Also, we have been trying to debug this issue for quite some time now, It'll be of great help if you could look into it : Run-Time Check Failure #2 - Stack around the variable 'text' was corrupted. image

Thankyou.

stelios357 avatar Oct 25 '20 09:10 stelios357

I'll need yo debug this to identify. Presently I don't have enough time to get back into it unfortunately. Perhaps try to comment out the code/ member variable that's crashing and work around it. I'll look into it when I get time.

ParadoxZero avatar Nov 05 '20 10:11 ParadoxZero

I've made a PR against this issue: https://github.com/ParadoxZero/sfml-snake/pull/28

stelios357 avatar Dec 19 '20 14:12 stelios357

@stelios357 I have added some comments. Please go through them when you get a chance.

ParadoxZero avatar Dec 20 '20 07:12 ParadoxZero