Jump to content

April 2017 »

23 242526272829

Recent Comments

Recent Comments

View more


4: Adsense

DeyjaScript 12 : Closures

The next step after lambda functions is obviously closures. Without closures, I couldn't write code like this.

var view = new View(world, new Rectangle(0,0,800,600));
bindKey("W", [void v] { view.panCamera(0.0, 1.0, 5.0); }, true);

Closures allow lambdas to use variables local to the function they are declared in. To implement...

DeyjaScript 11 : Enough blather; time to actually use it.

I mentioned last time that I might start integrating this scripting language with that other thing, and I did. Nothing evolves a library faster than actually using it. First, I designed the interface I wanted scripts to see. The first thing I want to use scripts...

DeyjaScript 10 : Lambdas

I started thinking, okay, I've written this thing. Now how can I actually use it? Wasn't I supposed to be making a mud engine? Yeah, well, I already don't want to anymore. Instead, I'm going to use DeyjaScript in this thing, http://www.gamedev.n...ony-build-demo/ . I'll use it to implement an in-game...

Gnome Colony Build Demo

So, I think this is finally ready to show people.

Here's a screenshot I took.

Here's something someone else made.

And here is the actual thing...!

DeyjaScript 9 : Arrays and Generics

For arrays in this language, I had two requirements. First, they had to be dynamically sized, and second, they had to be type-safe. But, when I want about trying to actually implement them, I discovered that my current implementation of the type system could handle only one or the other. I could create arrays, but like in C++, the array itself could have no...