Adding Images and Music to Your Twine 2.1 Game (SugarCube 2)
Вставка
- Опубліковано 23 бер 2018
- Part 3 of the Total Beginner's Guide to Twine 2.1. For more information, all relevant code, and the rest of the videos, see adamhammond.com/twineguide/
** If you like this video, buy my book about indie games, The Far Shore www.adamhammond.com/the-far-sh... It's sorta related and has Twine content! **
(I lost access to my old academic account at San Diego State University, so these are now back at my current University of Toronto account!) - Навчання та стиль
Fading audio in and out work now. You do need to set the volume to 0 initially for song2, as fadeout transitions from the current volume to 0, and fadein from the current volume to 1. You can do so as follows:
Except this will cause song2 to start playing before song1 has finished fading out (default is 5 seconds).
In order to avoid this you need to use the timed macro to delay the fadein macro.
I personally recommend starting the fadein slightly before the fadeout is finished, but that's up to you.
Hope this helps anyone that was curious about this.
This was hugely helpful to me, thanks mate!
I didn't even know about the timed command and now I've already used it like a mad painter who's discovered a new color!
bless you and this video!! i was about to give up on my project but you were able to explain everything so thank you so much😭
thank you! Very useful guide and your voice is calming
This really helped me with my project, thank you!!!
Is there a similar way to add a background with the use of images stored on a personal computer?
thanks so much for this video i was finally able to add images to twine :)
I initiate everything in StoryInit but don't start any music until the second passage, and it's working perfectly.
I'd assume seigeengine is correct, and this is because of the change to audio and video requiring user interaction in browsers/html now.
Thank you for that information I’m trying to make a game people can play offline, so the best way is to learn about relative paths? Thanks
Well how can I see the images as I am making the game? I could see them after publishing, but publishing each time and overwriting seems very inefficient to say adjust an just image size a few times.
So underrated :O
This is actually the 'how to add images' video, not the CSS video?
how do you resize images? I have tired both
but still get an error screen
In case you're still stuck with this, this worked for me:
@@eldritchedward Thanks a bunch!
Your music is on your personal files?
How do iI make get the messege link
does this work with gifs?
when it comes to the audio part, it keep telling me "Harlowe macros use a different syntax to Twine 1, SugarCube, and Yarn macros." why is that? mine does not work as yours
go into change format and change it to sugarcube 2.1
but if i do that everything that i worked will be erased? i mean all the passages imgs connections etc@@nathantriestoanimate2978
I believe the audio part isn't really working anymore. Not sure if it's storyinit or the command itself, i've tried both referencing to the .ogg manually and initing it with a codename and neither work :/
StoryInit seems to be the culprit because I initialized it in a new story slide as the first slide where i initialized the audio and had it play back on the next slide which apparently works. Doesn't do looping very well despite I've cut it on the zero x-crossing point and it's looping fine everywhere else (and it's also .ogg so there's no ID handle at the beginning)
@@ariae have you found the alternate solution?
@@rasisdegreat7747 Yes I made a new story slide where the game starts and put initializing there, then the player clicks the next passage and there I start the audio
@@ariae how'd you do it? (codes) cuz i'm having troubles
@@KAshri-vd6vi If you followed the video, take everything in "StoryInit" and put it on a new slide. Play that slide before starting your game and it works, StoryInit didn't work for me.
this didnt work for me idk why
the image didn't appear for me
Same it only showed an image icon
same
Hi Adam, Thanks for making this video. It has been very helpful. I am a newbie in coding. I have no problem playing the twine game I have created with image and audio when I played it on the MacBook that I have stored the image and audio files. But if I play the game in another computer or via my phone, the images and audio do not surface. I will get the alt text for the images and no audio at all. How do I rectify that? Happy New Year. THANKS.
Hi Colin. To make it play correctly for others, you need to get the .html and all associated media files up together somewhere on the web. There are quite a few options, paid or unpaid. Google "free web hosting" to see some free options.
@@adamhammond749 thanks for the prompt reply ... I will check them.
Finally have it posted ... I host the files on OD and shared via DrivetoWeb ... the loading is slow especially for the audio and video files ... but it will suffice for the beta testing phase ... think I will eventually host it on Itch or Text Adventures ... Thanks again for creating the Twine tutorials.
@@colinjustinwan Awesome! I do think Itch is the way to go -- easy to upload whole folders with media files, fast, easy to receive donations... seems like the current easiest go-to for Twine hosting.
Please, help me. Music doesn't work.
I tried everything
@@jakubfousek6701 Same here, I'm doing everything correct unless is it's different for Macs than on Windows?
This has to do with changes to browser restrictions. The issue is playback now requires user interaction, meaning you can't automatically start audio on your first passage.
The simple workaround is to have your first passage be a splash screen showing the title of your game, and then linking to the start of your actual game, which can play the audio since you will have had to interact with the web page to get to the second passage.
@@seigeengine Thank you so much! I had this problem too!
@@seigeengine This was the fix for me. Start the music on the 2nd passage and have a token first passage (wish I'd read your comment earlier 😆)
15:25