Sae

Making some progress on the Saescript, a kind of retarded API for VN dev. I can’t figure out some of the architectural issues I haven’t thought about, but there’s thankfully a certain hack that helps me out with some of those. I’m clearly doing it wrong, but since I hardly manage to squeeze out ten lines of code per day lately, gunning for the simplest solution.

I’m using Yuno’s “actions” (animation thingies) as a core for the script – every frame is basically an action, and an action can be a block of simultaneous actions or an ordered sequence of actions – enabling some limited directing gimmicks. An action (that is not a block or a sequence) is usually either a simple affine/alpha animation or another timed event like, say, the typewriter-effect text. Theoretically it can be anything, but in practice it’s kind of difficult to use anything more than that right now. The warning signal came when I realized that I can’t quite define an action in advance because there’s nothing for it to act on at ‘compilation’ stage (I’m trying to do an API here that can be replaced with a script down the road). The character sprite, for instance, can have many states and the action can’t know in advance which one will have to be animated, that’s something only the ‘executor’ would know.

Hence, for now I’ve extended actions with a “future target” that will acquire the object only when the action has to be executed. Whoever creates the action is responsible for subclassing this FutureTarget and telling it where to look for the object. This is probably a pretty retarded hack because there’re of course more things that can only be known at runtime, such as dynamically changing animations and things like that, so I’ll probably have to resort to a dynamic action builder thing that I can’t even imagine right now. Thanks to Dart being awesome I have a cure-all “field” animation that can animate an arbitrary field – which makes a lot of things easier – but ideally I’d have to think of a solution that will be “C++”-able.

We’ll see. First things first, finishing this early prototype. I’ve written more sentences here than lines of code in Dart Editor today.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: