StasAndreich / Nuul-3DGameEngine

Stupidly simple implementation of 3D game engine based on DirectX 11.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Nuul icon

Nuul - 3D Game Engine

Built with .NET and DirectX 11 wrapper (SharpDX).
Source code »


How it should work


Example of creating game logic:
// Create Scene.
Scene scene = new Scene("Main");

// Create game objects with components.
GameObject gameObject = new GameObject("obstacle");
MeshRenderer meshRenderer = new MeshRenderer();
meshRenderer.AddMesh("model1.fbx");
gameObject.AddComponent(meshRenderer);

// Add object to scene.
scene.AddGameObject(gameObject);

Another example:

// Create game objects with components.
GameObject gameObject1 = new GameObject("obstacle1");
MeshRenderer meshRenderer1 = new MeshRenderer("model1.fbx");
gameObject1.AddComponent(meshRenderer1);

// Add object to collection.
GameObjectCollection collection = new GameObjectCollection();
collection.Add(gameObject1);

// And than create Scene.
Scene scene1 = new Scene("Main1", collection);

Getting component from GameObject instance:

RigidBody rb = gameObject.GetComponent<RigidBody>();

About

Stupidly simple implementation of 3D game engine based on DirectX 11.


Languages

Language:C# 100.0%