Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

End credits

edited November 2016 in Help! with 2.0
I'm looking for the CSS that will give me a fade in / fade out on the text, for the closing credits to my game.

I need the credit to fade in, hang around for a second or so, then fade out before the next one fades in at the same spot.

I have CSS doing a similar thing for my intro, but this just fades in and stays until the player clicks it. I wouldn't know how to have it hang around, then fade out and be replaced by the next credit.

Any help much appreciated.

Comments

  • I'm not sure how to do this, but you could try combing the stuff at the intro with the (live:) macro?
  • Thanks, Deadshot. Never used the macro you speak of but I'll investigate.
  • I'm almost there, but can't figure something out.

    I have a series of passages, one for each credit. I've given each of these passages the tag credit

    In the first passage I have:
    First credit goes here<<timed 8s>><<goto "finish2">><</timed>>
    

    Where finish2 is the name of the passage containing my second credit. Then in the finish2 passage I have the same script, but it leads to finsih3 and so on.

    Then in my CSS I have:
    body.credit {-webkit-animation: creditfade 7s; padding: 260px 80px 0 0; font-size: 150%;}
                @keyframes creditfade {from {opacity: 0;} to {opacity: 1;}}
    
    But when I test this in my browser, the fade only works on the very first credit.
  • Oh, are you using Sugarcube. If so, (live:) probably isn't a thing.
  • Yeah, sorry. Sugarcube 2.11.0.

    Never did figure out why the above doesn't work, though.

    Anyone?
  • My guess is the body class isn't changing, so the animation isn't getting retriggered. If that's the problem, you could try using a separate class for each credit passage. Add them to your CSS like this:
    body.credit, body.credit2, body.credit3 {-webkit-animation: creditfade 7s; padding: 260px 80px 0 0; font-size: 150%;}
                @keyframes creditfade {from {opacity: 0;} to {opacity: 1;}}
    

    I don't know how you're putting the credit class onto the passages, but the idea is that instead of putting "credit" on each one, the first would get "credit", the second "credit2", the third "credit3", etc.
  • edited November 2016
    Thanks, mcd, I'll give that a go now. I put the class on the passages my simply adding it as a tag.

    No, that didn't fix it, but nea bother. It's finished now. Quite happy to see the back of it if I'm honest.
  • Jud_Casper wrote: »
    Thanks, mcd, I'll give that a go now. I put the class on the passages my simply adding it as a tag.

    No, that didn't fix it, but nea bother. It's finished now. Quite happy to see the back of it if I'm honest.

    What's finished? The credits or the game? Cause if it's the game could you upload it to a website that has hosting and give us the link?
  • edited November 2016
    Yes, I mean the game. You can play it from here: Aftermath
    Thanks for the interest :)
  • edited November 2016
    Played through Aftermath, and I like it a lot! For whatever it's worth, when you drop the "g" at the end of a word, it's conventional to replace it with an apostrophe (leaving vs. leavin')-- just something to consider when making a proofreading pass. I thought the sound effects did a great job of conveying a sense of atmosphere and place, and I liked the way in which the protagonist and characters living in the world you described acted like real people and didn't feel the need to narrate the backstory of the cataclysm and its aftereffects to the reader. xD

    Do you plan to expand upon this game in the future, or are you turning your sights to other projects?
  • @storymasterq - I'm sure it's not the only typo :)

    @Wraithling - Thank you very much for playing. I'm very glad you enjoyed it. As for the typos, I thought I had used apostrophes for the lazy speak - maybe I missed a couple.

    I have no plans to expand on it, but my next project will be a sci-fi parser game. Unfortunately I can't use Twine for this (I say unfortunately because it's by far the most user-friendly of these things I've used so far - stable as hell, too).
  • Wraithling wrote: »
    Played through Aftermath, and I like it a lot! For whatever it's worth, when you drop the "g" at the end of a word, it's conventional to replace it with an apostrophe (leaving vs. leavin')-- just something to consider when making a proofreading pass. I thought the sound effects did a great job of conveying a sense of atmosphere and place, and I liked the way in which the protagonist and characters living in the world you described acted like real people and didn't feel the need to narrate the backstory of the cataclysm and its aftereffects to the reader. xD

    Do you plan to expand upon this game in the future, or are you turning your sights to other projects?

    Sometimes when it's clear the character is using slang you don't need the apostrophe. Especially in words like kinda (kind of).
  • Deadshot wrote: »
    ...when it's clear the character is using slang...
    The main problem with (English) slang is that it is generally very regional.

    This means it is easily for those from a different (English) region or non-native speakers (readers) to mistake it for a spelling error, or just a made up meaningless word.
Sign In or Register to comment.