Wednesday, November 11, 2009

Lost in a Sea of Ideas

The following is a repost as the original got spammed with junk comments and Blogger dosn't have an easy way to remove large numbers of comments in one hit without dropping the entire post.

I have found myself lost in a sea of new concepts lately. Firstly I read Andrew Poltkin's presentation on Rule based systems in Interactive Fiction. I have to say it was discouraging in terms of the RPG I was writing. Short point being that This is harder then you think it is.

Then I came across the following article (PDF). Which is an interesting read. And raises a point that I missed the last time I saw it. Namely stop treating JavaScript as it it was a class based language with awkward syntax.

The thing is that It is a prototype based language with two kinds of links, and a couple of missing functions. The big problem with learning to write JavaScript properly is that most tutorials make this mistake, And their is a lot of truly awful JavaScript code samples out their.

I don't really have any new insights on prototype based inheritance (yet), so if your interested have a look at Douglas Crockford's JavaScript site. I won't pretend that I get everything Douglas is getting at but I'm convinced that he understands it and that this is a good place to start hacking.

So where does this leave my project?

Up in the air a little. As I'm determined to do it right as it where. And need to teach myself how to operate effectively in a prototype based language. I'm pretty well sold that a rule based approach might be the best thing I can do. I encountered this when I tried to add conditional logic to my RPG, My conditional tests required inimate knowledge of how the engine stores its data, which seemed way to coupled. What I seemed to need was a simpler data organisation. I can't think of anything simpler then a flat database of facts, and that sounds pretty rule based. So Murphy's law is in full swing and I'm going back to the drawing board. Just as soon as I've learnt some new tricks

No comments: