Beginner Questions on IOS Game Programming


(Rich De Steno) #1

I have experience with C++ on Windows as a game creator but I want to explore putting them in IOS app form through Swift for the iPhone. I went through the information at www.swift.org and read much of the language guide. I see the material on functions, variables, constants, and such, but I did not come across anything on other major subjects, such as user input in an app, playing sounds and perhaps wav files in an app, and similar subjects that are required in many apps and certainly in games. Where can I learn about how to code these types of items. Is there a more comprehensive guide? Pardon the elementary level of these questions, but I had to code all of these types of things out in C++.

···

--
Rich De Steno


(Erica Sadun) #2

Search around for Objective-C tutorials, and then just apply them in Swift. For much of the game programming, what you're learning are the Cocoa/Cocoa Touch APIs (Foundation, UIKit, SpriteKit, SceneKit, etc) rather than a specific language.

-- E

···

On Feb 14, 2016, at 6:37 AM, Rich De Steno via swift-users <swift-users@swift.org> wrote:

I have experience with C++ on Windows as a game creator but I want to explore putting them in IOS app form through Swift for the iPhone. I went through the information at www.swift.org and read much of the language guide. I see the material on functions, variables, constants, and such, but I did not come across anything on other major subjects, such as user input in an app, playing sounds and perhaps wav files in an app, and similar subjects that are required in many apps and certainly in games. Where can I learn about how to code these types of items. Is there a more comprehensive guide? Pardon the elementary level of these questions, but I had to code all of these types of things out in C++.

--
Rich De Steno

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Brent Royal-Gordon) #3

I went through the information at www.swift.org and read much of the language guide. I see the material on functions, variables, constants, and such, but I did not come across anything on other major subjects, such as user input in an app, playing sounds and perhaps wav files in an app, and similar subjects that are required in many apps and certainly in games. Where can I learn about how to code these types of items. Is there a more comprehensive guide?

The Swift documentation is specifically about the Swift language itself, not specific environments or tasks where it might be used, like iOS games. I would look for resources (books, blogs, etc.) on iOS game programming; much of it will already be in Swift, and even the stuff in Objective-C or C++ will teach principles you can apply to Swift game development.

···

--
Brent Royal-Gordon
Architechies


(Eric Wing) #4

You will need a Mac to ultimately build for iOS. However, you can
follow the cross-platform game development route. Since Swift has
really good C interoperability, you can start there for your platform
layers and start building up your game logic in Swift.

I'm building a new SDK that is does just that. I just put a little
video trailer together showing using a same Swift code base on
SteamOS/Linux, then Mac, then iOS, and then Raspberry Pi 2. SDL is the
platform layer.

https://youtu.be/w8ftI9mpGdY

Thanks,
Eric

···

On 2/14/16, Rich De Steno via swift-users <swift-users@swift.org> wrote:

I have experience with C++ on Windows as a game creator but I want to
explore putting them in IOS app form through Swift for the iPhone. I
went through the information at www.swift.org and read much of the
language guide. I see the material on functions, variables, constants,
and such, but I did not come across anything on other major subjects,
such as user input in an app, playing sounds and perhaps wav files in an
app, and similar subjects that are required in many apps and certainly
in games. Where can I learn about how to code these types of items. Is
there a more comprehensive guide? Pardon the elementary level of these
questions, but I had to code all of these types of things out in C++.


(Jack Lawrence) #5

There is also official documentation at https://developer.apple.com/resources/. For games, you’ll want to check out SpriteKit (2D games) and SceneKit (3D games):

https://developer.apple.com/spritekit/
https://developer.apple.com/scenekit/

Jack

···

On Feb 14, 2016, at 3:47 PM, Brent Royal-Gordon via swift-users <swift-users@swift.org> wrote:

I went through the information at www.swift.org and read much of the language guide. I see the material on functions, variables, constants, and such, but I did not come across anything on other major subjects, such as user input in an app, playing sounds and perhaps wav files in an app, and similar subjects that are required in many apps and certainly in games. Where can I learn about how to code these types of items. Is there a more comprehensive guide?

The Swift documentation is specifically about the Swift language itself, not specific environments or tasks where it might be used, like iOS games. I would look for resources (books, blogs, etc.) on iOS game programming; much of it will already be in Swift, and even the stuff in Objective-C or C++ will teach principles you can apply to Swift game development.

--
Brent Royal-Gordon
Architechies

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Chris Lattner) #6

Or, if you prefer a lower-level API, check out:
https://developer.apple.com/metal/

-Chris

···

On Feb 14, 2016, at 3:51 PM, Jack Lawrence via swift-users <swift-users@swift.org> wrote:

There is also official documentation at https://developer.apple.com/resources/. For games, you’ll want to check out SpriteKit (2D games) and SceneKit (3D games):

https://developer.apple.com/spritekit/
https://developer.apple.com/scenekit/