Friday, February 12th, 2010
Balder was one of the first 3d prototype engines in Silverlight and it has evolved quite nicely. Balder by Einar Ingebrigtsen is described as a “Managed GameEngine with both 2D and 3D support targetting Silverlight, Xna and OpenGL.”
The sample browser will show you what Balder is capable of and it has come pretty far since the first version showing a wireframe teapot.
You know you’ve made it as a 3D engine when there are Augmented Reality apps for it.
Here’s a glance at what some of the C# source looks like for a feel of the engine code from the Silverlight4 TestApp:
using Balder.Core.Execution;
using Balder.Core.Objects.Geometries;
using System;
using Balder.Core.Lighting;
using Balder.Core;
using Colors=System.Windows.Media.Colors;
namespace Balder.Silverlight4.TestApp
{
public class MyGame : Game
{
public override void OnInitialize()
{
Camera.Position.X = 0;
Camera.Position.Y = 0;
Camera.Position.Z = -80;
var light = new OmniLight();
light.Diffuse = Color.FromSystemColor(Colors.Green);
light.Ambient = Color.FromSystemColor(Colors.Green);
light.Specular = Color.FromSystemColor(Colors.White);
light.Position.X = 0;
light.Position.Y = 0;
light.Position.Z = -130;
Scene.AddNode(light);
base.OnInitialize();
}
public override void OnLoadContent()
{
var teapot = ContentManager.Load("teapot.ase");
Scene.AddNode(teapot);
base.OnLoadContent();
}
private double _sin;
public override void OnUpdate()
{
Camera.Position.X = (float)(Math.Sin(_sin)*80);
Camera.Position.Y = 0;
Camera.Position.Z = (float)(Math.Cos(_sin) * 80);
_sin += 0.05;
base.OnUpdate();
}
}
}
Tags: 3d, ase, balder, C#, csharp, ENGINE, SILVERLIGHT
Posted in 3D ENGINES, 3d, C#, SILVERLIGHT, TECHNOLOGY | View Comments
Saturday, February 28th, 2009
Alchemy is going to shake things up a bit. As witnessed before from Quake running in flash and now ODE compiled to run in flash using Alchemy (LLVM based). It is an early test but shows what could be possible.
Mihai Pricope has a post with sources on how he got the ODE (Open Dynamics Engine) a great open source physics engine for 3D, running on the AVM2 Flash Player virtual machine.

I’ve took Alchemy for a test and decided to compile ODE (Open Dynamic Engine). Just to add yet another physics engine to the Flash World. It was a hell of a ride but I finally got to produce some bouncing balls
. For a still unknown reason some as 3d libraries have been very slow to render 6 translucent walls and 2 balls. Papervision3D seems to move quite decent.
You can download the ode sources from here. To recompile them do (you need to have the Alchemy environment turned on):
Flash 10 will become mainstream shortly and with that the possibilities of using Alchemy in your projects is becoming a reality for production. But what specifically can you do with Alchemy, a project that helps to compile C/C++ code into AVM2 capable files?
Alchemy described from Adobe:
With Alchemy, Web application developers can now reuse hundreds of millions of lines of existing open source C and C++ client or server-side code on the Flash Platform. Alchemy brings the power of high performance C and C++ libraries to Web applications with minimal degradation on AVM2. The C/C++ code is compiled to ActionScript 3.0 as a SWF or SWC that runs on Adobe Flash Player 10 or Adobe AIR 1.5.
Alchemy is based on the LLVM Low Level Virtual Machine that allows new levels of code translation. Maybe this can lead to more effective and performing code to run on the iPhone with flash player 10. Or some type of system that allows flash developers to code in AS3 or take projects and get them ready to run on the iPhone much like some of the Java to Cocoa compilation systems and Unity3D using mono to compile down to iPhone capable code.
Tags: ALCHEMY, AS3, C#, ENGINE, FLASH, flash10, FLEX, llvm, ode, PHYSICS
Posted in ACTIONSCRIPT, ACTIONSCRIPT3, ADOBE, ALCHEMY, APPLICATIONS, ARCHITECT, AS3, DEVELOPMENT, FLASH, GAMEDEV, GAMES, LIBRARIES, PAPERVISION, PERFORMANCE, PHYSICS, PROGRAMMING, RENDERING, TECHNOLOGY | Comments Off