Tuesday, September 19, 2017

Hmm. Maybe I Should Break It.

Progress is going well on the Java Interactive Fiction (IF) game engine. I'm running into shortcomings and bugs here and there, but it's defining and running full on IF games. I have to fix a recursion error (Where I didn't drill down into objects containing objects), but that hopefully will take just a few minutes. All is well.
Soooo... Maybe I Should Break It.
Mind you, I don't want to, but I know I have to. I put thought into my choice of XML as the method to define the games. And I still think the reasoning is sound. I think it's easy to see which elements belong to others. It's quick and easy to define rooms, nest objects in them, define attributes etc. And I think it's far more readable than JSON. We are defining nested things not lists of data.
But I am getting so tired of typing tags. Although it's easy and fast to define game elements it requires a tedious amount of typing.
So I'm thinking about giving YAML a try. I'll define a room and its objects and see how readable it is. If I like the way it looks I'll create a YamlParser.java - maybe it'll sit side by side so the author has the choice between XML and YAML (Since the XML Parser is already built). I'm not sure how good Java is at parsing YAML, I've never tried it before, but if all goes well I think it will make game building much more pleasant.

No comments:

Post a Comment

From Shotcut to Kdenlive

So I've been using Shotcut for a while now, for my YouTube videos... and music videos. I love the application. Slicing clips, doing fade...