Recording
making a jumping game in xcode macbook pro
2015-11-15 · 4 min
Machine transcript · wording, timing and speaker attribution may be wrong
Wording, speaker labels, and timestamps can still be wrong. A transcript does not establish that statements in the recording are factual. Use the source links and surrounding context.
Source information & transcript revisions
Transcript revisions
- rev_330d9dc0afdb1298ebd5a937210b5a2bMachine-generated and unreviewed; may be wrong; not a verified quotation.enraw_asractive60 segments
Transcript
I'm going to show you this jumping game.
Segment details
0:00–0:02 · rev_330d9dc0afdb1298ebd5a937210b5a2b_0You click on the screen and it makes this
Segment details
0:03–0:06 · rev_330d9dc0afdb1298ebd5a937210b5a2b_1green block jump up and then it falls back
Segment details
0:06–0:08 · rev_330d9dc0afdb1298ebd5a937210b5a2b_2down. Okay, it's quite simple. All you
Segment details
0:08–0:11 · rev_330d9dc0afdb1298ebd5a937210b5a2b_3need is— we don't need this— we
Segment details
0:12–0:16 · rev_330d9dc0afdb1298ebd5a937210b5a2b_4need an integer and we just called it Hank
Segment details
0:16–0:19 · rev_330d9dc0afdb1298ebd5a937210b5a2b_5jump. We'll call our green block Hank for
Segment details
0:19–0:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_6the moment, and then we need a ImageView
Segment details
0:23–0:26 · rev_330d9dc0afdb1298ebd5a937210b5a2b_7for the floor and an ImageView for Hank,
Segment details
0:26–0:30 · rev_330d9dc0afdb1298ebd5a937210b5a2b_8and then a button for start. But we
Segment details
0:30–0:33 · rev_330d9dc0afdb1298ebd5a937210b5a2b_9haven't done this yet, so we don't need it
Segment details
0:34–0:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_10now. And we need— can
Segment details
0:36–0:39 · rev_330d9dc0afdb1298ebd5a937210b5a2b_11get rid of this— we need an NSTimer for
Segment details
0:39–0:41 · rev_330d9dc0afdb1298ebd5a937210b5a2b_12the falling, and then IBAction for— we
Segment details
0:42–0:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_13don't need this or this. And we need void
Segment details
0:46–0:49 · rev_330d9dc0afdb1298ebd5a937210b5a2b_14HankFalling. Okay, so In .m,
Segment details
0:49–0:52 · rev_330d9dc0afdb1298ebd5a937210b5a2b_15we need— in viewDidLoad,
Segment details
0:53–0:56 · rev_330d9dc0afdb1298ebd5a937210b5a2b_16we need to start the timer, which is
Segment details
0:57–0:58 · rev_330d9dc0afdb1298ebd5a937210b5a2b_17hankFall, and every 0.05
Segment details
0:59–1:03 · rev_330d9dc0afdb1298ebd5a937210b5a2b_18seconds, it's going to be running this
Segment details
1:03–1:06 · rev_330d9dc0afdb1298ebd5a937210b5a2b_19code, hankFalling. And in hankFalling,
Segment details
1:06–1:09 · rev_330d9dc0afdb1298ebd5a937210b5a2b_20hank's center.y is
Segment details
1:10–1:14 · rev_330d9dc0afdb1298ebd5a937210b5a2b_21doing minus hankJump. And hankJump
Segment details
1:14–1:18 · rev_330d9dc0afdb1298ebd5a937210b5a2b_22is equal to -5. So every
Segment details
1:18–1:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_230.05 seconds, it's minusing 5 from
Segment details
1:23–1:27 · rev_330d9dc0afdb1298ebd5a937210b5a2b_24hank's .y, which is vertical.
Segment details
1:27–1:30 · rev_330d9dc0afdb1298ebd5a937210b5a2b_25So I don't think we need this player.
Segment details
1:33–1:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_26Let's just test it out.
Segment details
1:36–1:37 · rev_330d9dc0afdb1298ebd5a937210b5a2b_27Whoops, I broke it. Okay,
Segment details
1:44–1:47 · rev_330d9dc0afdb1298ebd5a937210b5a2b_28there you go.
Segment details
1:49–1:49 · rev_330d9dc0afdb1298ebd5a937210b5a2b_29It's pretty much the same. Yeah, so what
Segment details
1:57–2:02 · rev_330d9dc0afdb1298ebd5a937210b5a2b_30I've done is, so if you press the screen,
Segment details
2:02–2:04 · rev_330d9dc0afdb1298ebd5a937210b5a2b_31touches begin, then hank jump equals 30.
Segment details
2:05–2:08 · rev_330d9dc0afdb1298ebd5a937210b5a2b_32So this is adding 30 to Hank Jump,
Segment details
2:10–2:14 · rev_330d9dc0afdb1298ebd5a937210b5a2b_33and then the time is running, so it's
Segment details
2:17–2:20 · rev_330d9dc0afdb1298ebd5a937210b5a2b_34always minusing 5. So you press the screen
Segment details
2:20–2:23 · rev_330d9dc0afdb1298ebd5a937210b5a2b_35and it goes up by 30.
Segment details
2:23–2:25 · rev_330d9dc0afdb1298ebd5a937210b5a2b_36I think that's what's happening. -5.
Segment details
2:32–2:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_37Yeah, -hankJump. So when you jump
Segment details
2:37–2:40 · rev_330d9dc0afdb1298ebd5a937210b5a2b_38up to 30, it's going to be minusing 5 off
Segment details
2:41–2:43 · rev_330d9dc0afdb1298ebd5a937210b5a2b_39y-axis every 0.05 seconds.
Segment details
2:43–2:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_40And then when Hank touches the floor,
Segment details
2:50–2:53 · rev_330d9dc0afdb1298ebd5a937210b5a2b_41hankJump is going to equal 0, so it will
Segment details
2:54–2:57 · rev_330d9dc0afdb1298ebd5a937210b5a2b_42stop falling. So it's still running every
Segment details
2:57–2:59 · rev_330d9dc0afdb1298ebd5a937210b5a2b_430.05 seconds. But it's falling by 0,
Segment details
3:00–3:03 · rev_330d9dc0afdb1298ebd5a937210b5a2b_44which is— well, 0 is 0. So you
Segment details
3:03–3:07 · rev_330d9dc0afdb1298ebd5a937210b5a2b_45can see it stops falling, and you
Segment details
3:07–3:10 · rev_330d9dc0afdb1298ebd5a937210b5a2b_46can press it again and he jumps. If you
Segment details
3:10–3:13 · rev_330d9dc0afdb1298ebd5a937210b5a2b_47press it twice, he jumps twice. 3 times,
Segment details
3:13–3:15 · rev_330d9dc0afdb1298ebd5a937210b5a2b_48he keeps jumping like this. We need to fix
Segment details
3:16–3:18 · rev_330d9dc0afdb1298ebd5a937210b5a2b_49it so you can only jump twice. This is a
Segment details
3:19–3:21 · rev_330d9dc0afdb1298ebd5a937210b5a2b_50bit strange at the moment.
Segment details
3:21–3:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_51So I'm not sure how to make it jump only
Segment details
3:36–3:38 · rev_330d9dc0afdb1298ebd5a937210b5a2b_52twice.
Segment details
3:38–3:39 · rev_330d9dc0afdb1298ebd5a937210b5a2b_53So this is for my new game I've just
Segment details
3:42–3:44 · rev_330d9dc0afdb1298ebd5a937210b5a2b_54started today, and basically it's going to
Segment details
3:44–3:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_55be like a runner and you have to jump to
Segment details
3:46–3:48 · rev_330d9dc0afdb1298ebd5a937210b5a2b_56jump over obstacles. He's sinking into the
Segment details
3:49–3:51 · rev_330d9dc0afdb1298ebd5a937210b5a2b_57floor. Yeah, it's a bit buggy at the
Segment details
3:52–3:54 · rev_330d9dc0afdb1298ebd5a937210b5a2b_58moment, so lots of things to fix.
Segment details
3:54–3:56 · rev_330d9dc0afdb1298ebd5a937210b5a2b_59