Damn spam bots...

Just some updates:
I'm having exams time right now so not that much time to work on the engine...
But here is a screenshot:



The screenshot features the deferred renderer, a character controller and physics. You can push the box around with the character and the red light is rotating around the char, so you can see different lighting effects.

Code for creating the walkable, physics player:
Code:
SceneNode player = new SceneNode();
player.Transform.LocalPosition = new Vector3(0, 3, 0);
player.Components.Add<CharacterController>();
player.Components.Add<Renderer>().Model = Game.Assets.Load<Model>("models/character");
player.Components.Add<PlayerInput>();
player.Parent = this.scene.Root;

SceneNode swirl = new SceneNode();
swirl.Transform.LocalPosition = new Vector3(2, 0, 0);
swirl.Components.Add<Scriptable>().Script =
    @"function update(self, time)
        self.Node.Transform:Rotate(0, 60 * time.DeltaTime, 5 * time.DeltaTime)
    end";
swirl.Parent = player;

SceneNode light = new SceneNode();
light.Components.Add<PointLight>().Color = Color.Red;
light.Parent = swirl;



For those who never worked outside Gametudio:
SceneNode is some kind of "ENTITY" that allows you to create objects in your scene. The nodes build up a scene hierarchy so every child object moves relative to its parent.

Also every SceneNode has an arbitrary number of components. A component defines a behaviour or information for the scene node like a Gamestudio "action".
The main difference is that an action is started and then runs until it dies. Components can be enabled or disabled, also expose variables you can change at runtime. So you start the light component and then you can just get the light from the SceneNode and modify its color.

There are some premade components already like RigidBody for physics and different shapes for their appearance. Unlike gamestudio you can define your physics shape pretty good and the shape is not depending on the model you use.

Next there is the Renderer component. It does what its name says: It renders something. Well, not exactly, but you can see the effects. The Renderer component adds a 3D model to the render list with the transformation (position, rotation) of the scene node. Then the SceneRenderer draws the whole scene.

This approach allows you to create a custom scene rendering without changing anything on the scene logic itself. So changing from a simple texture rendering without lighting to a complex tiled forward renderer is possible. You don't even have to change a line of code in your whole scene, you just need to switch the renderer.

Regards
Felix

PS.: The engine now uses a multithreaded approach. It renders now while updating the physics.

PPS.: Ask me questions!

Last edited by MasterQ32; 02/09/14 12:01. Reason: Code formatting.

Visit my site: www.masterq32.de