Skip to content

oakmound/oak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 19, 2025
f41daa3 · Jan 19, 2025
Jul 9, 2022
Aug 23, 2022
Jun 19, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Oct 6, 2024
Jun 5, 2022
Jan 12, 2025
Apr 17, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Sep 1, 2021
Apr 23, 2022
Jan 14, 2024
Jan 22, 2023
Jan 24, 2023
Apr 23, 2022
May 21, 2022
Mar 26, 2022
Jan 31, 2023
Jan 31, 2023
Mar 19, 2022
Feb 5, 2022
Jul 17, 2017
Mar 12, 2022
Sep 27, 2021
Jul 16, 2017
Oct 6, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 4, 2022
Apr 23, 2022
Apr 17, 2022
Apr 23, 2022
Oct 6, 2024
Jan 12, 2025
Apr 23, 2022
Apr 23, 2022
Oct 25, 2021
Apr 18, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
May 31, 2021
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 23, 2022
Apr 17, 2022
Apr 17, 2022
Apr 23, 2022
Apr 17, 2022
Apr 9, 2022
Jun 19, 2022
May 21, 2022
Apr 23, 2022
Apr 23, 2022
May 1, 2022
Apr 23, 2022

Repository files navigation

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

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

Features and Systems

  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

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

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

Platformer Top down shooter Flappy Bird
Bezier Curves Joysticks Piano
Screen Options Multi Window Particles

Games using Oak

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

Agent Blue Fantastic Doctor
Hiring Now: Looters Jeremy The Clam
Diamond Deck Championship SokoPic

On 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.