Building a Game on an iPad with Swift Playgrounds | Rockets are Fun

  Переглядів 11,666

JohnDav

JohnDav

День тому

In part one of this multipart Swift Playgrounds game build I'm laying the foundation for my new physics-based game "Rockets Are Fun". In the video, I'm starting by creating a simple UI using SwiftUI, and then by using SpriteView I can inject a SpriteKit scene right into that main window.
Part 2 - Adding Fuel Gauges with SwiftUI: • Using SwiftUI's Built ...
Now using inside of GameScene I'm able to build my physics-based rocket game with SpriteKit. Today's video covers the steps to get the rocket moving by using taps on the screen to control rotation and velocity.
I also found a way to provide some visual feedback to the player through two mechanisms right now. First, a fuel particle is expelled from the rocket as it moves. Second I used Apple's spinnyNode from their game template file in SpriteKit to denote which type of tap was registered by the player.
In the next video I'll be adding a fuel resource, the ability for the rocket to shoot, and much much more. Get subscribed if you want to see how this game progresses over the next few weeks.
0:00 - Setup a Swift Playgrounds project
1:02 - Building a basic game UI in Swift Playgrounds
4:28 - Giving the rocket physics and adding the ground
9:54 - Controlling the Rocket with addImpulse through player taps
16:43 - Adding Visual Feedback for player controls
//Things I've Made
ZER0ED: apps.apple.com/us/app/zer0ed/...
Shapes&Numbers: apps.apple.com/us/app/shapes-...
My Website: www.johndav.com
//Affiliate Links To Gear I Use
MacBook: amzn.to/3q6y8wT
iPad Pro: amzn.to/37EZmol
Apple Pencil: amzn.to/3iba2gb
Camera: amzn.to/363IpDp
Lens: amzn.to/3iiLSAl
SM7B: amzn.to/3IjSclM

КОМЕНТАРІ: 17
@J-Life
@J-Life Рік тому
I have been using my iPad pro to develop normal apps, but now I really want to try my hand on game dev also😁 great inspiration!
@John-Dav
@John-Dav Рік тому
Game Dev can be a lot of fun. Swift Playgrounds is great for prototyping and small games I've had a lot of fun with it. :)
@J-Life
@J-Life Рік тому
@@John-Dav cant wait for part 2!
@fatih8087
@fatih8087 10 місяців тому
Hi John, I love your videos. I am a student and I have started learning Swift as a hobby. However, there are not enough sources available in my native language. Additionally, my English level is not perfect, so I cannot understand every single English source except for your videos. When I watch them, I clearly understand. This is actually a gift for me. Thank you so much :)
@John-Dav
@John-Dav 10 місяців тому
So happy my videos are helpful. Love to hear that!
@skulling4893
@skulling4893 Рік тому
Where do you learn all this, im trying hard to learn to make games on swift playgrounds since i do so happen to have an iPad Pro with a Magic Keyboard so the setup is quite the same… but i never understand anything, the templates doesn’t seem to help and this is the only app available on iPadOS that is made for quote on quote “game developpement”. Do you know any learning course i could start following to start learning to code.
@John-Dav
@John-Dav Рік тому
While I've learned a lot from UKposts channels like Paul Hudson, Sean Allen and others, most of my learning has come from completing small projects like the one in this video. I set out with an idea "Make a game with a rocket ship that is controlled by SpriteKit's physics engine using player touch as an input" Then I start working. Sometimes this could be with pen and paper to rough out the idea, then maybe a little code to get things moving. Every time I hit a road block its back to the internet to do more learning. This could be googling a specific question, reading Apple's documentation on a specific framework or function, or watching a UKposts tutorial on a topic. Sometimes I just bang my head against my keyboard when nothing works until my wife tells me to go to bed. That's all to say - I really can't recommend any specific learning course - but what I can recommend is that you start small. Make a tiny game. Follow a tutorial or build video like this one and try to replicate it (or better yet - make it your own). Hope this helps & thanks for watching!
@skulling4893
@skulling4893 Рік тому
@@John-DavWow thats quite surprising to have such feedback. But really thank you and keep up the good work 💪👏
@Editwithhim
@Editwithhim Місяць тому
Hey sir can i purchase i pad to learn python and start learning basic programming as i havent budget for pc or laptopp
@John-Dav
@John-Dav Місяць тому
Yes an iPad could handle this. But a cheap laptop would also be able to write simple scripts and may be a bit easier to use as the iPad is kind of limited due to iPadOS. Given the choice I’d buy a computer to do this. But if I had access to an iPad I’d make it work without spending additional money. Hope that helps
@Middyman43
@Middyman43 2 місяці тому
After the “if location.x > 100 + taco.position” the rocket thrusters i keep getting an error saying can’t convert cgpoint to expected cgfloat
@John-Dav
@John-Dav 2 місяці тому
You probably need to do taco.position.x since the location.x. Just a guess tho.
@user-zv4yb1nt4s
@user-zv4yb1nt4s 3 місяці тому
can i make a 3D game with 3D characters i make in swift playgrounds or any another app on ipad ?
@John-Dav
@John-Dav 3 місяці тому
I doubt Swift Playgrounds can handle 3d game development. It’s pretty basic and limited.
@KCc-hk1yb
@KCc-hk1yb 4 місяці тому
HOW did you get dark mode on the app???
@SpicyBeef12
@SpicyBeef12 Місяць тому
set your ipad to dark mode
Using SwiftUI's Built In Charts Feature in Swift Playgrounds!
28:50
I tried coding on my iPad for 7 days
7:25
Adrian Twarog
Переглядів 1,7 млн
Get a knife! | Standoff 2
01:06
Standoff 2 Live
Переглядів 1,5 млн
LIVE - Парад Победы в Москве. 9 Мая 2024
2:27:56
AKIpress news
Переглядів 2,2 млн
Will ChatGPT Destroy iOS Developer Jobs? A Demonstration
24:05
Sean Allen
Переглядів 153 тис.
Introduction to SpriteKit
10:27
DesignCode
Переглядів 106 тис.
I Tried the Cheapest iPad for Coding! Don't Buy Unless..
13:05
Singh in USA
Переглядів 112 тис.
Make an App in Swift Playgrounds | UPDATED
6:38
Martin Kolka
Переглядів 7 тис.
Deep Dive Into Using SpriteKit On an iPad | Is This Xcode On iPad?
24:03
I Created A Mobile App Using These Simple Tools!
10:48
Simon Grimm
Переглядів 565 тис.
Coding Python on iPad - Install Python
13:48
Elliott
Переглядів 155 тис.
Make Video Games
44:12
Pirate Software
Переглядів 893 тис.
Coding on iPad | Episode 2 | Swift Playgrounds, GitHub, Apple Developer
11:27
Игровой ноутбук за 100тр в МВИДЕО
0:58
KOLBIN REVIEW
Переглядів 711 тис.
Phone charger explosion
0:43
_vector_
Переглядів 48 млн
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Переглядів 5 млн