Getting started with Undum?

I’ve downloaded Undum to try to do something for the Indigo SpeedIF (though I think I’ll probably miss the deadline), and I’m finding the documentation kind of opaque on basic questions.

Starting with the very basic: How do I edit an Undum game? Do I just open tutorial.game.en.js in a text editor and hack away? Do tab stops matter?

Also – assuming that I’m ever ready to release a game, how do I do it? What files do I need to package together?

The documentation mentions a .js file and an HTML file. When I open the HTML file that was included with the game, it just starts the game up. How do I edit it?

Also, what’s all this stuff talking about? Where does it go?

I sort of get the impression that the documentation is designed for people who have the slightest little clue about javascript, which is not me.

My impression is that Undum does require a lot of developer knowledge. However, I know Jon Ingold has made some tools to help create Undum content, and this post suggests that some of those tools are already published and more may be forthcoming.

Oh dear. That seems to make it very unlikely that I will make the deadline. Well, I can always release it some day as an annex to the SpeedIF. Speed-limit IF or something.

I think I’m actually OK with encasing my text in HTML tags, which is what that link of Jon’s seems to help with.My project would involve lots of different colored text anyway, so I’d have to go into HTML for that, I think.

What looked promising to me there was that it sounded as though he also does have (though may not have released) a thing that turns script files into whatever javascript format Undum needs. If you’re interested, maybe email him? (Then again, speed-IF completed after the deadline has a long and honorable tradition of its own.)

I took a look at it a few days ago. Lacking other tools, yeah, you have to edit the tutorial files, see what they’re doing, and change them. In a text editor. You’ll have to know HTML, and enough Javascript to imitate some code.

The files in question: games/tutorial.en.html , games/media/games/tutorial/tutorial.game.en.js

Those both look like good options – I mean, I think I’ll e-mail Jon eventually, and also complete this after the deadline, maybe in 2012. I can’t even figure out how to open the HTML file in a text editor (the file opens, but it looks like the opening screen of the tutorial game instead of showing me the HTML tags). Also, it’s the end of the term.

I’m doing okay, and my Javascript is both rudimentary and much-decayed; it is, at least, pretty easy to make it function as a vanilla CYOA – which ignores most of the stuff that makes Undum attractive, but it’s something. (It is very persnickety about typing everything just so, though, so Jon’s extension should be highly useful.)

Matt: what text editor are you using?

TextEdit, on the Mac, and I just got it to work. (For posterity: Turn on “Ignore rich text commands in HTML files” in the Open and Save tab of the preferences. Opening it with the rich text commands on and converting to plain text doesn’t work.) This means I’ll probably finish sooner than I’d thought, though the deadline is right out.

If your Javascript is rudimentary and decayed, that means you’ve forgotten more of it than I know. (For instance.)

…I don’t need to understand CSS if I don’t want to modify the default look (besides the font color), do I?

Not in the slightest. An HTML font tag will do the trick.

Somewhere a web developer is coughing up blood.

MY WORK HERE IS DONE

To chip in on this: I found writing for Undum absolutely horrible until I made a tool, because JS is a language full of punctuation and with a very slow test/debug cycle. (The HTML tag thing I released earlier is because, if you get your tags wrong, that bit of content disappears silently. If you can live with that, great, but I couldn’t.)

For the games I’ve written I’ve used a perl script to turn a plain-text format into the .game.js file.

The perl script will get a release soon, once I’ve documented it properly. It’s grown to be pretty powerful, so that’s taking longer than I’d hoped. Also, it requires some changes to the undum.js file where I’ve added features, so I need to tidy that up too.

Anyway, once done, you release by copying the entire file-structure from Undum down to a server or something, and make your games main .html page by copying the example and changing the .game.js file it points to.

For authoring on a Mac I can’t rave enough about TextWrangler, which is free, does syntax colouring for js (especially helpful if you’re writing it straight), as well as html and perl and others, and it can run a perl script on a keypress (Apple-R). Perl script + TextWrangler = IDE.

I think Undum is fantastic, and it’s opened a lot of creative doors for me. I think it’s well worth a hike up the learning curve for. :wink:

Are you using something like Firebug? It makes designing CSS, and even JS, a lot easier and friendlier.

Aside: I’m always surprised about how many IF people use Perl! It’s always felt like an archaic user-unfriendly language to me. Where’s the Python-love?

Thanks for the tips! I guess I’ll give Firebug and TextWrangler a look. This has definitely moved into the “start working on sometime after the end of the term” pile, though.

And the next time someone complains about I7’s learning curve I will laugh.

I will be curious to see this. I too felt like Undum-plus-a-tool would be a complete system.

(Until then, use Firebug. Or whatever tool makes your browser’s javascript error log visible. That’s how you see those wrong-tags-and-my-content-disappeared errors.)

+1.

I have a blog hosted at WordPress.com right now. I’ve been thinking of giving Undum a spin. WordPress.com doesn’t allow me to upload custom JavaScript files, or to embed JavaScript in my pages. So my question is, where would be the best place to host my Undum projects, given that that’s pretty much the only reason I want webhosting for now?

P.S. The only reason I mention my WordPress.com blog is that I might want to migrate the blog if I set up a web site elsewhere.