Wario-Land-3 icon indicating copy to clipboard operation
Wario-Land-3 copied to clipboard

I'm interested in your project

Open LeonLucca opened this issue 7 years ago • 5 comments

Hey I was wondering if you could help me out with something. I'm trying to get sound to play without the game crashing. Can you help with that? I also have questions about making a simple scoreboard for the game as well. Hopefully I hear from you soon :D

LeonLucca avatar Dec 05 '16 16:12 LeonLucca

I can look at the sound script. Are there any events associated with the crash?

snoogans775 avatar Dec 05 '16 21:12 snoogans775

nah I just need help understanding what's going on in the sound.py file. If you can give me some clarification or advice on how to implement background music that would be great :)

LeonLucca avatar Dec 06 '16 00:12 LeonLucca

Hi, thanks for checking out my project! :-) I'm glad someone is interested in it!

I haven't bothered to implement a sound system into my engine yet. A sound module is already in place, it just misses an interface. I'm happily going to merge your changes to my project if you would create that for me.

Gameobjects inside my world interact with other gameobjects and the engine itself through the Engine Singleton Class. This class gets instantiate only once (as singletons do) inside main.py. After instancing all game objects, it passes itself down to them during every update cycle (see the "update" method of GameActorComponent). Each game object can then use it to interact, as mentioned before, with the engine. A game actor could then for instance blit something on the screen by calling engine.graphics.blit() (example), or check for collision with the world using engine.world.get_colliding_rects() (example). There are more variables like engine.graphics and engine.world that can be used to interact with the engine. They are defined here. One of them is sound. It's again a singleton class, defined in Sound.py. Which is where you should begin with implementing sound.

You could for instance create a set_background_music and a play_sound in the Sound-singleton class. You could also make a background music play automatically once a level loads inside the level-files loader. The Tiled-map-editor allows to add custom properties to a map, so maybe you could use that to define the background music for each map... just some ideas.

Hope that gets you started. Just ask if you need more information.

Nearoo avatar Dec 06 '16 17:12 Nearoo

thank you very much for the rundown on your systems. I have done a little bit of sound design in pygame, but only through pygame.mixer. I am a musician and sound designer by trade so it should be enjoyable to learn the usage of the sound class and the Sound.py file. It should make it easier to organize sound events.

snoogans775 avatar Dec 07 '16 02:12 snoogans775

Awesome! Can't wait for your contribution!

Nearoo avatar Dec 31 '16 14:12 Nearoo