Build Pong in Your Terminal with Go for Some Reason
21–30 of 44 posts
Re: Build Pong in Your Terminal with Go for Some Reason
#22I also have been using Go with Tcell recently. Making small games is how I have always learned new programming languages. I am coming off of a couple of years of playing with C to understand languages better, and free myself from the complex stacks that I use at work. I've been chatting with a highly-educated PL friend of mine about my language likes/dislikes, and he would always remark on really pragmatic choices Go…
I don't really buy into go (it's not my type of language), but I wanted to ask a genuine question: are there many semi-mainstream languages that don't have modules that _just work_, or an official plugin for VSCode that just works? I've never found that to be a "plus", as much as it is the bare minimum. and nowadays I don't see that many up and coming languages that miss out on it. Admittedly though the cross compila…
I'm not saying Go is the only modern language, its pretty retro in some ways, but it has an exceptional tooling story. The fact that its mainly based around the official go tool helps.
Re: Build Pong in Your Terminal with Go for Some Reason
#23Nice work!
Re: Build Pong in Your Terminal with Go for Some Reason
#24Re: Build Pong in Your Terminal with Go for Some Reason
#25Or maybe I'm just bad at internet searches!
Re: Build Pong in Your Terminal with Go for Some Reason
#26I've been trying to learn go by building Pong in my terminal. Here is part One where I create a bouncing ball.
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)
}
}Re: Build Pong in Your Terminal with Go for Some Reason
#27I recently used Bubble Tea to write a Flappy Bird-like game [2] and it was incredibly fun. It splits your app up into a Model (state), a View function (that uses the model to return a string), and an Update function (that updates the model), like Elm. Plus the other Charm libraries are great for styling terminal output, spring physics, etc.
[1] https://github.com/charmbracelet/bubbletea [2] https://github.com/kbrgl/flapioca
Re: Build Pong in Your Terminal with Go for Some Reason
#28Earlier quoted context omitted.
I don't really buy into go (it's not my type of language), but I wanted to ask a genuine question: are there many semi-mainstream languages that don't have modules that _just work_, or an official plugin for VSCode that just works? I've never found that to be a "plus", as much as it is the bare minimum. and nowadays I don't see that many up and coming languages that miss out on it. Admittedly though the cross compila…
You tell me, what other language has a drop-in solution that provides module management, formatting, integration with the debugger, intellisense docs, linting with static analysis while I'm typing, and even testing? The plug-in is actually made by the Go Team at Google, its not like adding Black and Poetry etc. in python, its not even like the moving target that is create-react-app or whatever people use now in JS/TS…
Re: Build Pong in Your Terminal with Go for Some Reason
#29Re: Build Pong in Your Terminal with Go for Some Reason
#30I've been trying to learn go by building Pong in my terminal. Here is part One where I create a bouncing ball.
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) } }