ForgeLeaf Logo

Consent to our cookie policy 🍪

We use a privacy-friendly, cookie-free analytics tool (Umami). Some cookies are used for functionality only. You may check our Privacy Policy.
A fire burning inside a black trophy

Getting Started with Forge 🪄

I’ve been working on something small but close to my heart, a lightweight, no-nonsense 2D game framework for Go called Forge.

Forge is designed for developers who love simplicity. It doesn’t try to be a full-blown engine or force you into a specific architecture, instead, it gives you the essential tools you need to build and experiment quickly, with the performance and clarity that Go provides.


What Is Forge? ⚙️

Forge is a cross-platform 2D game framework written in Go. It focuses on being minimal, fast, and flexible, inspired by the elegance of LibGDX, but with a Go-native flavor.

It’s still early in development (currently version 0.0.8), but already includes:

  • 🧩 Simple and intuitive APIs
  • 💻 Cross-platform desktop support (Windows, Linux, macOS)
  • 🧮 OpenGL-based 2D rendering with batching
  • 🎮 Input handling
  • 🔊 Basic audio (music and sound)
  • 🔤 Bitmap font rendering
  • 🎥 Camera + viewport support
  • ✨ Minimal scene graph and math library
  • 🧱 Support for shaders, textures, framebuffers, and more

It’s built to be used as a library or a foundation for your own engine — Forge doesn’t force you into ECS or any rigid structure. You control how your game loop and logic are organized.


Let’s get coding! 🚀

The best way to start is with the Forge Starter Template:

git clone https://github.com/ForgeLeaf/ForgeStarterTemplate.git

Make sure you have Go installed.
Then build and run the example:

cd ForgeStarterTemplate
go build .
./ForgeStarterTemplate      # Linux / macOS
./ForgeStarterTemplate.exe  # Windows
Terminal Screenshot

I use the Windows Terminal with PowerShell and I recommend it if you’re on Windows. Your output should look somewhat similar to mine.

Running the final executable should open a black window titled “Forge Application”, which looks like this:

Blank Forge Application Window

Now the fun begins. You can start developing your game engine from here! And one tip from me: to get a smaller release build without a console window on Windows, you should run this instead:

go build -ldflags='-s -w -H=windowsgui' .

The final file executable will get stripped and no debug symbols remain in it, which results in a smaller file, also the commands sets the execution subsystem to WINDOWS which prevents the opening of a console window when running the file.

Optimized File Comparison

The Basics 🧠

As you might’ve seen, the repo includes a single source file called main.go, which contains the logic for the window. At its core, Forge revolves around the Forge.Application interface and a simple configuration.

Here’s what a minimal application looks like:

package main

import (
    "github.com/ForgeLeaf/Forge"
    "runtime"
)

type Application struct{}

func (a *Application) Create(driver *Forge.Driver) {
    // Initialization logic
}

func (a *Application) Render(driver *Forge.Driver, delta float32) {
    // Draw calls and updates
}

func (a *Application) Resize(driver *Forge.Driver, width, height float32) {}
func (a *Application) Destroy(driver *Forge.Driver) {}

func init() {
    runtime.LockOSThread()
}

func main() {
    if err := Forge.RunSafe(&Application{}, Forge.DefaultDesktopConfig()); err != nil {
        panic(err)
    }
}

RunSafe initializes the framework, creates the window, and runs your main loop safely, the rest is up to you.


Philosophy ⌛

Forge isn’t meant to compete with Unity or Godot. It’s meant for those who prefer understanding how things work, without losing weeks to boilerplate.

It’s fast, modular, and approachable. Whether you’re experimenting with rendering, building tools, or just learning game development in Go, Forge aims to make that process simple and enjoyable.

Forge is open source and still very much in progress.
If you find bugs, have suggestions, or want to contribute — PRs and issues are welcome!

You can find the repository here: https://github.com/ForgeLeaf/Forge


Contributing 💼

Forge is small, but it’s growing with every commit.

If you’d like to follow along, the best place is right here on ForgeLeaf, or on the project’s GitHub page.
Hopefully more tutorials, examples, and progress updates will follow soon.

Give us some feedback!

Thanks for reading our article. Could you please consider giving us some constructive, anonymous feedback?

Related articles

Working with ECS in LibGDX 🤩

Bismillah, dear readers!I hope you enjoyed the long weekend and managed to recharge. Today we’ll explore building a simple game using simple‑world‑gdx (my lightweight ECS for LibGDX), together with simple‑batch‑gdx…
Read more

Forge Framework

Forge is our free and open source game framework for the GoLang programming language. It is feature-rich and constantly improved. We designed Forge to be performant and simple for beginner, its power lies within its ecosystem and community. Forge is lightweight in nature and can be easily extended to fit most of your needs. Write you game logic in your way and let the framework handle compatibility.
Community

Connect with our community

ForgeLeaf Logo
Join the ForgeLeaf community — follow updates, contribute, and grow together.

Subscribe to our Newsletter

Stay Updated on the Latest Dev Insights. Join our mailing list to receive new articles, tutorials, and project updates.
ForgeLeaf Logo
Made with ❤️ in 🇩🇪
Follow us on social media
Subscribe to our Newsletter
© 2025 ForgeLeaf Studio