Home

Awesome

Oak

A Pure Go game engine

Go Reference Code Coverage Mentioned in Awesome Go

Table of Contents

  1. Installation

  2. Features

  3. Support

  4. Quick Start

  5. Examples

  6. Finished Games


Installation <a name="installation"/>

go get -u github.com/oakmound/oak/v4

Features and Systems <a name="features"></a>

  1. Window Management
    • Windows and key events forked from shiny
    • Support for multiple windows running at the same time
  2. Image Rendering
    • Manipulation
      • render.Modifiable interface
      • Integrated with optimized image manipulation via gift
    • Built in Renderable types covering common use cases
      • Sprite, Sequence, Switch, Composite
      • Primitive builders, ColorBox, Line, Bezier
      • History-tracking Reverting
    • Primarily 2D
  3. Particle System
  4. Mouse Handling
  5. Joystick Support
  6. Audio Support
  7. Collision
    • Collision R-Tree forked from rtreego
    • 2D Raycasting
    • Collision Spaces
      • Attachable to Objects
      • Auto React to collisions through events
  8. 2D Physics System
  9. Event Handler

Support <a name="support"></a>

For discussions not significant enough to be an Issue or PR, feel free to ping us in the #oak channel on the gophers slack. For insight into what is happening in oak see the blog.

Quick Start <a name="quick-start"></a>

This is an example of the most basic oak program:

package main

import (
    "github.com/oakmound/oak/v4"
    "github.com/oakmound/oak/v4/scene"
)

func main() {
    oak.AddScene("firstScene", scene.Scene{
        Start: func(*scene.Context) {
            // ... draw entities, bind callbacks ... 
        }, 
    })
    oak.Init("firstScene")
}

See below or navigate to the examples folder for demos. For more examples and documentation checkout godoc for reference documentation, the wiki, or our extended features in grove.

Examples <a name="examples"></a>

<img width="200" src="examples/platformer/example.gif" a=examples/platformer> Platformer<img width="200" src="examples/top-down-shooter//example.gif"> Top down shooter<img width="200" src="examples/flappy-bird//example.gif"> Flappy Bird
<img width="200" src="examples/bezier/example.PNG"> Bezier Curves<img width="200" src="examples/joystick-viz/example.gif"> Joysticks<img width="200" src="examples/piano/example.gif"> Piano
<img width="200" src="examples/screenopts/example.PNG"> Screen Options<img width="200" src="examples/multi-window/example.PNG"> Multi Window<img width="200" src="examples/particle-demo/overviewExample.gif"> Particles

Games using Oak <a name="finished-games"></a>

To kick off a larger game project you can get started with game-template.

<img width="200" src="https://img.itch.zone/aW1hZ2UvMTk4MjIxLzkyNzUyOC5wbmc=/original/aRusLc.png" a=examples/platformer-tutorial> Agent Blue<img width="200" src="https://img.itch.zone/aW1hZ2UvMTY4NDk1Lzc4MDk1Mi5wbmc=/original/hIjzFm.png"> Fantastic Doctor
<img width="200" src="https://img.itch.zone/aW1hZ2UvMzkwNjM5LzI2NzU0ODMucG5n/original/eaoFrd.png"> Hiring Now: Looters<img width="200" src="https://img.itch.zone/aW1hZ2UvMTYzNjgyLzc1NDkxOS5wbmc=/original/%2BwvZ7j.png"> Jeremy The Clam
<img width="200" src="https://img.itch.zone/aW1hZ2UvOTE0MjYzLzUxNjg3NDEucG5n/original/5btfEr.png"> Diamond Deck Championship<img width="200" src="https://img.itch.zone/aW1nLzgzMDM5MjcucG5n/105x83%23/oA19CL.png"> SokoPic

On Pure Go <a name="pure-go"/>

Oak has recently brought in dependencies that include C code, but we still describe the engine as a Pure Go engine, which at face value seems contradictory. Oak's goal is that, by default, a user can pull down the engine and create a fully functional game or GUI application on a machine with no C compiler installed, so when we say Pure Go we mean that, by default, the library is configured so no C compilation is required, and that no major features are locked behind C compliation.

We anticipate in the immediate future needing to introduce alternate drivers that include C dependencies for performance improvements in some scasenarios, and currently we have no OSX solution that lacks objective C code.