Hacker News new | ask | show | jobs
by jalletto 1421 days ago
I've been trying to learn go by building Pong in my terminal. Here is part One where I create a bouncing ball.
3 comments

    Well now we have a program that says “Hi!” until you press escape. For the loneliest among us, that may be enough. But we came here to build a game, so we’ll need some kind of animation.
Love the humor
I remember a pretty similar program that was included in the Vic-20 users guide circa 40 years ago. I miss the simplicity of learning by coding something that finally ends up like a game!
Thanks! Was great fun following along. Noticed a small typo in the first code segment, `screen` becomes `s` when calling s.Init().

Looking forward to part 2!

  func main() {
  
      screen, err := tcell.NewScreen()
  
      if err != nil {
          log.Fatalf("%+v", err)
      }
      if err := s.Init(); err != nil {
          log.Fatalf("%+v", err)
      }
  }
Thank you! I noticed a few grammar errors as well so I’ll be sure to update this.