FREE: Start my 100 Days of SwiftUI today! >>

SOLVED: Opening Credits Crawl (Like Star Wars)

Forums > Swift

I want to present a narrative to my user when first entering my game. They have the option to skip and move on to game play, but would envision something like the opening scene to every Star Wars movie with text starting at the bottom, and moving away into infinity. For now, I'd be happy w/ something that will just automatically scroll up the screen until finished.

I've thought of using an SKLabelNode with a numberOfLines set to something way high, formatting my text w/ "\n" line breaks then doing a move action to slowly "crawl" it up the screen but wondering if anyone has a better solution to something like this.

Thanks...and loving the forum Paul...checking it multiple times a day.

   

If SwiftUI is an option, you could try this:

How to Create Star Wars Animated Text Using SwiftUI

2      

You'd probably use a scroll view for that.

See if this link helps: https://stackoverflow.com/questions/2234875/programmatically-scroll-a-uiscrollview

1      

Thanks folks, but the SwiftUI approach was kind of jerky and the text shifts as the view scrolled away.

Not happy w/ UIScrollView approach b/c this is a SpriteKit game and incorporating that into my scene just for one block seems overly complicated.

Decided to use iMovie to create a small video using the Far Far Away title w/ my text. This is just for the game narrative and would not change, so a small footprint video seems like a good approach for now.

1      

Hacking with Swift is sponsored by Bitrise

SPONSORED Build better iOS apps, faster. Looking for a great mobile CI/CD solution that has tons of iOS-specific tools, smooth code signing, and even real device testing? Learn more about Bitrise’s iOS-specific solutions.

Sign up for a free trial!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Listen to the Swift over Coffee podcast

 
Unknown user

Not logged in

Log in