All Projects → g3n → G3nd

g3n / G3nd

Licence: bsd-2-clause
G3N Game Engine Demo

Programming Languages

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

Projects that are alternatives of or similar to G3nd

Etengine
Realtime 3D Game-Engine with a focus on space sim. Written in C++ 14
Stars: ✭ 408 (+107.11%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Daemon
The Dæmon game engine. With some bits of ioq3 and XreaL.
Stars: ✭ 136 (-30.96%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Engine
Go 3D Game Engine
Stars: ✭ 1,362 (+591.37%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Engine
A basic cross-platform 3D game engine
Stars: ✭ 208 (+5.58%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Opengl Renderer
Modern OpenGL renderer written in C++17
Stars: ✭ 85 (-56.85%)
Mutual labels:  game-engine, 3d-game-engine, opengl
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 (+816.75%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Blue Flame Engine
A 3D/2D game engine that supports both DirectX11 and OpenGL 4.5
Stars: ✭ 129 (-34.52%)
Mutual labels:  game-engine, 3d-game-engine, opengl
Fxgl
Stars: ✭ 2,378 (+1107.11%)
Mutual labels:  game-engine, 3d-game-engine
Raz
Modern & multiplatform game engine in C++17
Stars: ✭ 161 (-18.27%)
Mutual labels:  game-engine, opengl
Dagon
3D game engine for D
Stars: ✭ 165 (-16.24%)
Mutual labels:  game-engine, opengl
Opentk
The Open Toolkit library is a fast, low-level C# wrapper for OpenGL, OpenAL & OpenCL. It also includes windowing, mouse, keyboard and joystick input and a robust and fast math library, giving you everything you need to write your own renderer or game engine. OpenTK can be used standalone or inside a GUI on Windows, Linux, Mac.
Stars: ✭ 2,284 (+1059.39%)
Mutual labels:  game-engine, opengl
Flux
A real-time physically based rendering engine written in C++ and OpenGL
Stars: ✭ 171 (-13.2%)
Mutual labels:  game-engine, opengl
Spring
A powerful free cross-platform RTS game engine. - Report issues at https://springrts.com/mantis/
Stars: ✭ 2,385 (+1110.66%)
Mutual labels:  opengl, game-engine
Mos
Lightweight game engine.
Stars: ✭ 153 (-22.34%)
Mutual labels:  game-engine, opengl
Xray 15
X-Ray Engine 1.5 expansion. Original version was used in S.T.A.L.K.E.R.: Clear Sky.
Stars: ✭ 151 (-23.35%)
Mutual labels:  game-engine, opengl
Spearmint
Spearmint — an updated id Tech 3 engine for continuing the classics and creating new games.
Stars: ✭ 161 (-18.27%)
Mutual labels:  game-engine, opengl
Innocenceengine
Cross-platform modern game engine.
Stars: ✭ 149 (-24.37%)
Mutual labels:  game-engine, opengl
Alimer
Cross-platform game engine.
Stars: ✭ 172 (-12.69%)
Mutual labels:  game-engine, 3d-game-engine
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-8.12%)
Mutual labels:  game-engine, opengl
Flextgl
OpenGL and Vulkan header and loader generator.
Stars: ✭ 180 (-8.63%)
Mutual labels:  game-engine, opengl

G3ND - G3N Game Engine Demo

G3ND is the demo for the G3N 3D game engine. It demonstrates and exercises the main features of the engine. Browsing and reading through the source code of the demos is a great way to learn how to use the engine. It's very easy to create a new demo as the main program takes care of initializing common objects and components.

G3ND In Action

Dependencies

G3ND only depends on G3N and so has the same dependencies as the engine itself. Please verify that the engine dependencies are in place before installing.

Installation

The following set of commands will download, compile, and install G3ND, the engine, and other Go packages on which the engine depends. It will also generate the g3nd binary.

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

Running

When G3ND is run without any command line parameters it shows the tree of categorized available demos at the left of its window and an empty center area to show the demo scene. Click on a category in the tree to expand it and then select a demo to show.

At the upper right corner is located the Control folder, which when clicked shows some controls which can change the parameters of the current demo. To run G3ND at fullscreen press Alt-F11 or start it using the -fullscreen command line flag.

To exit the program press ESC or close the window.

You can start G3ND to show a specific demo specifying the demo name (category plus "." plus name) in the command line such as:

>g3nd geometry.box

The G3ND window shows the current FPS rate (frames per second) of your system and the maximum potential FPS rate. The desired FPS rate can be adjusted using the command line parameters: -swapinterval and -targetfps.

Creating a new demo/test

You can use the tests/model.go file as a template for your tests. You can can change it directly or copy it to a new file such as tests/mytest.go and experiment with the engine. Your new test will appear under the |tests| category with mytest name. The contents of the tests/model.go file are shown below, documenting the common structure of all demo programs:

// This is a simple model for your tests
package tests

import (
	"github.com/g3n/engine/graphic"
	"github.com/g3n/engine/math32"
	"github.com/g3n/g3nd/app"
	"time"
)

// Sets the category and name of your test in the demos.Map
// The category name choosen here starts with a "|" so it shows as the
// last category in list. Change "model" to the name of your test.
func init() {
	app.DemoMap["|tests|.model"] = &testsModel{}
}

// This is your test object. You can store state here.
// By convention and to avoid conflict with other demo/tests name it
// using your test category and name.
type testsModel struct {
	grid *graphic.GridHelper // Pointer to a GridHelper created in 'Start'
}

// This method will be called once when the test is selected from the G3ND list.
// 'a' is a pointer to the G3ND application.
// It allows access to several methods such as a.Scene(), which returns the current scene,
// a.DemoPanel(), a.Camera(), a.Window() among others.
// You can build your scene adding your objects to the a.Scene()
func (t *testsModel) Start(a *app.App) {

	// Show axis helper
	ah := graphic.NewAxisHelper(1.0)
	a.Scene().Add(ah)

	// Creates a grid helper and saves its pointer in the test state
	t.grid = graphic.NewGridHelper(50, 1, &math32.Color{0.4, 0.4, 0.4})
	a.Scene().Add(t.grid)

	// Changes the camera position
	a.Camera().GetCamera().SetPosition(0, 4, 10)
	a.Camera().GetCamera().LookAt(&math32.Vector3{0, 0, 0})
}

// This method will be called at every frame
// You can animate your objects here.
func (t *testsModel) Update(a *app.App, deltaTime time.Duration) {

	// Rotate the grid, just for show.
	rps := float32(deltaTime.Seconds()) * 2 * math32.Pi
	t.grid.RotateY(rps * 0.05)
}

// Cleanup is called once at the end of the demo.
func (t *testsModel) Cleanup(a *app.App) {}

Contributing

If you spot a bug or create a new interesting demo you are encouraged to send pull requests.

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