Swift: Setting up a Game Scene in a Single View Application - ios

I'm currently attempting to develop games using the sprite kit on a single view application because there is more to my app than a game. I've found this method quite unorthodox because most games are made by directly selecting the game template at the beginning of the project. I have managed to add the sprite kit framework and I've got the fps, draws, node to show. However I've found on native sprite kit projects they have GameScene.sks, and a pre setup GameScene.swift file into their project. How would I set them up? Do I copy the code and put it into a GameScene.swift file and link it to my GameViewController? How would I find and setup the GameScene.sks file?

Not sure why somebody down voted this question, maybe because the question is not descriptive, but anyway, to create a new scene, on the menu, select File -> New -> File, go to iOS -> Resource, and select SpriteKit Scene, this is will create a new Scene template for you

Related

How to create a scene file for ARKit?

Inside the ARKit sample source code, I can see ".scn" [scene kit files].
I am wondering that how to create a new scene file?
Let's say a coin scene?
Any website where I can download? or learn how to create one for my use? 🤞
You can create one from scratch in Xcode’s “New File” dialog. It’s a resource type (in the same area as GPX files). Chris Language’s book on building SceneKit games has a very nice section on using the Xcode Scene editor, the best documentation I’ve seen on that tool.
You can also use NSSecureCoding and archive an SCNScene that you’ve created programmatically. See SceneKit view is rendered backwards for sample code.

Animation from atlas image in ios (single view based application)

I am new in to iOS programming
I have an atlas *.png format .
All I want to do is to use it as animation
I have googled and all I have found that people using a spritekits for this -> but every tutorial uses "create a spritekit game project" but I have a single view based project :-/
Question can I use those spritekits to animate in a single view based application ?
Some starting point would be nice as well ...
Thanks.

How to create a .sks file to used in spriteKit app

I want to create a custom .sks file, and use it in my spriteKit app. but I don't know how to create it.
anyone who can tell me the details about how to create a .sks file.
These are particle files.
To create one go to xcode, File->New->File...
Then a modal will pop-up go to Resource-> SpriteKit Particle File
Then select the particle type:
Then you can edit your particle effect with the right side bar:
For more details about different particles here

Does a project have to be created as a sprite kit or can the framework simply be added?

I am taking a step backwards to learn sprite kit for the 2D Games I'm making, as opposed to using UIKit. In all the tutorials I've gone through, they've created the new project as a Sprite-Kit as opposed to single-view. Just wondering if I'll have to recreate my games or if I can simply add the sprite kit framework to my existing project?
Thanks.
The framework can simply be added.
Check the Sprite Kit Programming Guide from Apple. Apple is creating their Sprite Kit's example from a Single View Application and then Apple is adding the Sprite Kit framework to the project.

What is the right way to design a point and click game with Lua?(Corona)

I have some ideas,I have already drawn the scenes roughly and put them into corona.
This is how I would think it would work.
1.I have all the major scenes
2.In each major scene ,there are mini scenes,which lead to smaller scenes with puzzles.
3.I create a game.lua module so it would handle the game logics,and keep track of them.
Example:
A.Door is opened,puzzle number one is solved.
B.Send a costume event to the game module.
4.I need a separate module for inventory box so it acts as an overlay over other scenes.
It also interacts with game module.
.
I know you might say,wait till you get started,but Am I on the right Track?
Do you have better suggestions or know any code examples(Corona Sdk,Lua,Moai,GiderosMobile)?
.
Thanks in advance
I am making a game more or less on this style using Corona, there are a beta on google play.
Corona SDK offers a API named Storyboard, that API allow you to code each scene as a lua module, and allows also you to load a scene as a "overlay".
I guess that you would make each of your scenes a full Storyboard scene, and the inventory a "overlay" scene.
The difference between overlay to a normal scene, is that when you load a overlay it triggers a event on the scene that was open instead of unloading that scene (And when the overlay is unloaded, it triggers another event)
So yes, at least if you do it in Corona, you are in the right track!

Resources