Skip to content

Milk2D is a lightweight, hand-rolled 2D game engine written in Go, powered by Ebiten. Built from scratch for the love of simplicity, performance, and a little dairy-themed charm.

License

Notifications You must be signed in to change notification settings

michalzarddev/Milk2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Milk2d 🐄

Milk2D is a lightweight, hand-rolled 2D game engine written in Go, powered by Ebiten.

It's focused on giving developers control over:

  • Game objects and component systems
  • Rendering and viewport culling
  • Asset loading
  • Physics
  • Scene Management
  • Input (mouse,keyboard,gamepad)
  • Audio ('player',transitions)
  • Particle systems (emitters,affectors,lifetime)
  • Event systems (pubsub)
  • Optimized Serializer
  • Debugging Tools (fps,profiler,inspector,logs)

Built from scratch for the love of simplicity, performance, and a little dairy-themed charm.

🚧 Status

Currently in early development. Perfect for engine nerds and folks who want to build up from clean primitives.

🐮 Examples

Sprite

In order to load sprite you can call the milk2d.LoadSprite method that will under the hood initialize & cache image under key, when initializing you can specify 'sub rectangle' used as a coords to 'cut out' final image out of original.

cowSprite := milk2d.LoadSprite("test", "/examples/assets/cow.png",0,0 256, 256)

In order to render sprite from center not its 0,0 origin,you can simply toggled centered boolean

cowSprite.SetCentered(true)

If you'd ever like to have outline around an player, let's say when you are hovering with mouse you'd do it like this:

cowSprite.Outline(color.RGBA{
		R: 255,
		G: 77,
		B: 77,
		A: 255,
	}, 5)

About

Milk2D is a lightweight, hand-rolled 2D game engine written in Go, powered by Ebiten. Built from scratch for the love of simplicity, performance, and a little dairy-themed charm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages