RELEASED. Magic Sushi - a musical experiment.

Okay, I’m trying this, and it’s not working. I’m in chrome when trying to preview. My dropbox link looks a lot different from yours. Do you have to do anything special? I’m using an mp3 exported from garageband. The folder it’s in is shared, and I copied the link

When I click that it goes to a page to download the file. Is that perhaps what the trouble is?
edited by HanonO on 8/21/2013

Hi,

I will write this up. I figured I should finish the game first. (I’m working really hard on it at the moment and I have no work deadlines for a bit, so home stretch.)

But. Yes. I think your file is incorrectly linked. It’s a hosting thing.

This is yours.

This is mine.

https://dl.dropboxusercontent.com/u/168597598/all.mp3

Thing one. Your file has to be in the public folder of dropbox. (It can be within another folder inside the public folder. I’d recommend that. Changing links later is a hassle and if you make more than one project, it’ll be a mess.) You may need to create one. Refer to this page. https://www.dropbox.com/help/16/en Scroll down to &quotCreating a public folder.&quot Follow link when logged into Dropbox.

Then. Within the public folder, highlight the file and select &quotcopy public link.&quot That’s your link.

Then. Try it with the example you have. Or, I’ve extracted the basics of the code below. Copy this into a storylet and put your link in where indicated.

<p><button onclick=&quotdocument.getElementById(‘hanon’).play()&quot>play button, edit this text</button><button onclick=&quotdocument.getElementById(‘all’).pause()&quot>stop button, again, you can edit this</button></p>

<p><audio id=&quothanon&quot src=&quotPASTE LINK HERE, NO SPACES&quot loop></audio>
<div>

Let me know how you go.

Meg
edited by Firky on 8/21/2013

I don’t seem to have “copy public link” It wants me to share it, which creates a download page which is the problem, then gives me a link to it…ghrmng. I’ll try some more.

Okay, I think I got it. What I had to do (on mac, perhaps that’s why it’s different) is actually click the link on the web version of drop box so it went to the page that actually played the file instead of a download page. Then I copied that link out of the address bar and pasted it into the shorter original version of the js you had. And it’s seemingly working in Safari!?! I’ll let you know if I’ve just done something wrong.

Oh my god this is so awesome. I have one more question if you don’t mind. I have sounds that will overlap, which is good in some cases, but is there a command I can send in a storylet that will stop all the audio first and then play the new one? Thanks for all your help.

Hi,

Glad you’re happy.

I really haven’t got safari working at all. I’ve been focusing on chrome and IE for now.

I was having, with safari, the thing where music wasn’t stopping as you loaded the next page. So, you’re probably on your own with that, at the moment. But, have you tried a “pause” for the previous audio file on the new page? Alongside the play for the new one?

Meg

It occurs to me that there’s lots I need to write down about what I discovered. I can add stuff you or others figure out, too, obviously.

I haven’t tried a pause…what’s the syntax? Substitute that for “loop”?

Pause didn’t work. I can work around it since the sounds overlap…but that’s not consistent across browsers?

I tried the gam in Chrome and heard no sound! That’s weird that Safari works and chrome doesn’t…ghrmgmmm.

What I’ve discovered so far is that safari seems to keep looping stuff, after you load a new page. It’s the same with Twine. I don’t know anything else beyond that. Run some searches on how to stop sounds at page load. (If that’s a thing.) Or, audio and safari.

So, you’re using mp3s. You can hear them in safari but not in chrome. You’re working on a Mac.

This is my guess as to what is happening.

You still haven’t made your dropbox folder public. So, because you are (I’m guessing) working in safari, testing in safari and with your dropbox open in safari, you can hear them. But, you can’t hear them when you open the game in another browser.

I’ve been testing mine in chrome with an alternate account and making it in firefox with my dropbox open.

So, is the FinalGirl folder inside another folder called Public with a little picture of a world on it? If it’s not, you’re not hosting the files yet.You’re just sharing them. Refer to my above post on how to make a public folder.

