A collection of library agnostic gamedev-like stuff
Warning
Beware of bugs: everything's made for personal use, and may be undocumented
- Unity like GameObjects + Components
- Scene Management (implement serializing/etc. yourself)
just implementIScene
and you created a scene! Next you can load it by usingSceneManagement.LoadScene(new Scene)
- Transform and Object graph
- Extendable Virtual Filesystem (NekoLib.Filesystem)
- ImGui Unity-Like in-game editor (NekoLib.Tools)
- Source-like console system (NekoLib.Console)
- Extra stuff like AttachMode, HotReloadService, Damping, base Scene implementation (NekoLib.Extra)
using NekoLib.Core;
using NekiLib.Scenes;
class Scene : IScene {
public string Name => "Name"
public bool DestroyOnLoad { get; set; } = true;
public int Index { get; set; }
private List<GameObject> _gameObjects;
public List<GameObject> GameObjects => _gameObjects;
public void Initialize() {
var gameObject = new GameObject();
gameObject.AddComponent<TestComponent>();
// Do stuff before first frame
}
public void Update() {
// Do stuff every frame
}
public void Draw() {
// Draw stuff on frame
}
}
class TestComponent : Behaviour {
void Awake() {
Console.WriteLine("Just like in Unity!")
}
}
static class Program {
public static void Main() {
var scene = new Scene();
SceneManagement.LoadScene(scene);
while (true) {
SceneManagement.Update();
SceneManagement.Draw();
}
}
}