Hello, this is the first devlog of my game ‘Sunaba’.

In this first devlog, I would like to talk about the custom scene system i wrote for my game, this system allows me to support runtime mod support in my game. It’s currently very incomplete, for instance, it doesn’t support the imporing of 3D models.

At this time of writing, it is posible to create a basic walking simulator using this scene system.

The scene system is based on a Object-Compoment model, similar to one found in the Unity game engine. Custom scripts extend the Component class

import { Component } from "assets://sceneToolkit/sceneGraph.js";

export default class HelloWorld extends Component {
  start() {
    console.log("Hello, World!");
  }
}

Here are more complex examples

import { Component } from "assets://sceneToolkit/sceneGraph.js";

export default class HelloComponent1 extends Component {
  sayHello(name) {
    console.log("Hello, " + name + "!");
  }
}
import { Component } from "assets://sceneToolkit/sceneGraph.js";
import HelloComponent1 from "assets://helloComponent1.js";

export default class HelloComponent2 extends Component {
  start() {
    const helloComponent1 = this.getComponent(HelloComponent1);
    helloComponent1.sayHello("mintkat");
  }
}

These examples show how one might write a compoment script.

Beyond just basic hello world scripts there various scripts for things like camera systems, character controllers, primative meshes, rigid bodies, and more for doing various things.

The next thing i plan to do is add various compoment scripts to support the importing of 3D models.

I’ve wrote a pretty simple scene editor for editing scenes.

The scene system has fairly basic 3D support, and primitive 2D support.

Overall the scene system is core part of the engine I’ve built for my game.