Building 2D Games with Ebitengine in Go (Golang)

What You'll Learn

  • Learn how to build a simple 2D Game in Go
  • Implement a collision engine in your game
  • Learn how to deploy your game as an application, or as a web page using WASM
  • Learn how to animate sprites in your game
  • Add audio effects to your game

Requirements

  • Familiarity with the Go programming language is required.

Description

In this hands-on course, you will learn how to create a classic 2D space shooter game, Asteroids, using the powerful and lightweight Ebitengine library in Go. Whether you’re a beginner to game development or looking to expand your skills in a new language and framework, this course will guide you through the entire process of building your own version of this iconic arcade game.

Ebitengine's easy to learn and use API allows you to develop 2D games quickly and easily. Games can be deployed across multiple platforms, including Windows, Mac, Linux, FreeBSD, the Web, iOS and Android. You can even deploy your game to Steam!

Go is fast, and so is Ebitengine. While Ebitengine's drawing API is very simple, games developed in it run very quickly with GPU power.

In this course, we'll learn how to:

  • Introduction to Ebitengine: Get familiar with the basics of how to set up Go and use Ebitengine for 2D game development.
  • Game Design Fundamentals: Understand core game mechanics like player movement, object collisions, game states, and rendering.
  • Creating the Game World: Learn how to design the asteroid field, ship controls, and space physics—like rotation, thrust, and inertia.
  • Rendering and Animation: Master how to draw and animate your ship, asteroids, bullets, and explosions using Ebitengine’s powerful drawing functions.
  • Game Logic: Implement the game loop, scoring system, levels, and spawn mechanics for asteroids. Learn how to create enemies and manage the player’s health.
  • Sound and Music: Add sound effects for shooting, explosions, and background music to enhance the player's experience.
  • Building a Playable Game: Integrate everything to create a fully functional, interactive game that runs in the browser or on desktop platforms.
By the end of this course, you will have developed your own playable Asteroids clone, gaining the knowledge and confidence to create more complex 2D games in Go. Whether you want to add new features or make your own game from scratch, this course will equip you with the foundational skills needed for game development in Go using Ebitengine.

Tools Used:

  • Go
  • Ebitengine (a 2D game engine for Go)
  • Visual Studio Code (or your favourite IDE)

Who this course is for:

  • This course is for Go developers who want to learn how to build 2D games.