Archive

Archive for the ‘XNA’ Category

Unity 3D Thoughts

April 24, 2011 Leave a comment

I’ve spent the last few months working on a project using the Unity 3D engine and have to say that it’s a pretty solid engine. While on any given day, I’d much rather be using the UDK tool kit, I don’t mind using Unity when I need to.

The unity community is very supportive, and the company seems geared towards helping indie game developers out with making their own video games which is a plus. The engine does not have all of the features that UDK does, like a cut-scene editor and point-and-click scripting, but for developers that are used to C# and XNA, I find the Unity is a perfect tool to help keep development costs down. The transition is not that difficult to make.

One of the things I really like with Unity, is the ability to write code, and then run it immediately. I’m not aware of any way to do that with UDK, which I believe requires you to restart the editor each time you want to compile the scripts and have them take affect.

I’m really wanting to get my current project completed, but I’m suffering from lack of 3D math knowledge, which hinders my development speed. That and building some sort of state manager, which is taking some time.

I am going to spend tonight really focusing on fixing some of the issues I have with my project, and getting a working copy uploaded to the teams SVN tonight.

Advertisements

Blit Script Updates

May 29, 2010 1 comment

I spent some time this morning working on converting the Blit Script Engine from .NET 3.5 and XNA 3.0 to .NET 4.0 and XNA 4.0. The project was moved into Visual Studio 2010 Express and now supports Dynamic Types which is really nice.

Now instead of being forced to Explicitly Convert a Type, developers can access the Type dynamically during runtime.

The previous version required the following lines of code to change a Property and invoke the scripts method.

//Assign a value to the scripts Name property
engine.GetObject("Player").SetProperty("Name", "Billy Bob");
//Get the property value from the object and assign it to the window title.
string bulletSize = (string)engine.GetObject("Player").GetProperty("Name");
//Invoking methods can be performed using an explicit Type conversion
bool temp = (bool)engine.GetObject("Player").InvokeMethod("IsColliding", null);
if (temp)
    Window.Title = "Invoke Method Completed without error!";

However, now with .NET 4.0 and the latest version of Blit Script, developers can access properties and invoke methods without needing to perform any conversions.

//Supports .NET 4.0 Dynamic Types; Use this for nested Property access.
engine.GetObject("Player").SetProperty().Name = "Bob";
string bulletSize = engine.GetObject("Player").GetProperty().Weapon.Bullet.Size;
//Or you can invoke a method using a Dynamic Type (.NET 4.0 only)
dynamic d = engine.GetObject("Player").InvokeMethod("IsColliding", null);
if (d)
    Window.Title = "Invoke Method completed without error!";

As you can see from the two examples, developers no longer need to do any conversions, and using the supported Dynamic Type, allows them to just reference their scripts from within their engine as if it was a class contained within the engine already.

Both forms of property management is supported with the latest version of the Blit Source, however Dynamic Type support was not implemented when I released 1.0, but it will be supported in the next release.

Categories: C#, Development, Programming, XNA