http://lemmasoft.renai.us/forums/viewtopic.php?t=1424
And it got me to thinking what it would take to implement something resembling the core of Ren'Py, that could create a flash file. Anyway, I took it up to a proof of concept. Here's the example script:
Code: Select all
class Game extends Main {
// Boilerplate required to make the game actually work.
static function main() {
var g = new Game();
g.init();
g.run(1);
}
// Variables that are used by this game.
var e : Character;
function init() {
// set the size and width of the screen.
screen_width = 800;
screen_height = 600;
// Declare the images.
image("washington", new Position(new Image("washington"), 0.5, 1.0));
image("eileen_happy", new Position(new Image("eileen_happy"), 0.5, 1.0));
image("eileen_concerned", new Position(new Image("eileen_concerned"), 0.5, 1.0));
// Declare a character.
e = new Character("Eileen",
0xe0ffe0, "dejavusans", 22,
20, 450, 760, 130,
0xffffff, "dejavusans", 22,
20, 480, 760, 130,
new Absolute(new Image("frame"), 10, 445));
}
function script(pc : Int) {
switch(pc) {
case 1:
show("washington");
show("eileen_happy");
say(e, "Welcome to the new Ren'Flash demo game.");
wait(2);
case 2:
say(e, "This is a proof of concept to show that it's possible to implement the core of the Ren'Py engine in Flash.");
wait(3);
case 3:
say(e, "I think the concept has been proved, but we still need to write a Ren'Py->Script converter.");
wait(4);
case 4:
hide("eileen_happy");
show("eileen_concerned");
say(e, "And I'm not sure if we'll get around to doing that anytime soon.");
wait(5);
case 5:
hide("eileen_concerned");
show("eileen_happy");
say(e, "Well, in any case, I hope you've enjoyed this demo!");
wait(6);
case 6:
say(e, "It took you " + flash.Lib.getTimer() + " milliseconds to play through this demo. Click to restart.");
wait(1);
}
}
}
I combined it with swfmill, and was able to build it into a working proof-of-concept.
I don't really plan to go anywhere with this, unless someone wants to hire me to do some consulting work. (And that won't come cheap.)
(Oh, and I still have never touched the flash tool.)