Essential insights from Hacker News discussions

Show HN: I made a 2D game engine in Dart

Initial Reception and Positive Feedback

The initial reactions to the 2D game library for Dart are overwhelmingly positive, with users expressing excitement and appreciation for the project.

"This is so cool! I love it." - munificent

This positive sentiment was amplified by the personal connection one user felt, especially given the author's background.

"Thanks. Hearing that from someone who works on Dart and wrote two books I’ve read makes the compliment really special to me :)" - joemanaco

This highlights the value of community recognition within niche technical spaces.

Mobile Compatibility and User Experience

A significant point of discussion revolves around the library's performance and usability on mobile devices. Users noted that the provided game demo was not functioning on mobile, raising questions about intended platform support.

"The Boing game doesn't work mobile, is that by design?" - devrandoom

The author clarified that the mobile compatibility was a work in progress, acknowledging the need for touch input implementation.

"I ported this game from the Book "Code The Classics" which was written in Python/PyGame. It should be relativley easy to add mobile touch inputs to it, but I didn't have time for that yet." - joemanaco

Another user emphasized the importance of mobile support, given the common usage patterns of Hacker News.

"Probably worth it as most people read HN on tablet or phone." - stpedgwdgfhgdd

"High-Performance" Claims and Benchmarking

The library's description as "high-performance" sparked a debate about the meaningfulness of such claims without concrete benchmarks. Some users expressed skepticism, viewing such statements as marketing rather than verifiable technical specifications.

"An easy-to-use, high-performance 2D game library for Dart. This is one of those things you say to interest people. To put their concerns to rest that it might not be able to make the game they want. It doesn't really mean anything. No absolute measurements or relative comparisons." - leecommamichael

Counterarguments suggested that while specific benchmarks for complex libraries are difficult to establish, such claims can still indicate development goals and provide a general sense of the library's intended focus.

"Surely this isn't the first time you see software that claims high performance and speed without any hard benchmarks attached. You can benchmark an algorithm or a small piece of code, but for something like a game library, the definition of what is "fast" and what isn't is too dependent on context to be meaningful." - ghurtado

"That doesn't mean that the statement is useless: it tells me that this is, at least partially, one of the goals of the library." - ghurtado

Another perspective on "performance" related to the user's experience of the game.

"For most folks I think they use an fps score while not sacrificing aesthetic quality or game play experience. i.e. The engine is considered lower quality if it is laggy, generates DLSS chowder, or glitches up on some hardware." - Joel_Mckay

Discoverability and Demo Quality

A recurring theme is the discoverability of the project's features and demos, with some users reporting difficulty in finding them. Concerns were also raised about the simplicity of the initial demos.

"I really hate to be that guy, but I don't see a single screenshot/demo on the main page." - zxexz

The author and other users pointed to the "Showcase" tab, suggesting a potential discoverability issue with the site's navigation.

"Click "Showcase" in the main top menu." - rodnim

"Well, it does seem a bit hidden and the demo's are a bit simple. The Pong demo doesn't seem to work on safari desktop (When playing, the ball stops after 0.2 s . But he! You have to start somewhere. Good luck!" - niekiepriekie

The Appeal of Dart and its Ecosystem

The discussion naturally extended to the broader appeal of the Dart programming language itself, with users seeking to understand its unique selling points compared to other languages.

"What is the draw of Dart? In other words, what does it claim to do special or emphasize over other langauges? Like if you were going to try to convince someone they should give Dart a try, what reasons would you give?" - socalgal2

Several key advantages of Dart were highlighted, including its modern syntax, strong typing, null safety, good tooling, cross-platform capabilities (including hot-reload), and its integration with the Flutter framework.

"Modern, but sane syntax (readable), good defaults (strong typing, null safety...), good-enough runtime performance, good APIs and tooling out of the box, cross-platform (also hot-reload on some, AOT). The list goes on, what specifics do you care about more?" - isoos

"I would say that the best benefits are: - Cross Compilation (even wasm and js) out of the box - Simple concurrency model, similar to NodeJS - Ability to use it on a popular cross platform framework (flutter) - Hot reload capibilities (has JIT and AOT mode) - Strong developer tool chain All of these are built on top of a language that has a pretty syntax and supports many language paradigms. The biggest con is the (weak) package ecosystem and community." - freitzzz

