All Projects → g3n → Engine

g3n / Engine

Licence: bsd-2-clause
Go 3D Game Engine

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Engine

Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (-79.59%)
Mutual labels:  game-engine, 3d-game-engine, 3d-graphics, 3d-engine
Overload
3D Game engine with editor
Stars: ✭ 335 (-75.4%)
Mutual labels:  game-engine, opengl, 3d-graphics, 3d-engine
Xray 16
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
Stars: ✭ 1,806 (+32.6%)
Mutual labels:  game-engine, 3d-game-engine, opengl, 3d-engine
Limonengine
3D FPS game engine with full dynamic lighting and shadows
Stars: ✭ 331 (-75.7%)
Mutual labels:  game-engine, opengl, 3d-graphics, 3d-engine
3D-Engine-OpenGL-4
3D Graphics Engine For Games | C++ OpenGL 4.1
Stars: ✭ 19 (-98.6%)
Mutual labels:  game-engine, 3d-game-engine, 3d-graphics, 3d-engine
G3nd
G3N Game Engine Demo
Stars: ✭ 197 (-85.54%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Vulkan Renderer
A new 3D game engine using modern C++ and Vulkan API
Stars: ✭ 205 (-84.95%)
Mutual labels:  game-engine, 3d-game-engine, 3d-engine
GroundEngine
Ground Engine is an easy to use Game Engine for 3D Game Development written in C++
Stars: ✭ 61 (-95.52%)
Mutual labels:  3d-game-engine, 3d-graphics, 3d-engine
Flaxapi
Old repository with C# Editor and C# API for creating games in Flax Engine
Stars: ✭ 131 (-90.38%)
Mutual labels:  game-engine, 3d-game-engine, 3d-engine
Qfusion
Source code for cross-platform OpenGL gaming engine
Stars: ✭ 255 (-81.28%)
Mutual labels:  game-engine, opengl, 3d-engine
Tinyengine
Tiny OpenGL Wrapper / 3D Engine in C++
Stars: ✭ 251 (-81.57%)
Mutual labels:  game-engine, opengl, 3d-engine
Opengl Renderer
Modern OpenGL renderer written in C++17
Stars: ✭ 85 (-93.76%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Raz
Modern & multiplatform game engine in C++17
Stars: ✭ 161 (-88.18%)
Mutual labels:  game-engine, opengl, 3d-engine
Mos
Lightweight game engine.
Stars: ✭ 153 (-88.77%)
Mutual labels:  game-engine, opengl, 3d-graphics
Engine
A basic cross-platform 3D game engine
Stars: ✭ 208 (-84.73%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Daemon
The Dæmon game engine. With some bits of ioq3 and XreaL.
Stars: ✭ 136 (-90.01%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Exengine
A C99 3D game engine
Stars: ✭ 391 (-71.29%)
Mutual labels:  3d-game-engine, opengl, 3d-engine
Cryengine
CRYENGINE is a powerful real-time game development platform created by Crytek.
Stars: ✭ 580 (-57.42%)
Mutual labels:  game-engine, 3d-game-engine, 3d-engine
Blue Flame Engine
A 3D/2D game engine that supports both DirectX11 and OpenGL 4.5
Stars: ✭ 129 (-90.53%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Mxengine
C++ open source 3D game engine
Stars: ✭ 284 (-79.15%)
Mutual labels:  game-engine, opengl, 3d-graphics

G3N Banner

Godoc Go Report Card

G3N - Go 3D Game Engine

G3N (pronounced "gen") is an OpenGL 3D Game Engine written in Go. It can be used to write cross-platform Go applications that show rich and dynamic 3D representations - not just games. A basic integrated GUI framework is provided, and 3D spatial audio is supported through OpenAL.

To see G3N in action try the G3N demo or the Gokoban award winning game.

G3ND In Action

Highlighted Projects Using G3N

Dependencies

Go 1.8+ is required. The engine also requires the system to have an OpenGL driver and a GCC-compatible C compiler.

On Unix-based systems the engine depends on some C libraries that can be installed using the appropriate distribution package manager. See below for OS specific requirements.

Ubuntu/Debian-like

$ sudo apt-get install xorg-dev libgl1-mesa-dev libopenal1 libopenal-dev libvorbis0a libvorbis-dev libvorbisfile3

Fedora

$ sudo dnf -y install xorg-x11-proto-devel mesa-libGL mesa-libGL-devel openal-soft openal-soft-devel libvorbis libvorbis-devel glfw-devel libXi-devel

CentOS 7

Enable the EPEL repository:

$ sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Then install the same packages as for Fedora - remember to use yum instead of dnf for the package installation command.

Windows

We tested the Windows build using the mingw-w64 toolchain (you can download this file in particular).

The necessary audio DLLs are supplied and need to be added to your PATH. If you would like to build the DLLs yourself you can find the libraries' source code and build instructions here.

macOS

Install the development files of OpenAL and Vorbis using Homebrew:

brew install libvorbis openal-soft

Installation

The following set of commands will download and install the engine along with all its Go dependencies:

git clone https://github.com/g3n/engine g3n-engine
cd g3n-engine
go install ./...

Features

  • Cross-platform: Windows, Linux, and macOS. (WebAssembly is 90% complete!)
  • Integrated GUI (graphical user interface) with many widgets
  • Hierarchical scene graph - nodes can contain other nodes
  • 3D spatial audio via OpenAL (.wav, .ogg)
  • Real-time lighting: ambient, directional, point, and spot lights
  • Physically-based rendering: fresnel reflectance, geometric occlusion, microfacet distribution
  • Model loaders: glTF (.gltf, .glb), Wavefront OBJ (.obj), and COLLADA (.dae)
  • Geometry generators: box, sphere, cylinder, torus, etc...
  • Geometries support morph targets and multimaterials
  • Support for animated sprites based on sprite sheets
  • Perspective and orthographic cameras
  • Text image generation and support for TrueType fonts
  • Image textures can be loaded from GIF, PNG or JPEG files
  • Animation framework for position, rotation, and scale of objects
  • Support for user-created GLSL shaders: vertex, fragment, and geometry shaders
  • Integrated basic physics engine (experimental/incomplete)
  • Support for HiDPI displays

G3N Banner

Hello G3N

The code below is a basic "hello world" application (hellog3n) that shows a blue torus and a button that when clicked makes the torus red:

package main

import (
	"github.com/g3n/engine/app"
	"github.com/g3n/engine/camera"
	"github.com/g3n/engine/core"
	"github.com/g3n/engine/geometry"
	"github.com/g3n/engine/gls"
	"github.com/g3n/engine/graphic"
	"github.com/g3n/engine/gui"
	"github.com/g3n/engine/light"
	"github.com/g3n/engine/material"
	"github.com/g3n/engine/math32"
	"github.com/g3n/engine/renderer"
	"github.com/g3n/engine/util/helper"
	"github.com/g3n/engine/window"
	"time"
)

func main() {

	// Create application and scene
	a := app.App()
	scene := core.NewNode()

	// Set the scene to be managed by the gui manager
	gui.Manager().Set(scene)

	// Create perspective camera
	cam := camera.New(1)
	cam.SetPosition(0, 0, 3)
	scene.Add(cam)

	// Set up orbit control for the camera
	camera.NewOrbitControl(cam)

	// Set up callback to update viewport and camera aspect ratio when the window is resized
	onResize := func(evname string, ev interface{}) {
		// Get framebuffer size and update viewport accordingly
		width, height := a.GetSize()
		a.Gls().Viewport(0, 0, int32(width), int32(height))
		// Update the camera's aspect ratio
		cam.SetAspect(float32(width) / float32(height))
	}
	a.Subscribe(window.OnWindowSize, onResize)
	onResize("", nil)

	// Create a blue torus and add it to the scene
	geom := geometry.NewTorus(1, .4, 12, 32, math32.Pi*2)
	mat := material.NewStandard(math32.NewColor("DarkBlue"))
	mesh := graphic.NewMesh(geom, mat)
	scene.Add(mesh)

	// Create and add a button to the scene
	btn := gui.NewButton("Make Red")
	btn.SetPosition(100, 40)
	btn.SetSize(40, 40)
	btn.Subscribe(gui.OnClick, func(name string, ev interface{}) {
		mat.SetColor(math32.NewColor("DarkRed"))
	})
	scene.Add(btn)

	// Create and add lights to the scene
	scene.Add(light.NewAmbient(&math32.Color{1.0, 1.0, 1.0}, 0.8))
	pointLight := light.NewPoint(&math32.Color{1, 1, 1}, 5.0)
	pointLight.SetPosition(1, 0, 2)
	scene.Add(pointLight)

	// Create and add an axis helper to the scene
	scene.Add(helper.NewAxes(0.5))

	// Set background color to gray
	a.Gls().ClearColor(0.5, 0.5, 0.5, 1.0)

	// Run the application
	a.Run(func(renderer *renderer.Renderer, deltaTime time.Duration) {
		a.Gls().Clear(gls.DEPTH_BUFFER_BIT | gls.STENCIL_BUFFER_BIT | gls.COLOR_BUFFER_BIT)
		renderer.Render(scene, cam)
	})
}

hellog3n Screenshot

You can download and install hellog3n via:

go get -u github.com/g3n/demos/hellog3n

For more complex demos please see the G3N demo program.

Documentation

The complete engine API reference can be found here: GoDoc.

There is also the beginning of a Getting Started Guide, and a newly created list of Guides and Tutorials:

Along with those, a good way to learn how to use the engine is to see the source code of G3ND - the G3N demo.

Contributing

If you find a bug or create a new feature you are encouraged to send pull requests!

Community

Join our channel on Gophers Slack (Click here to register for Gophers Slack). It's a great way to have your questions answered quickly by the G3N community.

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].