Following the tutorial Your First Game (Windows). Music won't play when game runs.

I'm following the tutorial "Your First Game (Windows)". I'm using the assets for the tutorial that I downloaded from the website. I'm on the 5th video "Adding Sounds". The gemgrab and playerdeath sounds work as they should. However, I've added a play sound rule to play gamemusic.ogg to the Game Functions prototype. Loop is checked, run to completion is not. When I run the game, the music does not play. I tried doing it with only run to completion checked, and with both checked. Neither works.

I can play it in the creator, by clicking on the play arrow next to it on the media tab, so the sound file is good. I tried replacing it with other sound effects just to make sure it wasn't a problem with the file. The other sound effects also do not work in Game Functions. It seems like the rule simply isn't being triggered. The other rules in Game Functions work.

Has anyone else encountered this? Does anyone have a solution? I hate wasting trial period time debugging stuff that should work!

Comments

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Is the playsound in a rule that has to be triggered?

  • SLOCM3ZSLOCM3Z Member Posts: 797

    Actually, it might be the problem with the .ogg. I have had problems with .ogg files

  • david.motterndavid.mottern Member Posts: 12

    It's just a rule. How would I trigger it? As far as I can see I'm doing it exactly like the tutor is. The ogg file plays fine in the developer, just not when I run the game. Plus, I tried using other sounds instead and they also don't play.

  • david.motterndavid.mottern Member Posts: 12

    I found a solution. If I put it in the instance instead of the prototype, it works. The tutor in the video puts it in the prototype and that works for him so I'm not sure why I have to do it differently, but whatever works.

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    Can you give us some more details about your PC?

    Operating System?
    Sound Card or built-in on Motherboard?
    Video Card?
    RAM?

    If you open one of the included sample projects like Big Top Blaster and preview it, do you get any sounds? You should hear music and a sound when you launch a cannonball.

  • david.motterndavid.mottern Member Posts: 12

    I'm using Windows 7 64 Bit Professional on an HP laptop. Playing with it some more, it appears that the issue is not just with sounds. I'm finding that for some other rules / behaviors, they also don't occur unless they are explicitly entered in the instance. I can have the rule in the prototype and it doesn't work. If I then unlock the instance and make some minor change to the rule or behavior, it suddenly works for the one instance. Obviously this cripples the whole prototype / instance idea since you want some rules / behaviors to be universal for all instances.

  • david.motterndavid.mottern Member Posts: 12

    I tried Big Top Blaster and their is sound. I hear the music and the cannon blast. The cannon doesn't shoot far enough but I assume that's just because it's a sample project.

  • dgackeydgackey Austin, TXInactive, PRO, Chef Emeritus Posts: 699

    @david.mottern:

    Thanks for bringing this to our attention; we'll definitely look into this. I've extended your trial by a few days for the inconvenience in the meantime.

    Dan Magaha · COO · GameSalad, Inc · danm@gamesalad.com

  • david.motterndavid.mottern Member Posts: 12
    edited August 2015

    @dgackey
    I think I found what the issue is. If I modify an instance, then any changes made to the prototype after that are not reflected in the instance. So if you want to go back and add something to a prototype, you have to either recreate any of the instances that have been modified or add the changes to them manually.

    So modifying an instance essentially decouples it from the prototype from that point on. Is this intentional or a design flaw? I should charge you guys for finding this for you, lol (I'm a developer).

  • david.motterndavid.mottern Member Posts: 12
    edited August 2015

    @dgackey
    I think it's more complicated than what I said in my previous post. I'm playing with the endless runner tutorial at
    http://nimg.gamesalad.com/learn/wp-content/uploads/2015/07/28221340/Runner-Game-Tutorial.zip

    The runner does not jump when the space bar is hit. Even if I delete the existing instance of the runner and create a whole new instance, it still doesn't jump. The jump rule exists on both the prototype and the instance.

  • GeorgeGSGeorgeGS Member, PRO Posts: 478
    edited August 2015

    You'll want to be sure to click the window after you start preview to make sure it has keyboard focus.

  • david.motterndavid.mottern Member Posts: 12

    @GeorgeGS
    Well, now I feel stupid. I was so immersed in trying to solve this that I forgot to click on the window. The endless running thing does seem to work properly when I remember to do that (and I did know that was necessary).
    However, that doesn't solve the music issue with the other tutorial, since I was actually moving the player around and there was still no music.

  • david.motterndavid.mottern Member Posts: 12
    edited August 2015

    Now I have a different issue. I'm trying to create my own game as an exercise. I have a background image with some pieces and borders. I have the pieces and borders sitting on the background. When I run it all I see is background; no pieces or borders. The layers are arranged properly (I think). If I delete the background and run it the pieces and borders still don't show. I'm stymied. I'm willing to send you the project files. How new is the Windows version of Game Salad?

    I'm editing this post to add some new info.

    I used some debugging statements to determine the values of some of the attributes of one of the actors, a border piece. I tested the values of the X & Y position attributes and the value of the visibility attribute. They all showed as having a value of nil. I suppose that explains why the piece isn't showing, but why are they nil?

  • david.motterndavid.mottern Member Posts: 12

    @dgackey or @GeorgeGS,
    No answers for this? I was at fault on the one issue (not clicking on the window) but that doesn't explain the other issues I encountered. Are these bugs in GS? If so, can I work around them somehow?

  • GeorgeGSGeorgeGS Member, PRO Posts: 478

    @david.mottern said:
    dgackey or GeorgeGS,
    No answers for this? I was at fault on the one issue (not clicking on the window) but that doesn't explain the other issues I encountered. Are these bugs in GS? If so, can I work around them somehow?

    The Windows version is newer than the Mac version, but it has been around a while and works pretty well.

    As far as I know the Windows tutorial should work but I'm not very familiar with it. I posted on our internal forum to see if someone can give you a hand tomorrow. You can also always click the question mark at the lower right to send something to customer service at any time.

  • david.motterndavid.mottern Member Posts: 12

    @GeorgeGS,
    By any chance is there a Linux version? I have a Linux desktop and a Windows laptop. I don't have a Mac.

  • david.motterndavid.mottern Member Posts: 12

    I was tiling an image and I neglected to set the tile size so it defaulted to zero. So that problem, at least, is solved, thanks to Alexandra. The original issue is still unsolved.

Sign In or Register to comment.