Re:Build Pong in Your Terminal with Go for Some Reason
by jalletto on Tuesday July 26, 2022 @10:03AM
(#32238409)
I've been trying to learn go by building Pong in my terminal. Here is part One where I create a bouncing ball.
[ Parent
| on HN ]
Re:Build Pong in Your Terminal with Go for Some Reason
by adamgordonbell on Tuesday July 26, 2022 @11:55AM
(#32239991)
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
Re:Build Pong in Your Terminal with Go for Some Reason
by pantulis on Tuesday July 26, 2022 @10:52AM
(#32239134)
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!
Re:Build Pong in Your Terminal with Go for Some Reason
by boalberto on Tuesday July 26, 2022 @04:40PM
(#32243685)
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)
}
}