Kaiju – 用Go和Vulkan编写的通用3D/2D游戏引擎,内置编辑器。
Kaiju – General purpose 3D/2D game engine in Go and Vulkan with built in editor

原始链接: https://github.com/KaijuEngine/kaiju

## Kaiju:用Go编写的新游戏引擎 Kaiju是一个新的、快速发展的2D/3D游戏引擎,使用Go语言构建,并由Vulkan支持。其核心目标是简单性和高性能,旨在超越Unity等成熟引擎——初步测试显示渲染速度高达9倍。 主要特性包括对Windows、Linux、Android的支持,以及(正在进行中)对Mac的支持,同时还集成了实验性的本地AI。尽管使用了垃圾回收语言(Go),但该引擎的设计旨在最大限度地减少GC的影响并保持稳定性,这对于面向公众的引擎至关重要。开发者可以直接用Go编写游戏,并计划支持Lua用于模组。 目前,基础引擎已经准备就绪,但编辑器仍在积极开发中,欢迎贡献。Kaiju优先考虑直接的开发体验,使其易于新贡献者上手,无需复杂的工具或语言。有关更新和更多信息,请访问项目的Discord和Twitter/X。

## Kaiju:一种新的游戏引擎 一个名为Kaiju的新通用3D/2D游戏引擎,使用Go和Vulkan构建,并内置编辑器,最近在Hacker News上分享。该项目可在GitHub上找到 ([github.com/kaijuengine](https://github.com/kaijuengine))。 讨论主要集中在让Kaiju在macOS上运行的挑战。用户推测这可能是因为该引擎没有使用像SDL这样的常用窗口/输入库,而是需要直接与macOS的Objective-C/Swift接口交互,而从Go绑定这些接口比较困难。与Apple的Vulkan实现MoltenVK集成也增加了复杂性。 一段几年前的视频提供了项目背景,揭示了一个最初(现在似乎已放弃)的要求,即所有pull request都必须包含一个视频演示。该引擎看起来至少从2015年就开始开发,最近的提交记录在2023年。
相关文章

原文

Kaiju is a 2D/3D game engine written in Go (Golang) backed by Vulkan. The goal of the engine is to use a modern, easy, systems level programming language, with a focus on simplicity, to create a new kind of game engine.

  • 📄 2D / 🧊 3D Game Engine
  • 🪟 Windows
  • 🐧 Linux
  • 🤖 Android (NEW, support now functional)
  • 🍎 Mac (support is currently WIP)
  • 🤖👉⌨️ Local AI (LLM) interop
  • ⚠️🚧🏗️👷‍♂️ Work in progress, under heavy development
  • 🚚 Faster builds than other game engines
  • 🔥 Better performance than other game engines (9x faster than Unity out of the box)
  • 💾 Less memory than other engines

The current version of the base engine renders extremely fast, faster than most would think a garbage collected language could go. In my testing a release mode build of a game in Unity with nothing but a black background and a cube runs at about 1,600 FPS. In Kaiju, the same thing runs at around 5,400 FPS on the same machine. In fact, a complete game, with audio, custom cursors, real time PBR rendering with real time shadows, UI, and more runs at 2,712 FPS (in "debug" mode) screenshots or it didn't happen.

I love C, and because I love C and found out that Ken Thompson played a part in designing Go, I gave Go a chance. It has been such a joy to use and work with I decided to port my C game engine to Go. Go is a modern system-level language that allows me to write code the way I want to write code and even have the opportunity to do some crazy things if I want to (no strings attached). Also the simplicity and "just works" of writing Assembly code was a great boost to my happiness.

What's more, it's a language that other developers can easily learn and jump right into extending the engine/editor. No need for developers to re-figure out some bespoke macros or crazy templating nonsense. It's flat, easy, straight forward, and the foot-gun is hidden behind some walls, but there if you want it. Furthermore, developers can write their games in Go directly, no need for some alternative language that is different from the engine code (but we'll include Lua for modding).

What about the Garbage Collector?!

I am creating this section because I get asked about it when I mention "Go", possibly not realizing that most public game engines use a garbage collector (GC).

The GC is actually a feature I'm happy with (shocker coming from a C guy). Well, the reason is simple, if you're going to make a game engine that the public will use and needs to be stable, you need a garbage collector. Unity has C# (and possibly an internal GC as well), Unreal has a GC (and it could use a tune up if you ask me), Godot has a GC albeit their scripting language or when you use C#. It is actually very important for public engines to have a GC because people are only human and make a lot of mistakes, mistakes they'll blame on you (the engine developer) before they blame themselves.

Coincidentally, the overall design I have for the engine plays very well with the GC and last I measured, I have a net-0 heap allocation while running (may need a new review). If you don't abuse the GC, you shouldn't generally feel it, it runs concurrently as well.

I'll be the first to admit, I think the developers of Go can create a better GC than I can, and probably better than Unreal and Unity too.

⚠️ WORK IN PROGRESS ⚠️

Though the engine is production ready, the editor is not, feel free to join and contribute to its development.

For the latest updates, please join the Discord or check my Twitter/X.

Please review the Ad-Hoc editor readme

Please see the documentation on how to get started and compile the engine

full-project-run-cycle.mp4
in-engine-ai.mp4
working-code-binding.mp4
content-tagging.mp4
status-bar-update.mp4
adding-transformation-tools.mp4
联系我们 contact @ memedata.com