Code Monkey home page Code Monkey logo

Comments (5)

snoogans775 avatar snoogans775 commented on May 21, 2024

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

from wario-land-3.

LeonLucca avatar LeonLucca commented on May 21, 2024

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 :)

from wario-land-3.

Nearoo avatar Nearoo commented on May 21, 2024

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.

from wario-land-3.

snoogans775 avatar snoogans775 commented on May 21, 2024

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.

from wario-land-3.

Nearoo avatar Nearoo commented on May 21, 2024

Awesome! Can't wait for your contribution!

from wario-land-3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.