Saturday, November 6, 2010

Sproutcore finally functioning

So the first thing I did was check for Javascript dependency management. I've been down this road a little way before, and I know that the last thing I want to be doing is writing everything from scratch. There are probably 500 frameworks out there that want to be the last word in cool RIA development and will be patronisingly offended that all I want to do is write a pissy little engine in them. That's fine, they'll tolerate me until they get an option on a 3rd user and then I'll be out in the cold again.

I need something that's going to minify, lint check, modularize and autoinclude. I want to be able to split up my code into as many files as I need to for the logic to make sense to me, without having to go back to some big kludgy main.html includer and append into the head.

I want a framework that does that for me. If it can also bring in jQuery, Raphael, Flot, that sort of shit automagically and guarantee compatability that would be nice. Obviously I need to be pretty cross browser, right up to the point of not having HTML5 canvas to work with. Even then there are probably hackarounds. I'm honestly not looking to push it too hard. I think the bulk of my logic will be scene graph handling, which is quite similar to model stuff.

Key handling is important. No, fuck it. I'll just have a point and click interface. Not like there's a keypad on an iThingy.

So yeah, I went and fished around. JavascriptMVC, Cappucino, Sproutcore all sort of look the business. I don't care how many Desktop style widgets they ship with because I won't be using them. I do care about whether they give me a hot compiling server off the command line so that I can one click build, deploy and run. I don't want to fuck around with Windows 7 trying to server its own files locally, I want to write a little green guy walking around the screen.

My fucking god SproutCore took forever to get running.

First I made the terrible mistake of using the newest versions of everything. That 'everything', by the way is:
sproutcore
thin (these two are both gems, thin is a webserver. And how the FUCK did I end up in Rubyland? Anyway...)
devkit (some thing we apparently need to build on windows - has MinGW in it or something)
ruby

So after about two hours of trying it with ruby 1.9.2 because someone in a Sproutcore field note said it was possible on 1.9.1rc something (it wasn't), I went back to 1.9.1rc. And then 1.8.7. Each time, reinstalling all the gems and whatnot. When did I figure out that it's 5000 times faster if you don't install the fucking rdoc? At the end. Of course, at the end.

Then there was a pleasant time of me hitting localhost:4020 when it really needed to be localhost:4020/myApp, and of course it didn't say a word. Neither in server output nor in client land.

Let's hope it gets nicer. I'm optimistic. At the very least it seems to me that it's going to make a bunch of deployment stuff work more nicely than my fucked up bundles of js.

A new project! Mine, this time.

In 5 years I want to be floating in a pool of pina coladas, digging large holes in the garden for the pleasure of later filling them in and generally being incredibly obnoxious to people who have to work for a living while I explain that I don't use VB or C# because they're too mainstream and I would only ever code for the love of it now.

So here comes brand new project # 431...

Constraints:

It should give me something to think about which isn't work.
It should reinvent my old game To Catch a Thief, and put it into a context. What context? A context where I could A: Get some visibility on my funny game and B: Eventually make some money out of it. (See above, re Pina Coladas). What's a pina colada anyway? I think it involves orange juice.

I think there are a few places where money flows on the web:

1) App store
2) XBox Live
3) ITunes
4) Blog advertising

And I'm not sure about the last one. Certainly if you take the amount of money my family spends on online services they go on 3,2,1,4 in that order. And I'm not aware that I've ever clicked on a blog ad. Mostly because people who advertise on their blog always seem to me to be spammy. I'll eat those words when it seems like a good idea to me to do so. Yum!

So the problem with App Store is I don't have a mac. I also don't know Objective-C or whatever it's called that you use to develop iOS stuff.

What I want to do here is the least possible work to make my game, which should be the simplest possible game, playable by the most people.

Basically my elevator pitch:

I want to make an episodic, Sierra style game that people would play for 20 minutes at a time, on a train. The controls are simple. The timeline of the game is player instigated, which means that you can just drop it into your pocket and you won't die. You just won't do anything. It would almost be a text based adventure except that I really like my animation that I had for ShadowCat, the main character. (He's a D&D character of mine).

So why do I play this game?

I think the game narration is funny.
I like watching the main character walk around.
I'm interested in the plot.

In that order.

So here's what we don't need:

Ragdoll.
High level animation.
High detail graphics.
High fidelity timelining.
Twitch reflexes.
Multitouch.
Accelerometer.

I'm going to do it in a browser. And when I sell it on the appstore I think I'll put it in a UIWebView and STILL put it in a browser.

Why not Flash? Can't be used with the App Store. And that's where I think anybody pays money.

Now the weird thing about this is that it's going to be the opposite of my normal practices. I'm going to use a language that I'm already reasonably familiar with, I'm going to do as little engineering as possible. I am, in short, going to try very hard not to build a framework.