[HN Gopher] Compiling a Go program into a native binary for Nint...
___________________________________________________________________
Compiling a Go program into a native binary for Nintendo Switch
Author : hajimehoshi
Score : 257 points
Date : 2022-01-03 13:49 UTC (9 hours ago)
(HTM) web link (ebiten.org)
(TXT) w3m dump (ebiten.org)
| japhib wrote:
| This is awesome. Sad to see the work is kind of "wasted" in the
| sense that it's not officially supported and any update to Go
| will likely break it. But I learned a lot reading this article.
| xiaq wrote:
| It's apparent that the author intends to maintain this across
| Go version upgrades. Part of this work is a custom patch format
| to make it easier to manage the changes to the Go runtime (http
| s://ebiten.org/blog/native_compiling_for_nintendo_switch...).
|
| The author also explicitly stated that he did not expect major
| work to upgrade to a new Go version in https://ebiten.org/blog/
| native_compiling_for_nintendo_switch....
| fredrikholm wrote:
| Been using Ebiten for close to two years. One of, if not the
| nicest 2D engines I've used.
|
| Nice to see Hoshi's work shared here.
| hu3 wrote:
| Hajime Hoshi is a true gem and the Go ecosystem is incredibly
| lucky to have him.
|
| He was very approachable and friendly when I was toying with game
| development in Go.
|
| I should get back to finishing that game in Ebiten. The tooling
| alone puts a smile on my face.
| djur wrote:
| Which tooling in particular?
| [deleted]
| alophawen wrote:
| carlosperate wrote:
| There is also some support for the Switch with TinyGo (A Go
| compiler for embedded system), but looking at the current state
| of the docs for this platform it's hard to tell how well
| supported it might be:
| https://tinygo.org/docs/reference/microcontrollers/nintendos...
| [deleted]
| kamranjon wrote:
| I absolutely love ebiten, it's gotten me back into game
| development which was why I initially got into software dev. I've
| been working through the Game Programming Patterns book and it's
| been an awesome platform to learn some of the common patterns in
| game dev. Also the maintainer is incredibly active and constantly
| pushing the development forward. I'm currently working on a side-
| scroller and am really excited to see if I can get it running on
| the switch.
| chana_masala wrote:
| Ebiten is actually making me want to get back into Go itself.
| I'd love to make a cross platform game and it may just motivate
| me enough to push through my ideological biases against Go.
| philosopher1234 wrote:
| I've yet to meet an ideological bias against Go that took
| into account & understood the practical tradeoffs Go is
| making. The ones I've seen thus far are dismissive and
| incurious. But if you've got that, I would love to hear it.
| chana_masala wrote:
| I actually mostly agree. I just don't really like the
| aesthetics of writing To, which I know is a silly reason.
| philosopher1234 wrote:
| I'm not one to call aesthetics silly. The act of reading
| and writing programs relies heavily on the programmers
| emotion, and so I think aesthetics matter greatly. What
| don't you like about them?
| YawningAngel wrote:
| I'll bite. I've read all the arguments the creators of
| golang made for not including generics. They are just as
| true now as they were when the language was created, and
| yet generics have now been added. Moreover, they have been
| added as part of golang 2.0, so any breaking changes that
| turned out to be needed could have been made now anyway. I
| think it's pretty reasonable to dislike a language that
| refuses to implement a basic feature for essentially no
| reason.
| djur wrote:
| I'm not big on Go either but I feel like it's a good fit for
| hobbyist game development. It's a lot harder to write
| automated tests for games, so the value of static typing is
| higher, but most simple game designs don't really benefit
| from the powerful type systems of a Rust or Haskell (or even
| a TypeScript). It's one of the cases where Go actually does
| feel like a "better C".
| chana_masala wrote:
| > but most simple game designs don't really benefit from
| the powerful type systems of a Rust or Haskell (or even a
| TypeScript).
|
| I get that feeling too but I have no experience with game
| development. I wonder what reasons you think so?
| tmountain wrote:
| Just came here to say that I also love Ebiten. It's so simple.
| It stays out of your way, and it has a ton of great examples.
| One of my goals for this year is to finally finish a game
| (after talking about it for over a decade). Ebiten is going to
| help me accomplish that goal.
| barrenko wrote:
| Anything else you can recommend for starting out with game dev
| and appropriate algorithms? Is C++ a must?
| pizza234 wrote:
| There are game libraries for many languages, so for beginners
| to game development, anything will do. Small libraries
| abstract a few functionalities over the lower level ones
| (sprite batching, input/events handling, etc.) and handle
| multiplatform. Larger libraries may take care of other
| aspects (game loop, scene graph, etc.) and specialize on
| certain game types (3D, platform, RPG, etc.).
|
| C++ is probably a must if you one writes large games and/or
| performance critical ones (regarding "high performance"/low
| level languages, Rust libraries are immature).
|
| Scripting languages (e.g. Python/PyGame) can be a good
| (quick) way to start and experiment. But readability falls
| very quickly when complexity grows (e.g. difficult to
| interpret inheritance tree), so at some point one may easily
| feel the need to switch to a statically typed language.
|
| Regarding algorithms, a very common beginners book is "Game
| Programming Patterns", which is also available for free in
| HTML: https://gameprogrammingpatterns.com/contents.html.
___________________________________________________________________
(page generated 2022-01-03 23:00 UTC)