Building a space shooter with SpriteKit and Codable - Swift on Sundays March 31st 2019

  Переглядів 56,558

Paul Hudson

Paul Hudson

День тому

In this episode we use SpriteKit, physics, particle effects, Core Motion, and Codable to build a fast 2D shoot 'em up set in space.
You can download the finished project for this and all Swift in Sundays streams: github.com/twostraws/SwiftOnS...

КОМЕНТАРІ: 61
@twostraws
@twostraws 4 роки тому
Watch next: Building a multi-screen Markdown renderer - ukposts.info/have/v-deo/jYmnnYKggGijzY0.html Questions? Comments? Tweet me @twostraws.
@bodhibilly5321
@bodhibilly5321 2 роки тому
instablaster...
@vbolvobl8663
@vbolvobl8663 2 роки тому
@vbolvobl8663
@vbolvobl8663 2 роки тому
@@bodhibilly5321 េថដដដររថារា
@gregcampbell3493
@gregcampbell3493 5 років тому
Paul, thank you so much for sharing your knowledge with us. You are a gifted teacher.
@semilife
@semilife 4 роки тому
A very belated thank you. Another great session, building a nice action game. Love your humor, enthusiasm and generosity. Learned loads.
@victorrazvan70
@victorrazvan70 4 роки тому
This entire thing is brilliant! I love all these classes!
@CraigSchubert
@CraigSchubert 5 років тому
Thank you for these streams Paul!! I haven't watched one live yet (partly due to the time difference to Oz) but love watching them. Your comment about taking 6-8 hours to prep really helped me as well since it makes it seem more manageable compared to thinking you do this all completely on the fly. :-P After watching this I was dreaming about coding* - enjoying being on the start of this journey. :-) Oh, and I'd love to see some AR stuff as well - can't wait! * could be partly due to being sick, but anywho...
@TheTwoNotes
@TheTwoNotes 4 роки тому
Been coding Java, etc... since Java 1.2 days. Wrote my first iOS app w/ Obj-C years ago and am ramping into Swift dev now. Loved this video, great intro to SpriteKit. Looking forward to exploring your posts further and hopefully catching you live one of these Sunday's. Thanks!
@chrispy104k
@chrispy104k 4 роки тому
Great project Paul, thank you.
@fawadfarooq
@fawadfarooq 5 років тому
Thank you so much Paul for such marvlous tutorial and explanation.
@t0mmx
@t0mmx 2 роки тому
More like these please. Great stuff! 🙌
@kellyrodgers9326
@kellyrodgers9326 3 роки тому
Brilliant tutorial. Thanks Paul Hudson.
@MrPemela
@MrPemela 3 роки тому
2 Years later but I loved the video, thanks for the good content
@MrPaulHuynh
@MrPaulHuynh 3 роки тому
Thank you for your time. Love the video!
@angry_moose94
@angry_moose94 3 роки тому
awesome glad I found this channel!
@bluebeeryale
@bluebeeryale 5 років тому
Awesome!! Thanks, Paul!
@tehLilaQ
@tehLilaQ 3 роки тому
Love it! Thank you so much for these!
@droneguy1989
@droneguy1989 2 роки тому
Thanks Paul!
@JC-cd6kg
@JC-cd6kg 4 роки тому
Very informative and helpful!
@TheBardsCorner
@TheBardsCorner 5 років тому
Thank you for this greatest stream! I'm so happy that the things aren't so alien to me anymore after the first SpriteKit project in Hacking with Swift. Things really do come together quite nicely! I would really love to come and meet you (and Luna, of course... well, mostly Luna, right?!) but when I see that the conference price would be the last of my troubles I get a wave of sadness washing over me... flight, hotel and trains fares are just... OMG! :-(
@victornoagbodji
@victornoagbodji 5 років тому
thank you for posting these videos. i started watching in order to learn how to make desktop games and apps for the mac itself. no one seems to cover the macos development, but i suppose the same principles should apply. one thing i would love to see covered is what all those files in the template do (AppDelegate, Info.plist, storyboards, etc.) or a pointer to a resource that covers them. thanks.
@SweetHoneycode
@SweetHoneycode 2 роки тому
Thanks for sharing this!
@megustaeljamonelchorizoylo560
@megustaeljamonelchorizoylo560 2 роки тому
Thank you for your time, great video, God bless you
@maldrax
@maldrax Рік тому
Thank you for this stream! I just made my first game in swift!
@davidatbass
@davidatbass 3 роки тому
that's quite a master class!
@0xAlx
@0xAlx 4 роки тому
Very nice and simple, good explanation, nice evening for me :)
@sergey9213
@sergey9213 3 роки тому
thanks, that was very helpful
@HelloThere65272
@HelloThere65272 2 роки тому
Literally the first video ever that I pressed the like button on because I was reminded of it by the creator. Also leaving a comment for the algorithm. Love your stuff!
@twostraws
@twostraws 2 роки тому
Thank you! I'm glad you enjoyed it 🙌
@boxherold1177
@boxherold1177 4 роки тому
Great example! Could you show how to control something like this with a Bluetooth Xbox/ps4 controller? I heard they are now usable as an extended game pad but I can’t find any examples.
@ogdcscdd7128
@ogdcscdd7128 4 роки тому
Hey Paul amazing tutorial ! please how can we do to restart the game ?
@gergelykovacs6577
@gergelykovacs6577 2 роки тому
Awesome stuff! I have question here: I have a 6th gen. 9'7'' Ipad. My Spaceship always leaves the scene up and down. I have debugged the properties and maxY, and minY are actually way off the screen. So those doesn't seem to limit the movement of the ship enough. minY is -667.0 and maxY is 667.0. So I basically had to adjust those values by 400 or -400 at the check. Why is the minY and maxY not changing automatically set with device? Awesome material though, thank you for sharing your knowledge!
@jayjay77777
@jayjay77777 4 роки тому
how could I use motion manager to make the ship move anywhere on the screen?
@williamchoy885
@williamchoy885 3 роки тому
Great understandable video.... as usual. I was trying to scale the explosions to the size of the enemy. So the biggest ships have a 1.5 scale and the small ships have a 2/3 scale explosion, with the following. if let explosion = SKEmitterNode(fileNamed: "Explosion") { explosion.particleScale = CGFloat(400.0) / enemy.speed explosion.position = enemy.position addChild(explosion) } enemy.removeFromParent() But I get a big yellow screen with outlined nodes. What did I do wrong? Workaround: Have 3 different "Explosion.sks" file.
@lemuelapperson853
@lemuelapperson853 2 роки тому
Even two years later there is till value here. want to do more with SpriteKit. Perhaps as way to enhance the dynamic experience of my apps. I'm thinking of crafting a rainfall of flowers.
@alainperez8579
@alainperez8579 4 роки тому
By any chance could you make a SpriteKit series
@williamsquires3070
@williamsquires3070 5 років тому
Hi Paul. At 9 minutes in (roughly), after you “clean” the project, why not save it, and make it the new iOS “SpriteKit Game” template; this way you don’t have to go through the whole rigamarole every time?
@bdziamara6376
@bdziamara6376 5 років тому
Great video, but when I tried the build at 1:03:20 (after addchild(enemy and node)) i get fatal errer: Index out of range highlighting the Else portion of if current.wave.enemies.isempty. (when it does addChild(node) at the end). Thoughts?
@juicytoys7898
@juicytoys7898 5 років тому
seems like we having similar problems
@TheZSoks
@TheZSoks 4 роки тому
I had the same issue. I just placed GameScene.swift below wave.json and then it worked
@shiftyneil
@shiftyneil 2 роки тому
I know its 2 years later but did you ever fix this issue? Im having the same problem, thanks
@WisitchaiS
@WisitchaiS Рік тому
9:53 @seanallen 's picture in your Downloads?
@shauryajoshi3091
@shauryajoshi3091 4 роки тому
Value of type 'Bundle' has no member 'decode' This popped up after 35:36
@BenjoCodeburn
@BenjoCodeburn 2 роки тому
What's the name of the xcode software used to create this app. I'm using xcode 13 and the layout is very different so it's hard to navigate when this xcode on the video is clearly different.
@shiftyneil
@shiftyneil 2 роки тому
HI, This has come in handy even now but for some reason I cant access the decode function after adding it to Bundle, im following everything you did but I get an error "Value of type "Bundle" has no member "Decode". any help will be welcome, thanks
@curt8806
@curt8806 3 роки тому
The only thing I don't like about Paul's videos is that he doesn't preview enough of the code he's building. It get's a little overwhelming seeing code and code all the time.
@juicytoys7898
@juicytoys7898 5 років тому
1:02:23 it says build succeeded for me, but also says "thread 1 fatal error failed to locate wave.json in bundle " what do I gotta change for app to run??
@bdziamara6376
@bdziamara6376 5 років тому
Didn't even see your post. Sorry for the repeat!
@jakesimpson7310
@jakesimpson7310 4 роки тому
Did you ever fix this issue I seem to be having the same one
@TheZSoks
@TheZSoks 4 роки тому
I had the same issue. I just placed GameScene.swift below wave.json and then it worked
@envyhose6315
@envyhose6315 4 роки тому
you might've mispelled the file name in GameScene.swift it's "waves.json"
@chrispy104k
@chrispy104k 4 роки тому
Shouldn't make any difference whatsoever where the json file is located in the root folder of the Bundle.
@realdanielpeach
@realdanielpeach 4 роки тому
Am I commenting just bc you said so? maybe... but hope it still counts to UKposts!
@danielniels22
@danielniels22 Рік тому
i'm 4 years late. can i still learn the basics of SpriteKit here? or is there any major or significant changes that makes me perhaps couldn't follow along?
@twostraws
@twostraws Рік тому
Nothing has changed; you're safe to continue.
@BananaPajamaGamer
@BananaPajamaGamer Рік тому
After defining the physics body, I get the error "PhysicsBody: Could not create physics body." Anyone know a fix?
@danielniels22
@danielniels22 Рік тому
did you fix it? how please..
@danielniels22
@danielniels22 Рік тому
did you fix it? how please..
Codable, Decodable, and Encodable in Swift | Continued Learning #21
35:23
Swiftful Thinking
Переглядів 18 тис.
Introduction to SpriteKit
10:27
DesignCode
Переглядів 106 тис.
когда одна дома // EVA mash
00:51
EVA mash
Переглядів 2,2 млн
ВЫШИБАЛЫ - Сатир, Янчик, Джарахов, Миша, Антон Форсаж
1:09:04
Let's Make Pong! (Pt. 1 : Swift 3 in Xcode : SpriteKit)
16:53
Jared Davidson
Переглядів 138 тис.
7 Game Design Mistakes to Avoid!
9:51
Ask Gamedev
Переглядів 747 тис.
Presenting a SpriteKit GameScene - Mobile Games Development
4:56
Daniel Budd
Переглядів 2 тис.
SpriteKit Invaders Part 1 - Setting up the player and movement
19:34
Why Some Designs Are Impossible to Improve: Quintessence
33:03
Design Theory
Переглядів 48 тис.
I re-coded Minecraft, purely for MAXIMUM FPS
11:26
Element X
Переглядів 63 тис.
World's Longest T-Shirt Launch | OT 33
19:41
Dude Perfect
Переглядів 15 млн
How to integrate SpriteKit using SpriteView - SwiftUI
3:34
Paul Hudson
Переглядів 14 тис.
Такого вы точно не видели #SonyEricsson #MPF10 #K700
0:19
BenJi Mobile Channel
Переглядів 212 тис.
Интел подвинься, ARM уже в ПК!
14:06
PRO Hi-Tech
Переглядів 132 тис.
Самый маленький игровой ПК
0:46
ITMania - Сборка ПК
Переглядів 225 тис.
I had no idea SHEIN sold PC parts…
27:10
Linus Tech Tips
Переглядів 1,3 млн
Как открыть дверь в Jaecoo J8? Удобно?🤔😊
0:27
Суворкин Сергей
Переглядів 735 тис.