Ace Attorney Online has expressions!?

I am officially impressed. I have not been that up to date with AAO. I’ve played a few games here and there, but I was too focused on my own engine to really pay attention to how other great developers have approached this domain. I knew that AAO was basically an editor, and that it used javascript somehow to play the cases. But I didn’t realize how advanced it really is. It would be a mistake to write it off just because it is focused on an editor instead of having a full scripting language.

Anyway, the feature that kind of floored me today, is one of the last features I have to implement in order to convert games from AAO to PyWright with 99% accuracy. (I say 99%, as that last 1% of compatibility may or may not be there – it’s hard to know without testing every single AAO game in existence) This feature is expressions. Expressions in AAO allow a developer to have almost a mini scripting engine, interacting with variables and doing math on them. You can increment variables with “set x = x + 1″, you can do booleans with & and |, and you can do very complex math such as the “%” operator. It also follows the general order of operations like most programming languages with expressions engines do. Not what I expected from an easy-to-use, true casemaker.

PyWright has no expression engine.This doesn’t prevent developers from doing mathematics or accomplishing the same goals that you would use an expression for in AAO. Sometimes it will take several operations in PyWright instead of just one. For example:

x = (x + 1) * 12

could be translated as

addvar x 1
mulvar x 12

It takes more steps, but this kind of math is generally not that useful in this style of game. It is important for creating custom code, making animation work in a different way, or showing some specified interface. But when I am writing this stuff I don’t miss expressions that much.

However, to convert from AAO, it can’t be avoided. So the thing to decide, is how to automatically do the above conversion. I also have to choose whether to integrate the expression solver into PyWright itself, or do the translation in the converter. Most likely it will go in the converter, however I don’t think it’s crazy to think that expressions will be a standard language feature at some point. The reason I avoided it was out of simplicity, but even the most “simple” casemaker seems to have it!

Anyway, this is not a trivial task, so it is going to delay AAO -> PyWright a bit more.

2 Responses to “Ace Attorney Online has expressions!?”

  1. Tap says:

    You may wish to have a look at the following links to refresh yourself with AAO.

    http://aceattorney.sparklin.org/forum/viewtopic.php?f=28&t=1298 (Check this one first)
    http://webcodereference.co.cc/stuff/help.html (Check this one last)

  2. saluk says:

    In fact that first link is already in a permanent firefox tab :)

    Second link helps a lot too, thanks.

Leave a Reply

You must be logged in to post a comment.