SALE: Save 50% on all my books and bundles >>

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 RevenueCat

SPONSORED Building in-app subscriptions are hard. RevenueCat makes it simple. With their open source SDKs, you can painlessly implement subscriptions for your app in hours, not months.

Explore the docs to learn more

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.

Snapthread is a casual video editor and slideshow maker that makes discovering, compiling and sharing your favorite memories effortless.

 
Unknown user

Not logged in

Log in