Settings

Theme

Show HN: I made a 2D shoot 'em up game with Go, using Entity Component System

github.com

108 points by m110 3 years ago · 27 comments

Reader

NortySpock 3 years ago

Beautiful game, thanks for sharing. Koblas's comment caught my eye and I will definitely be poking around the github actions code to learn how to compile Golang to WASM.

koblas 3 years ago

Great work here, while I suck at games, it's great to see how Go can be used to build browser based applications.

ezekg 3 years ago

For the curious, here's the ECS package this is built with: https://github.com/yohamta/donburi

johnfn 3 years ago

Very cool stuff! I had a lot of fun getting all the powerups and becoming massively overpowered. :)

How was using Go targeting wasm (I presume)? I'm personally concerned about compilation times being super long, but I guess I've never tried...

wyldfire 3 years ago

Constructive feedback - coming from experience with games like "Time Pilot" or "Strikers 1945" - the firing recharge/repeat rate of this game seems too slow.

Otherwise it was neat!

  • m110OP 3 years ago

    Thanks! The game is not really balanced at this point, it definitely could use some play testing and improvements. :)

  • bluenotebo0k 3 years ago

    Fire rate becomes faster as you collect powerups.

    • ezekg 3 years ago

      It's too slow to start. It's too hard to destroy all the enemies in time if you miss.

      But code looks great! Really nice to see ECS in Go.

hknmtt 3 years ago

great to see Go doing more than just web backends and networking.

LordHeini 3 years ago

For me the third level does not load on the web version.

The ship just gets stuck on the end of lvl 2.

  • m110OP 3 years ago

    There are only two levels at the moment, it's still a prototype. :) And missing a "well done!" screen, obviously.

xwdv 3 years ago

Entity Component Systems are definitely the key for making all kinds of interesting gameplay elements very quickly, and in ways you might not even think of initially.

pmontra 3 years ago

Firefox Ubuntu: black screen and "panic: atlas: the image being put on an atlas is too big: width: 480, height: 2400" in the console.

smcl 3 years ago

Nice work! Must have been fun to make :)

  • m110OP 3 years ago

    It really was! There's something about moving sprites on screen that's super satisfying compared to using a big game engine. I definitely recommend trying out Ebitengine. :)

jayunit 3 years ago

This is great! Super fun to play. Congrats on releasing it!

pjmlp 3 years ago

Looks quite nice, time travel back to my Speccy days.

dvh 3 years ago

IMO you chose wrong tech for the job. It is very simple 2D game yet it starts 5s on my desktop and 20s on my phone. If I would to make a simple game and even simplest program starts 20s I would stop right there and choose different technology.

You probably did it to try Go, wasm and ECS and I understand that, but if you to make a game seriously, you should have stopped much earlier. In the early stage of the game development you should made 5-10 prototypes using different tech/frameworks and use the best one. I seriously don't see Go+wasm+ESC being the best one for this kind of game.

How can you not go insane if you have to wait 20s for every page refresh.

  • m110OP 3 years ago

    It's not a "serious" project. I chose Go specifically because I like the language (and Ebitengine is super fun to work with) and I like the idea behind ECS. I made games with Unity before, which you could consider a "serious" engine, but the fun of development is nowhere near what I experienced here.

    Thinking about what would be the most efficient engine for the game would kill all the fun for me and the project wouldn't exist. :)

    • nikki93 3 years ago

      I do also really like Go for various reasons, and have been working on a Go -> C++ transpiler and associated ECS libs to make a personal game project with. I used it to make a game for Raylib game jam earlier this year too: https://github.com/nikki93/raylib-5k You can see what the development workflow looks like in this video (the ECS stuff also has a built-in editor like a much more minimal version of Unity's): https://www.youtube.com/watch?v=8He97Sl9iy0

      I'm trying to decide how much time I should devote to making this easier to set up / use by other people in the medium term, since it's just a side project for me. Might make a codespaces template so it's quick to get started.

    • whateveracct 3 years ago

      The most efficient game engine is the one you'll actually use!

  • mjfisher 3 years ago

    Oh, come on. This obviously isn't pretending to be a highly polished game experience - it's something someone made for a game jam, and they've taken the time to publish it and write it up to a reasonable degree so that other people can take a look at, if they wish.

    They chose exactly the right tech for the job they intended - a fun experiment in a particular language and framework, and a write up based on that. They perhaps chose the wrong tech for your expectations?

  • danuker 3 years ago

    You refresh rarely.

    A lot of native games take longer than that to load.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection