{"id":13412923,"url":"https://github.com/g3n/engine","last_synced_at":"2025-04-25T14:48:02.605Z","repository":{"id":39633577,"uuid":"84232188","full_name":"g3n/engine","owner":"g3n","description":"Go 3D Game Engine (http://g3n.rocks)","archived":false,"fork":false,"pushed_at":"2025-02-08T13:44:47.000Z","size":13411,"stargazers_count":2917,"open_issues_count":37,"forks_count":303,"subscribers_count":85,"default_branch":"master","last_synced_at":"2025-04-24T08:52:32.042Z","etag":null,"topics":["3d-engine","3d-game-engine","3d-graphics","3d-rendering-engine","game-engine","go","go-library","golang","opengl"],"latest_commit_sha":null,"homepage":"https://discord.gg/NfaeVr8zDg","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g3n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-07T18:25:09.000Z","updated_at":"2025-04-24T07:48:07.000Z","dependencies_parsed_at":"2024-01-08T15:03:01.008Z","dependency_job_id":"2257be73-b441-4377-8db0-4061a6c73993","html_url":"https://github.com/g3n/engine","commit_stats":{"total_commits":732,"total_committers":37,"mean_commits":"19.783783783783782","dds":0.5396174863387978,"last_synced_commit":"b5c63e94be77871a78a9062f816b90d3af58b6c1"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3n%2Fengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3n%2Fengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3n%2Fengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3n%2Fengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g3n","download_url":"https://codeload.github.com/g3n/engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250837731,"owners_count":21495596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-engine","3d-game-engine","3d-graphics","3d-rendering-engine","game-engine","go","go-library","golang","opengl"],"created_at":"2024-07-30T20:01:31.153Z","updated_at":"2025-04-25T14:48:02.546Z","avatar_url":"https://github.com/g3n.png","language":"Go","readme":"\n\u003cp align=\"center\"\u003e\u003cimg width=\"150\" src=\"https://github.com/g3n/g3nd/blob/master/data/images/g3n_logo.png\" alt=\"G3N Banner\"/\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://godoc.org/github.com/g3n/engine\"\u003e\u003cimg src=\"https://godoc.org/github.com/g3n/engine?status.svg\" alt=\"Godoc\"\u003e\u003c/img\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/g3n/engine\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/g3n/engine\" alt=\"Go Report Card\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/NfaeVr8zDg\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-G3N-blue\" alt=\"Discord\"/\u003e\u003c/a\u003e\n  \n\u003c/p\u003e\n\u003cp\u003e\u003ch1 align=\"center\"\u003eG3N - Go 3D Game Engine\u003c/h1\u003e\u003c/p\u003e\n\n**G3N** (pronounced \"gen\") is an OpenGL 3D Game Engine written in Go.\nIt 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](https://www.openal.org/).\n\n### **To see G3N in action try the [G3N demo](https://github.com/g3n/g3nd) or the [Gokoban](https://github.com/danaugrs/gokoban) award winning game.**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"float: right;\" src=\"https://raw.githubusercontent.com/g3n/g3nd/master/data/images/g3nd_screenshots.png\" alt=\"G3ND In Action\"/\u003e\n\u003c/p\u003e\n\n## Highlighted Projects Using G3N\n\n* [Gokoban - 3D Puzzle Game (_1st place in the 2017 Gopher Game Jam_)](https://github.com/danaugrs/gokoban)\n* [go-tsne (_dimensionality reduction particularly well suited for visualizing high-dimensional datasets_)](https://github.com/danaugrs/go-tsne)\n* [G3N Server-Side Rendering](https://github.com/moethu/webg3n)\n\n## Dependencies\n\n**Go 1.8+** is required. The engine also requires the system to have an **OpenGL driver** and a **GCC-compatible C compiler**.\n\nOn 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.\n\n### Ubuntu/Debian-like\n\n    $ sudo apt-get install xorg-dev libgl1-mesa-dev libopenal1 libopenal-dev libvorbis0a libvorbis-dev libvorbisfile3\n\n### Fedora\n\n    $ 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 libXxf86vm-devel\n\n### CentOS 7\n\nEnable the EPEL repository:\n\n    $ sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n    \nThen install the same packages as for Fedora - remember to use `yum` instead of `dnf` for the package installation command.\n    \n### Arch\n\n    $ sudo pacman -S base-devel xorg-server mesa openal libvorbis\n    \n### Void\n\n    $ sudo xbps-install git xorg-server-devel base-devel libvorbis-devel libvorbis libXxf86vm-devel libXcursor-devel libXrandr-devel libXinerama-devel libopenal libopenal-devel libglvnd-devel\n    \n### Windows\n\nWe tested the Windows build using the [mingw-w64](https://mingw-w64.org) toolchain (you can download [this file](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z) in particular).\n\nThe necessary [audio DLLs](audio/windows/bin) are supplied and need to be added to your PATH.\nIf you would like to build the DLLs yourself you can find the libraries' source code and build instructions [here](audio/windows).\n\n### macOS\n\nInstall the development files of OpenAL and Vorbis using [Homebrew](https://brew.sh/):\n\n    brew install libvorbis openal-soft\n\n## Installation\n\nThe following set of commands will download and install the engine along with all its Go dependencies:\n  \n```\ngit clone https://github.com/g3n/engine g3n-engine\ncd g3n-engine\ngo install ./...\n```\n\n## Features\n\n* Cross-platform: Windows, Linux, and macOS. (WebAssembly is 90% complete!)\n* Integrated GUI (graphical user interface) with many widgets\n* Hierarchical scene graph - nodes can contain other nodes\n* 3D spatial audio via OpenAL (.wav, .ogg)\n* Real-time lighting: ambient, directional, point, and spot lights\n* Physically-based rendering: fresnel reflectance, geometric occlusion, microfacet distribution\n* Model loaders: glTF (.gltf, .glb), Wavefront OBJ (.obj), and COLLADA (.dae)\n* Geometry generators: box, sphere, cylinder, torus, etc...\n* Geometries support morph targets and multimaterials\n* Support for animated sprites based on sprite sheets\n* Perspective and orthographic cameras\n* Text image generation and support for TrueType fonts\n* Image textures can be loaded from GIF, PNG or JPEG files\n* Animation framework for position, rotation, and scale of objects\n* Support for user-created GLSL shaders: vertex, fragment, and geometry shaders\n* Integrated basic physics engine (experimental/incomplete)\n* Support for HiDPI displays\n\n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"float: right;\" src=\"https://github.com/g3n/g3n.github.io/raw/master/img/g3n_banner_small.png\" alt=\"G3N Banner\"/\u003e\n\u003c/p\u003e\n\n## Hello G3N\n\nThe code below is a basic \"hello world\" application ([hellog3n](https://github.com/g3n/demos/tree/master/hellog3n)) that shows a blue torus and a button that when clicked makes the torus red:\n\n```Go\npackage main\n\nimport (\n\t\"github.com/g3n/engine/app\"\n\t\"github.com/g3n/engine/camera\"\n\t\"github.com/g3n/engine/core\"\n\t\"github.com/g3n/engine/geometry\"\n\t\"github.com/g3n/engine/gls\"\n\t\"github.com/g3n/engine/graphic\"\n\t\"github.com/g3n/engine/gui\"\n\t\"github.com/g3n/engine/light\"\n\t\"github.com/g3n/engine/material\"\n\t\"github.com/g3n/engine/math32\"\n\t\"github.com/g3n/engine/renderer\"\n\t\"github.com/g3n/engine/util/helper\"\n\t\"github.com/g3n/engine/window\"\n\t\"time\"\n)\n\nfunc main() {\n\n\t// Create application and scene\n\ta := app.App()\n\tscene := core.NewNode()\n\n\t// Set the scene to be managed by the gui manager\n\tgui.Manager().Set(scene)\n\n\t// Create perspective camera\n\tcam := camera.New(1)\n\tcam.SetPosition(0, 0, 3)\n\tscene.Add(cam)\n\n\t// Set up orbit control for the camera\n\tcamera.NewOrbitControl(cam)\n\n\t// Set up callback to update viewport and camera aspect ratio when the window is resized\n\tonResize := func(evname string, ev interface{}) {\n\t\t// Get framebuffer size and update viewport accordingly\n\t\twidth, height := a.GetSize()\n\t\ta.Gls().Viewport(0, 0, int32(width), int32(height))\n\t\t// Update the camera's aspect ratio\n\t\tcam.SetAspect(float32(width) / float32(height))\n\t}\n\ta.Subscribe(window.OnWindowSize, onResize)\n\tonResize(\"\", nil)\n\n\t// Create a blue torus and add it to the scene\n\tgeom := geometry.NewTorus(1, .4, 12, 32, math32.Pi*2)\n\tmat := material.NewStandard(math32.NewColor(\"DarkBlue\"))\n\tmesh := graphic.NewMesh(geom, mat)\n\tscene.Add(mesh)\n\n\t// Create and add a button to the scene\n\tbtn := gui.NewButton(\"Make Red\")\n\tbtn.SetPosition(100, 40)\n\tbtn.SetSize(40, 40)\n\tbtn.Subscribe(gui.OnClick, func(name string, ev interface{}) {\n\t\tmat.SetColor(math32.NewColor(\"DarkRed\"))\n\t})\n\tscene.Add(btn)\n\n\t// Create and add lights to the scene\n\tscene.Add(light.NewAmbient(\u0026math32.Color{1.0, 1.0, 1.0}, 0.8))\n\tpointLight := light.NewPoint(\u0026math32.Color{1, 1, 1}, 5.0)\n\tpointLight.SetPosition(1, 0, 2)\n\tscene.Add(pointLight)\n\n\t// Create and add an axis helper to the scene\n\tscene.Add(helper.NewAxes(0.5))\n\n\t// Set background color to gray\n\ta.Gls().ClearColor(0.5, 0.5, 0.5, 1.0)\n\n\t// Run the application\n\ta.Run(func(renderer *renderer.Renderer, deltaTime time.Duration) {\n\t\ta.Gls().Clear(gls.DEPTH_BUFFER_BIT | gls.STENCIL_BUFFER_BIT | gls.COLOR_BUFFER_BIT)\n\t\trenderer.Render(scene, cam)\n\t})\n}\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg style=\"float: right;\" src=\"https://github.com/g3n/demos/blob/master/hellog3n/screenshot.png\" alt=\"hellog3n Screenshot\"/\u003e\n\u003c/p\u003e    \n  \nYou can download and install `hellog3n` via:\n    \n    go install github.com/g3n/demos/hellog3n@latest\n\nFor more complex demos please see the [G3N demo program](https://github.com/g3n/g3nd).\n\n## Documentation\n\nThe complete engine API reference can be found here: [![GoDoc](https://godoc.org/github.com/g3n/engine?status.svg)](https://godoc.org/github.com/g3n/engine).\n\nThere is also the beginning of a Getting Started Guide, and a newly created list of Guides and Tutorials:\n\n* [Getting Started](https://github.com/g3n/engine/wiki/Getting-Started-(WIP))\n* [Guides and Tutorials](https://github.com/g3n/engine/wiki/Guides-and-Tutorials)\n\nAlong with those, a good way to learn how to use the engine is to see the source code of [G3ND - the G3N demo](https://github.com/g3n/g3nd).\n  \n## Contributing\n\nIf you find a bug or create a new feature you are encouraged to send pull requests!\n\n## Community\n\nJoin our [Discord channel](https://discord.gg/NfaeVr8zDg). It's the best way to have your questions answered quickly by the G3N community.\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/g3n/engine.svg)](https://starchart.cc/g3n/engine)\n","funding_links":[],"categories":["开源类库","Go","Open source library","Game Development","游戏开发","Repositories","Relational Databases","Libraries"],"sub_categories":["游戏相关","Game Related","Advanced Console UIs","SQL 查询语句构建库","Search and Analytic Databases","检索及分析资料库","Go"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3n%2Fengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg3n%2Fengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3n%2Fengine/lists"}