iOS7 SpriteKit how to implement text-heavy HUD elements?

666 views Asked by At

I'm building a SpriteKit based game and would like to have a heads up display to show various unit statistics (Example below on left). A user taps on a unit and can bring up a panel that hovers over the screen and is relevant to the current unit. The user can dismiss the panel at any time and go back to gameplay.

I've looked at the sprite kit programming guide, and see that it is limited to a one line label nodes that are built in Sprite Kit. I'm also aware of this answer on adding a UITextField within didMoveToView:

However, reading the documentation it appears that didMoveToView: gets called once the scene loads. I've also seen that scene transitions are possible, but the panel that I'm thinking of does not require a full screen transition.

How would I implement a HUD panel like below using UIView and SpriteKit elements in iOS? Are there any open source projects that can give me a head start on this task?

enter image description here

1

There are 1 answers

0
Geri Borbás On

Simply make a UIKit app as you would normally. The SpriteKit SKView and the SKScene you present within should be just one of your views in the hierarchy.

I think in SpriteKit really should just implement actual game scenes, all the menu / overlaying HUD can be done in UIKit. That is what it stands for.