Archive for May, 2010

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

Blit Script Engine goes Live!

May 29, 2010 4 comments

I spent tonight writing a new scripting engine titled Blit Script that’s aimed solely at games targeting Microsoft’s XNA framework. The engine allows developers to instance scripts and access their properties during runtime on both PC & Xbox 360’s (although the 360 library has not been created yet, the code is there though).

The engine is easy to use, needing a minimum of two lines of code to get scripts compiled, and two lines of code to initialize and load all of the scripts into memory. It works really nice if I do say so myself, even though it still has quiet a bit of work to do. It needs to allow users to invoke methods dynamically (something that it’s bigger brother Managed Scripting supports) along with providing some additional control over Game Objects once they are created.

I spent just 3 hours working on this tonight and had it thrown together really nicely. The website was fleshed out and the code cleaned up and uploaded to Codeplex rather quickly. It’s making me consider re-writing a large chunk of Managed Scripting as it’s rather bulky and ugly to look at.

Take a look at it and comment back! The script engine can be used outside of XNA for those of you that develop PC applications, however you’re still required to have XNA installed as the engine itself has references to the framework and won’t run without it installed.

Categories: Uncategorized

Excel goodness

May 26, 2010 Leave a comment

Who would have thought that you could build a complete game using Microsofts Excel & VBA scripts? I surely didn’t, but after spending just 1 day I discovered you could.

While the game obviously won’t be state of the art, it’s still impressive at just how flexible Excel actually is.

UI Design Choices

May 21, 2010 2 comments

I’m currently happy with how the mechanics of the Mud Designer has been layed out. The only thing that is really bothering me is the big open gap that sits on my screen. The home of Object Widgets. Something that has been very difficult to design for, and I haven’t been able to nail down just yet.  I’m still looking at home I want to implement Widgets into the screen space I have left over, or if I want to do something totally different all together. It would really be nice to have each object’s editor fill that void, quiet a few of the objects barely have half a dozen options to modify, and it doesn’t really need that much space.

For those of you that thought I’d walked away from this project, think again! This project is far from going away 😛 I’m still working on it, and now that time has been freed up, I’m really trying to work on getting something going with the UI. This thing needs to look slick.

Categories: Uncategorized

MudDesigner Review

May 16, 2010 4 comments

I took a look at the designer this weekend and noticed a couple things that I’d like to work on and get corrected. While the engine is far from even being completed, I thought it would be good to clean up various elements and make them work correctly rather than piecing together a toolkit that’s half baked and does not function as it should.

The first thing I noticed is that when you select an existing Realm and try to create a new Zone via the Right-Click menu, it does not create the Zone within that Realm; It creates the Zone inside the external Zones directory. This shouldn’t be happening, so I’ll look at fixing that.

The next thing I noticed is that the status bar doesn’t really update the user on things that are going on. I’ll spend some time working on properly implementing some changes to the designer that allows the status bar to correctly relay information to the developer like it’s supposed to.

It’s a good thing that I’ve taken several months away from the project, I came back and tried to put together a test game real quick and had some difficulties figuring out how to assign the games starting room. The Right-Click menu wouldn’t get it done for me and I had to manually perform the assignment. If I can’t remember the correct way to assign starting rooms via the Right Click Context menu then it’s a design flaw and I will spend some time re-designing it making it easier and more intuitive to use.

The Test-Project needs to be worked on some as well, the console needs to have some work done to it and I also want to look at possibly re-writing the designer itself. I’m not happy with how it works. I think what needs to happen is I need to write the actual engine first, get that up and running and working, then write the designer that works with it.

There are a few people that have emailed me wanting to work with me on developing on the engine and building a MUD with it. I’m very interested in it and believe it would greatly help with the development of the engine and it’s toolkit. I’ll keep everyone posted on the progress of that as I get more information.

Categories: Uncategorized