The quality of the tooling, particularly the Language Server Protocol (LSP) implementation, received specific praise for its speed and reliability.

"The language is a little nicer than Typescript (though not in all ways), the performance is better and the tooling is excellent. Even better than Go's. And it can be AoT compiled to a self-contained binary or transpiled to Javascript. The LSP server in particular is amazingly fast and reliable - better than Java IDEs. It's practically instant from typing something to seeing the squiggles update. C++, Rust, Go, Typescript etc. don't come close." - IshKebab

However, criticisms were also voiced regarding the package ecosystem and certain language design choices, such as the distinction between match expressions and statements.

"Obviously there are downsides: relatively tiny ecosystem, sometimes weird syntax (why is a match expression and match statement different??), this very annoying issue that I see remains unsolved after 5 years: https://github.com/dart-lang/language/issues/1188" - IshKebab

The advice to carefully manage dependencies and consider vendoring or building libraries directly was also offered as a strategy to mitigate potential ecosystem issues.

"I think it's also important generally speaking - not just Dart/Flutter, but really any language ecosystem, to not blindly start adding packages. You'll end up with conflicts and Dart is no exception. Sometimes it is sensible to vendor a library into your own source code tree, or just build it yourself ("Own it")." - sgt

Simplicity vs. Feature-Rich Engines

The author's motivation for creating the library was framed around a desire to simplify game development by avoiding the complexity of larger, more feature-rich engines. This led to a discussion about the trade-offs between simplicity and the comprehensive tools offered by established engines like Unity or Unreal.

"My thought was that the simplicity of the API takes out a lot of the complexity of it compared to engines with complex structures, entity hierarchies, event systems and features that need to fit a wide range of genres. Especially if you want to make something simple or just a prototype." - joemanaco

This was met with a suggestion for more precise phrasing.

"Probably better to say "Writing games is simple again" or something then. Though engines like unity or unreal would make 3d games a lot simpler to make than this, so it's only some kinds of games" - voidUpdate

The author acknowledged this feedback and made an adjustment.

"You're right. I fixed it ;)" - joemanaco

Comparison with Existing Dart Game Libraries (Flame)

A significant portion of the conversation focused on comparing the new library (Bullseye2D) with the established Dart game development library, Flame. Users sought to understand the distinct advantages and use cases for each.

"I haven't used Flame engine, but I know it already exists as a way to make games in Dart, So, if someone like me is curious about making a game in Dart, it would be nice to know the pros/cons of using this versus using Flame. Maybe remaking Flame's Klondike tutorial, or one of the others, using Bullseye to help show the distinct advantages that this engine brings over other solutions? It's not very obvious to me when this would be the right choice for me over Flame. Nevertheless, it's cool to see something new come to the scene for game dev in Dart. Thanks for making this!" - _stillmind

The author provided a comparison, noting that Flame is built on Flutter and offers more out-of-the-box features, while Bullseye2D focuses on the web package and a simpler, more procedural API with less imposed structure.

"I don't have looked into Flame too much, but I would say the main difference is that Flame builds on top of Flutter while right now Bullseye2D only builds on the web package. Flame offers more out-of-the-box features, while with Bullseye2D you have to build many things yourself, but it doesn't force you into a predefined structure as much. The API is more prodcedural style, making it relatively quick to learen in its entirety, without too much "magic" happening under the hood. I think for most people Flame would be the better choice (it is also been around longer, which means better support...), however, I really love extremly simple approaches. I also believe it has advantages when you tailor your systems and architecture to your own requirements. Lots of stuff in 2D Game Development is also extremly simple (so often having to deal with a complex physics module or rendering pipeline or entity component system is contraproductive)." - joemanaco

This comparison highlights a philosophical difference in approach, with Bullseye2D favoring a minimalist, adaptable design for simpler projects or those where custom architectures are preferred.

Author's Expertise and Future Support

Users recognized the author's apparent experience in game development, which garnered trust and encouragement for the project.

"This is promising. I just did a review of some of the code and the premise of the platform, this is clearly not your first rodeo in gaming. I wish you luck! I might consider sponsoring as well." - sgt

This acknowledgment of expertise and potential community support bodes well for the library's future development.