overdrive

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 8 Imported by: 0

README

Overdrive 🚤

An OpenGL game engine written in Go.

Overdrive uses a custom Blender add-on to convert a full Blender scene to a game ready scene including meshes, camera, lights and full material properties.

Currently implemented:

  • Directional lights and shadows
  • Point lights and shadows
  • Skybox and environment mapping
  • In game and menu UI based on Gutter
  • Entity system
  • Particle-based physics system based on Verlet integration

Getting started

package main

import (...)

type Player struct {
  name string
}
func (p *Player) Init(world *ecs.World) { }
func (p *Player) Update(world *ecs.World) { }
func (p *Player) GetType() string { return "Player" }

func main() {
    app := core.NewApp("Gutter", 1920, 1080)
    scene := scene.NewScene("assets/sphere.xml")
    go runWorld(&scene)
    app.Run(&scene, exitUI)
}

func runWorld(scene *scene.Scene) {
    player := Player{
        "Bob",
    }
    world := ecs.World{}
    world.AddEntities(&player)
    world.Init()
    world.Update(time.Second / 60)
}

func exitUI(app core.App) ui.UIElement {
    return ui.Button{
        Properties: ui.Properties{...},
        Function: func() {
            app.Quit()
        },
        Style: ui.Style{...},
    }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL