Logo

dev-resources.site

for different kinds of informations.

Unofficial Live2D Cubism SDK for Golang

Published at
12/25/2024
Categories
live2d
go
ebitengine
gamedev
Author
aethiopicuschan
Categories
4 categories in total
live2d
open
go
open
ebitengine
open
gamedev
open
Author
15 person written this
aethiopicuschan
open
Unofficial Live2D Cubism SDK for Golang

Introduction

Q. What is Live2D?
A. See Official Site.

Main Topic

If you want to use Live2D, you’ll need the Cubism Framework and Cubism Core. The former has official open-source releases for various environments and programming languages, but the latter is closed and has no alternatives. (For detailed configuration, please refer to the Cubism Core API Reference.)

Now, looking at the Cubism Framework, you can find available versions for Unity, Native, Web and Java.

But I’m really into Golang and Ebitengine!

Deliverables

In the end, I wrote my own code that replicates the Cubism Framework’s functionality and turned it into a library: github.com/aethiopicuschan/cubism-go.

The library also includes a reference renderer for Ebitengine, so if you’re using Ebitengine for development, you can easily incorporate it into your project.

ScreenShot of example project

About Cubism Core

Cubism Core is provided as a dynamic library (such as a .dylib).

Let's consider how to use it from Golang. We could use cgo, of course, but this time I employed a library called purego.

You'll need to grapple with a storm of unsafe and uintptr, but it's still much better than using cgo.

In this case, there's an implementation related to the following. Feel free to take a look and experience the storm for yourself!

core.go

I did say you'd have to battle a storm, but purego is a fantastic library, so I encourage everyone to try it out.

That's all. Thank you for reading.

gamedev Article's
30 articles in total
Favicon
Singularity: Streamlining Game Development with a Universal Framework
Favicon
The Future of Gaming: Top Trends Revolutionising the Industry
Favicon
TOP 5 Brain-Boosting Logic Games for Your Phone
Favicon
Mấy dòng suy nghĩ về RR1
Favicon
Guess what? You can make a game inside a PDF!
Favicon
Game Dev Digest — Issue #264 - Game Dev Insights: AI Tools, VFX, Optimization & Tutorials
Favicon
Local AI Avatars answer history questions in Unity app
Favicon
Bag: A header-only, simplistic, C++20, zipping & unzipping library.
Favicon
Making a game
Favicon
Play your first Hive adventure now
Favicon
🚀 Nvidia Unveils Exciting Tech at CES 2025: A Game-Changer 💻
Favicon
Behind the Aisles: The Essential Role of the Service Cart -Devlog#10
Favicon
How To Play Games In School Time Without Restrictions?
Favicon
endless runner in godot 4 3d all systems and minus like subway surfers for mobile
Favicon
Online Game Sport Platform
Favicon
Enclave Games Monthly Report: December 2024
Favicon
Building Corruptbox 3: A Web-Based Music Creation Game
Favicon
Looking for a career in game development
Favicon
Tower defense clicker game built with Svelte 5, without canvas. Only CSS transitions and the power of Runes
Favicon
Game Development with Pygame
Favicon
Roblox Studio
Favicon
Turning Taboo into Fun: The React-Powered Party Game You Can Play Online
Favicon
Game Dev Digest — Issue #263 - Tricks, Tips and more
Favicon
Unofficial Live2D Cubism SDK for Golang
Favicon
The Art of Game Testing
Favicon
[Boost]
Favicon
Starting with Unreal Engine
Favicon
Dive into the Thrilling World of IO Games: Unleash Your Inner Gamer!
Favicon
Fortnite
Favicon
Boosting Your Drift Game with Custom Car Mods

Featured ones: