intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Dec 16, 2017 7:56 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sun Aug 13, 2017 5:18 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 1009
Is there currently any way to edit a gblorb released with a Quixe interpreter in order to allow Glulx's sound abilities to work?

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 13, 2017 6:10 pm 
Offline

Joined: Fri May 31, 2013 3:54 pm
Posts: 101
In the absence of proper sound support in Quixe, you'd probably have to use a multimedia library like Vorple or distribute your game with a hacked version of Quixe that has custom sound code. If you went that route, one option would be to use something like the technique I described here, embed an audio player in the page, and have the game control it with Javascript.

Vorple would probably be easier (although the webserver requirement is a pain).


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 13, 2017 6:29 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 1009
This is for an IFComp game, so I could just try out Vorple with their upload tool. I love Vorple, but the last time I tried it, it didn't support things like Restart.

I would completely try the audio player idea if I had any idea how to do it (your hack makes sense, but what to do after that is something I haven't studied).

Thanks for the suggestions! You've given me some good ideas.

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 13, 2017 7:03 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 1009
You know, I could just do the javascript hack for online play and do the standard gblorb for sound on an interpreter. Maybe I'll try to do that!

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 13, 2017 8:52 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 1009
This turned out to be super easy; I added your code, as well as the following audio player (for a music file in the same folder as index.html)

Code:
<audio id="bg_audio">
<source src="Musopen_-_Morning.ogg" type="audio/ogg">
Your browser does not support the audio element.
</audio>


As well as the following Inform 7 code:

Code:
MusPausing is an action out of world. Understand "pause" as muspausing.

Carry out Muspausing:
   say "!js $([']#bg_audio[']).trigger('pause');"

MusPlaying is an action out of world. Understand "play" as musPlaying.

Carry out Musplaying:
   say "!js document.getElementById([']bg_audio[']).play();"


I actually have an in-game way of disguising music codes for offline interpreters, so this is perfect. Thanks! Now I just need to figure out how to add a mute button for people that hate this sort of thing.

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 13, 2017 9:58 pm 
Offline
User avatar

Joined: Fri Sep 30, 2016 7:02 pm
Posts: 404
Location: USA
Off-topic to web-browser, but on-topic to wishful thinking: Wish request that RemGlk get sound, even if incomplete - just some references in the JSON to the blorb sound element at the right generation would be cool ;) The Glulx story Six is a good example.

_________________
Glulx interpreter Android apps are in open beta testing! Three apps to watch for: Incant!, Thunderword, and Thunderword enhanced Text Fiction.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group