Yeah, so.

I opened your game and the dropbox folder you shared with me together in explorer and I couldn’t hear the music. This does suggest to me that the FinalGirl folder isn’t inside the Public folder.

Cool music, though. (Edit: I listened to a few files individually, not in game.) Very videogamey. And I can see what you’re doing with silence etc, there.

Don’t give up. You’ve nearly got it.

If it’s the public folder thing, great. If you are convinced you have FinalGirl inside the Public folder, then let me know and post some code and we’ll explore that instead.
edited by Firky on 8/27/2013

OOOOKay…I was mistaking a “shared” folder for a “public” folder. Now I have a public one. I will rename the links and hopefully it will work.

Hooray! I can hear the sounds in chrome. And for me they are actually overlapping…which isn’t a bad thing if I can plan for it. Let me know if you hear the sounds, and thank you for your help with this. Also PM me if you want to be credited in some other way besides “Firky”.

Thanks!

I have a bug. Thing. On shrinking, a new tab opened, and had this in it (and I appear to be stuck on loading):

{&quotData&quot:{&quotIsLinkingEvent&quot:false,&quotAccessCode&quot:null,&quotExternalAssociate&quot:null,&quotRootEventId&quot:0,&quotEvent&quot:{&quotLinkToEvent&quot:null,&quotUrgency&quot:&quotMust&quot,&quotSetting&quot:{&quotName&quot:&quotSushi default setting&quot,&quotOwnerName&quot:&quotFirky&quot,&quotItemsUsableHere&quot:false,&quotDescription&quot:&quotSushi default setting&quot,&quotId&quot:4583,&quotIsNull&quot:false},&quotShowAsMessage&quot:false,&quotOwnerName&quot:&quotFirky&quot,&quotParentBranch&quot:null,&quotName&quot:&quotMy little girl.&quot,&quotImage&quot:&quotcouple&quot,&quotDescription&quot:&quot\u003cp\u003e\u003ci\u003eYou\u0027re getting smaller, probably feeling ill inside. I remember that. Does the room seem to be stretching, impossibly opening out in every direction, \u003cbutton onclick=&quotdocument.getElementById(\u0027intro5\u0027).play()&quot\u003e\u003ci\u003eyour thoughts getting jumbled?\u003c/i\u003e\u003c/button\u003e\r\nThat\u0027s how I imagine it, watching from down here.\u003c/p\u003e\r\n\u003cp\u003e\u003cbutton onclick=&quotdocument.getElementById(\u0027intro5\u0027).pause()&quot\u003e\u003ci\u003eFocus here.\u003c/i\u003e\u003c/button\u003e Take my hand.\u003c/p\u003e\u003cp\u003eHow did you get so big, anyway, so self reliant?\u003c/i\u003e\u003c/p\u003e\r\n\r\n\r\n\u003caudio id=&quotintro5&quot src=&quothttps://dl.dropboxusercontent.com/u/168597598/magic%20sushi/intro5.mp3&quot loop \u003e\r\n\r\n\r\n\u003c/audio\u003e&quot,&quotTag&quot:&quotintro&quot,&quotExoticEffects&quot:null,&quotNote&quot:&quot&quot,&quotChallengeLevel&quot:0,&quotCategory&quot:0,&quotIsInEventUseTree&quot:false,&quotDeck&quot:{&quotName&quot:&quotAlways&quot,&quotImageName&quot:&quot100x130&quot,&quotOrdering&quot:1,&quotDescription&quot:&quotAlways&quot,&quotAvailability&quot:10,&quotDrawSize&quot:3,&quotMaxCards&quot:3,&quotNoDrawsLeft&quot:false,&quotId&quot:7800,&quotIsNull&quot:false},&quotId&quot:106538,&quotIsNull&quot:false},&quotOpenBranches&quot:[{&quotChallenges&quot:[],&quotActionLocked&quot:false,&quotCurrencyLocked&quot:false,&quotRareSuccessEventChance&quot:0,&quotParentEvent&quot:{&quotLinkToEvent&quot:null,&quotUrgency&quot:&quotMust&quot,&quotSetting&quot:{&quotName&quot:&quotSushi default setting&quot,&quotOwnerName&quot:&quotFirky&quot,&quotItemsUsableHere&quot:false,&quotDescription&quot:&quotSushi default setting&quot,&quotId&quot:4583,&quotIsNull&quot:false},&quotShowAsMessage&quot:false,&quotOwnerName&quot:&quotFirky&quot,&quotParentBranch&quot:null,&quotName&quot:&quotMy little girl.&quot,&quotImage&quot:&quotcouple&quot,&quotDescription&quot:&quot\u003cp\u003e\u003ci\u003eYou\u0027re getting smaller, probably feeling ill inside. I remember that. Does the room seem to be stretching, impossibly opening out in every direction, \u003cbutton onclick=&quotdocument.getElementById(\u0027intro5\u0027).play()&quot\u003e\u003ci\u003eyour thoughts getting jumbled?\u003c/i\u003e\u003c/button\u003e\r\nThat\u0027s how I imagine it, watching from down here.\u003c/p\u003e\r\n\u003cp\u003e\u003cbutton onclick=&quotdocument.getElementById(\u0027intro5\u0027).pause()&quot\u003e\u003ci\u003eFocus here.\u003c/i\u003e\u003c/button\u003e Take my hand.\u003c/p\u003e\u003cp\u003eHow did you get so big, anyway, so self reliant?\u003c/i\u003e\u003c/p\u003e\r\n\r\n\r\n\u003caudio id=&quotintro5&quot src=&quothttps://dl.dropboxusercontent.com/u/168597598/magic%20sushi/intro5.mp3&quot loop \u003e\r\n\r\n\r\n\u003c/audio\u003e&quot,&quotTag&quot:&quotintro&quot,&quotExoticEffects&quot:null,&quotNote&quot:&quot&quot,&quotChallengeLevel&quot:0,&quotCategory&quot:0,&quotIsInEventUseTree&quot:false,&quotDeck&quot:null,&quotId&quot:106538,&quotIsNull&quot:false},&quotName&quot:&quot&quotI wanted my own life.&quot&quot,&quotImage&quot:&quot&quot,&quotDescription&quot:&quot\u003ci\u003eIt was inevitable.\u003ci/\u003e&quot,&quotCurrencyCost&quot:0,&quotActionCost&quot:1,&quotBranchRequirementsDescription&quot:&quot\u003cspan class=&quotreq-item inner-shadow tooltipToggle&quot\u003e\r\n \u003cimg alt=&quotBlunt&quot src=&quot//images.storynexus.failbettergames.com.s3.amazonaws.com/icons/face_karensmall.png&quot class=&quotle-branch-quality-requirement qual-img-bg&quot data-edit=&quot59320&quot\u003e\r\n \u003cspan class=&quottooltip&quot\u003eUnlocked when \u003cstrong\u003eBlunt\u003c/strong\u003e is:\u003cul class=\u0027wordy-list\u0027\u003e\u003cli\u003eInsensitive, abrupt? Perhaps to some.\u003c/li\u003e\u003c/ul\u003e\u003c/span\u003e\r\n \u003c/span\u003e&quot,&quotBranchUnlockRequirementsDescription&quot:&quot\u003cspan class=&quotreq-item inner-shadow tooltipToggle&quot\u003e\r\n \u003cimg alt=&quotBlunt&quot src=&quot//images.storynexus.failbettergames.com.s3.amazonaws.com/icons/face_karensmall.png&quot class=&quotle-branch-quality-requirement qual-img-bg&quot data-edit=&quot59320&quot\u003e\r\n \u003cspan class=&quottooltip&quot\u003eUnlocked when \u003cstrong\u003eBlunt\u003c/strong\u003e is: \u003cul class=\u0027wordy-list\u0027\u003e \u003cli\u003eInsensitive, abrupt? Perhaps to some.\u003c/li\u003e\u003c/ul\u003e\u003c/span\u003e\r\n \u003c/span\u003e&quot,&quotRenameQualityCategory&quot:null,&quotButtonText&quot:&quot&quot,&quotOrdering&quot:0,&quotAct&quot:null,&quotId&quot:59738,&quotIsNull&quot:false}],&quotLockedBranches&quot:[],&quotCharacter&quot:null,&quotCurrentActionsRemaining&quot:0,&quotDailyActionsRemaining&quot:0,&quotImage&quot:null,&quotCanGoAgain&quot:false,&quotFormTargetAction&quot:null,&quotMessages&quot:[],&quotSharingData&quot:null,&quotSharePreview&quot:null},&quotTemplateName&quot:&quotIn&quot,&quotCommands&quot:[],&quotNotifications&quot:[],&quotDirectory&quot:&quotNexusStory&quot}
edited by babelfishwars on 9/10/2013

That’s a glitch I have seen on occasion in multiple games. It’s usually caused by the browser not loading a page correctly. You’re looking at the code for the page in Storynexus.

It usually can be cleared with a browser refresh/restart. Or try playing to the storylet again. If it continues to break on that page, it might be caused by an html tag not being closed properly in the storylet code.

In the worst case scenario, the actual page might have gotten written to the DB wrong and either needs to be discarded and re-created, or in dire straits, looked at by FB.

I’d make sure it was a consistent problem and there not a simple html goof before reporting it.

Hey Firky - just a note. I talked with someone who is a bit more knowledgeable than me who suggested that sounds cutting off or overlapping between storylets and branches is likely more dependent on the player’s sound hardware being able to open and handle playing sources from two different background pages at once rather than the browser type and version. It’s similar to the situation that can happen when you’re watching a YouTube video in one screen and a pop-up ad with sound overplays it simultaneously. He also mentioned that it’s remotely possible a browser setting might be only allowing one channel of streamed sound at once if it doesn’t overlap, or similar if the sound doesn’t stop when the source goes away when ostensibly closed by proceeding past a storylet.

I could also of course have not explained the situation very well and you are more knowledgeable about music and sound! So do take my experience as field observation . In any case I am able to overlap and play at least two sound sources per page in every browser I’ve tried (being one sound triggered by the root storylet, and another by a branch or result.) I personally tried Chrome and Safari on my Mac, and have heard it also happen in IE on windows XP via bootcamp on a mac laptop.

[quote=Hanon Ondricek]That’s a glitch I have seen on occasion in multiple games. It’s usually caused by the browser not loading a page correctly. You’re looking at the code for the page in Storynexus.

It usually can be cleared with a browser refresh/restart. Or try playing to the storylet again. If it continues to break on that page, it might be caused by an html tag not being closed properly in the storylet code.

In the worst case scenario, the actual page might have gotten written to the DB wrong and either needs to be discarded and re-created, or in dire straits, looked at by FB.

I’d make sure it was a consistent problem and there not a simple html goof before reporting it.[/quote]

Well… I’m still stuck on loading. Does that count as ‘consistent’? Same browser (firefox) but hard refresh (and new day!).

Yeah, there may be a missing bracket in the code that Firky will have to check. I know she’s been busy of late but she will eventually be around.

No rush. I playtest worlds to be helpful. I only gnaw my arms off for worlds I’m playingplaying.

Hi there.
Hi,

Thanks heaps for playing. I’ve just tested those cards around there and they seem to be working fine. Can you try again?

I was mucking around with those cards last night and you may have chanced to play it while I was messing with code.

If it’s still not loading, then I’m stumped. But, tell me and I’ll try to figure out a way to restart you or something.

Hanon. Yes. I have been playing more than one file together, too. It’s nearly done now. I decided I needed to flesh it out with some more music, so a few compositions and it’s done. Yeah, I’ve tried various things, but I think keep it simple stupid is definitely the way to go.

More soon.

Meg