Skip to corpus content
HIMR Public Corpustimestamped source index

Recording

making a jumping game in xcode macbook pro

2015-11-15 · 4 min

internet_archive
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.

Read summary

Expand to load the summary.

Open summary page ↗
Source information & transcript revisions

Transcript revisions

  1. rev_330d9dc0afdb1298ebd5a937210b5a2bMachine-generated and unreviewed; may be wrong; not a verified quotation.
    enraw_asractive60 segments

Transcript

en
  1. I'm going to show you this jumping game.

    Segment details0:00–0:02 · rev_330d9dc0afdb1298ebd5a937210b5a2b_0
  2. You click on the screen and it makes this

    Segment details0:03–0:06 · rev_330d9dc0afdb1298ebd5a937210b5a2b_1
  3. green block jump up and then it falls back

    Segment details0:06–0:08 · rev_330d9dc0afdb1298ebd5a937210b5a2b_2
  4. down. Okay, it's quite simple. All you

    Segment details0:08–0:11 · rev_330d9dc0afdb1298ebd5a937210b5a2b_3
  5. need is— we don't need this— we

    Segment details0:12–0:16 · rev_330d9dc0afdb1298ebd5a937210b5a2b_4
  6. need an integer and we just called it Hank

    Segment details0:16–0:19 · rev_330d9dc0afdb1298ebd5a937210b5a2b_5
  7. jump. We'll call our green block Hank for

    Segment details0:19–0:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_6
  8. the moment, and then we need a ImageView

    Segment details0:23–0:26 · rev_330d9dc0afdb1298ebd5a937210b5a2b_7
  9. for the floor and an ImageView for Hank,

    Segment details0:26–0:30 · rev_330d9dc0afdb1298ebd5a937210b5a2b_8
  10. and then a button for start. But we

    Segment details0:30–0:33 · rev_330d9dc0afdb1298ebd5a937210b5a2b_9
  11. haven't done this yet, so we don't need it

    Segment details0:34–0:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_10
  12. now. And we need— can

    Segment details0:36–0:39 · rev_330d9dc0afdb1298ebd5a937210b5a2b_11
  13. get rid of this— we need an NSTimer for

    Segment details0:39–0:41 · rev_330d9dc0afdb1298ebd5a937210b5a2b_12
  14. the falling, and then IBAction for— we

    Segment details0:42–0:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_13
  15. don't need this or this. And we need void

    Segment details0:46–0:49 · rev_330d9dc0afdb1298ebd5a937210b5a2b_14
  16. HankFalling. Okay, so In .m,

    Segment details0:49–0:52 · rev_330d9dc0afdb1298ebd5a937210b5a2b_15
  17. we need— in viewDidLoad,

    Segment details0:53–0:56 · rev_330d9dc0afdb1298ebd5a937210b5a2b_16
  18. we need to start the timer, which is

    Segment details0:57–0:58 · rev_330d9dc0afdb1298ebd5a937210b5a2b_17
  19. hankFall, and every 0.05

    Segment details0:59–1:03 · rev_330d9dc0afdb1298ebd5a937210b5a2b_18
  20. seconds, it's going to be running this

    Segment details1:03–1:06 · rev_330d9dc0afdb1298ebd5a937210b5a2b_19
  21. code, hankFalling. And in hankFalling,

    Segment details1:06–1:09 · rev_330d9dc0afdb1298ebd5a937210b5a2b_20
  22. hank's center.y is

    Segment details1:10–1:14 · rev_330d9dc0afdb1298ebd5a937210b5a2b_21
  23. doing minus hankJump. And hankJump

    Segment details1:14–1:18 · rev_330d9dc0afdb1298ebd5a937210b5a2b_22
  24. is equal to -5. So every

    Segment details1:18–1:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_23
  25. 0.05 seconds, it's minusing 5 from

    Segment details1:23–1:27 · rev_330d9dc0afdb1298ebd5a937210b5a2b_24
  26. hank's .y, which is vertical.

    Segment details1:27–1:30 · rev_330d9dc0afdb1298ebd5a937210b5a2b_25
  27. So I don't think we need this player.

    Segment details1:33–1:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_26
  28. Let's just test it out.

    Segment details1:36–1:37 · rev_330d9dc0afdb1298ebd5a937210b5a2b_27
  29. Whoops, I broke it. Okay,

    Segment details1:44–1:47 · rev_330d9dc0afdb1298ebd5a937210b5a2b_28
  30. there you go.

    Segment details1:49–1:49 · rev_330d9dc0afdb1298ebd5a937210b5a2b_29
  31. It's pretty much the same. Yeah, so what

    Segment details1:57–2:02 · rev_330d9dc0afdb1298ebd5a937210b5a2b_30
  32. I've done is, so if you press the screen,

    Segment details2:02–2:04 · rev_330d9dc0afdb1298ebd5a937210b5a2b_31
  33. touches begin, then hank jump equals 30.

    Segment details2:05–2:08 · rev_330d9dc0afdb1298ebd5a937210b5a2b_32
  34. So this is adding 30 to Hank Jump,

    Segment details2:10–2:14 · rev_330d9dc0afdb1298ebd5a937210b5a2b_33
  35. and then the time is running, so it's

    Segment details2:17–2:20 · rev_330d9dc0afdb1298ebd5a937210b5a2b_34
  36. always minusing 5. So you press the screen

    Segment details2:20–2:23 · rev_330d9dc0afdb1298ebd5a937210b5a2b_35
  37. and it goes up by 30.

    Segment details2:23–2:25 · rev_330d9dc0afdb1298ebd5a937210b5a2b_36
  38. I think that's what's happening. -5.

    Segment details2:32–2:35 · rev_330d9dc0afdb1298ebd5a937210b5a2b_37
  39. Yeah, -hankJump. So when you jump

    Segment details2:37–2:40 · rev_330d9dc0afdb1298ebd5a937210b5a2b_38
  40. up to 30, it's going to be minusing 5 off

    Segment details2:41–2:43 · rev_330d9dc0afdb1298ebd5a937210b5a2b_39
  41. y-axis every 0.05 seconds.

    Segment details2:43–2:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_40
  42. And then when Hank touches the floor,

    Segment details2:50–2:53 · rev_330d9dc0afdb1298ebd5a937210b5a2b_41
  43. hankJump is going to equal 0, so it will

    Segment details2:54–2:57 · rev_330d9dc0afdb1298ebd5a937210b5a2b_42
  44. stop falling. So it's still running every

    Segment details2:57–2:59 · rev_330d9dc0afdb1298ebd5a937210b5a2b_43
  45. 0.05 seconds. But it's falling by 0,

    Segment details3:00–3:03 · rev_330d9dc0afdb1298ebd5a937210b5a2b_44
  46. which is— well, 0 is 0. So you

    Segment details3:03–3:07 · rev_330d9dc0afdb1298ebd5a937210b5a2b_45
  47. can see it stops falling, and you

    Segment details3:07–3:10 · rev_330d9dc0afdb1298ebd5a937210b5a2b_46
  48. can press it again and he jumps. If you

    Segment details3:10–3:13 · rev_330d9dc0afdb1298ebd5a937210b5a2b_47
  49. press it twice, he jumps twice. 3 times,

    Segment details3:13–3:15 · rev_330d9dc0afdb1298ebd5a937210b5a2b_48
  50. he keeps jumping like this. We need to fix

    Segment details3:16–3:18 · rev_330d9dc0afdb1298ebd5a937210b5a2b_49
  51. it so you can only jump twice. This is a

    Segment details3:19–3:21 · rev_330d9dc0afdb1298ebd5a937210b5a2b_50
  52. bit strange at the moment.

    Segment details3:21–3:22 · rev_330d9dc0afdb1298ebd5a937210b5a2b_51
  53. So I'm not sure how to make it jump only

    Segment details3:36–3:38 · rev_330d9dc0afdb1298ebd5a937210b5a2b_52
  54. twice.

    Segment details3:38–3:39 · rev_330d9dc0afdb1298ebd5a937210b5a2b_53
  55. So this is for my new game I've just

    Segment details3:42–3:44 · rev_330d9dc0afdb1298ebd5a937210b5a2b_54
  56. started today, and basically it's going to

    Segment details3:44–3:46 · rev_330d9dc0afdb1298ebd5a937210b5a2b_55
  57. be like a runner and you have to jump to

    Segment details3:46–3:48 · rev_330d9dc0afdb1298ebd5a937210b5a2b_56
  58. jump over obstacles. He's sinking into the

    Segment details3:49–3:51 · rev_330d9dc0afdb1298ebd5a937210b5a2b_57
  59. floor. Yeah, it's a bit buggy at the

    Segment details3:52–3:54 · rev_330d9dc0afdb1298ebd5a937210b5a2b_58
  60. moment, so lots of things to fix.

    Segment details3:54–3:56 · rev_330d9dc0afdb1298ebd5a937210b5a2b_59