Music in my game in C# EE

Hello guys!

I have been here a few times and every time I need help I get a solution from you guys! Okay, I am making a game sort of like an advanced Space Invaders. Anyway, I need some music for the game. I was wondering.... how do I integrate music into my game

Paul




Answer this question

Music in my game in C# EE

  • Armanchos

    For a good example of sound in a C# App that is game related have a look at the following example of SpaceBlitz...

    SpaceBlitz is a Version of Space Invaders that uses GDI+ for the graphics, it is also part of the Upgrade your Game Series on the Coding4Fun web site.



  • LealTing

    In Solution Explorer select Properties then Resources.resx, Change to Audio (you can click Ctrl+4) then click Add Resource, add the audio file which you want to play it, then play it using this code :
    System.Media.SoundPlayer PlaySoundTest = new System.Media.SoundPlayer(WindowsApplication1.Properties.Resources.[YourAudioFileName]);
    PlaySoundTest.Play();
    Hope this helps


  • Music in my game in C# EE