From: Marek Moeckel Date: Sat, 28 Jan 2006 12:17:11 +0000 (+0000) Subject: more work on intro cutscene X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2daf10aa162ca776ad8dc4e6802aae10d1ef5d83;p=supertux.git more work on intro cutscene SVN-Revision: 3038 --- diff --git a/FIXME b/FIXME index 65bd8c182..b2236ce77 100644 --- a/FIXME +++ b/FIXME @@ -3,7 +3,6 @@ This file is for small, obvious and temporary issues that are too minor to be pu Just put them here so you don't forget. --- -Tux is invisible! -Some sound effects (growup, being hit) loop endlessly +Errors in scripts crash X-Server (very annoying, please fix) Some levels don't have the music path set correctly Revert Tux to single image sprite diff --git a/data/levels/test/default.nut b/data/levels/test/default.nut index 9d335b58b..069909030 100644 --- a/data/levels/test/default.nut +++ b/data/levels/test/default.nut @@ -1,17 +1,26 @@ /* Default functions for the whole levelset */ function intro() -{ - SUPERTUX.set_action("stand-right"); +{ + //initialize + SUPERTUX.set_action("stand-right"); RADIO.set_action("quiet"); PENNY.set_action("stand-left"); + NOLOK.set_visible(false); Tux.deactivate(); Tux.set_visible(false); DisplayEffect.sixteen_to_nine(0); + + //begin scrolling sequence DisplayEffect.fade_in(2); Camera.scroll_to(0, 945, 15); - // Sound.play_music("music/intro.ogg"); - wait(16); + Sound.play("music/intro.ogg"); + wait(3); + Text.set_text("Somewhere at the shores\nof Antarctica..."); + Text.fade_in(2); + wait(3); + Text.fade_out(2); + wait(10); SUPERTUX.set_velocity(50,0); Camera.scroll_to(3100, 945, 18); wait(10); @@ -20,9 +29,76 @@ function intro() wait(5); Text.fade_out(2); wait(6); + + //begin conversation and Tux rap SUPERTUX.set_velocity(0,0); + Sound.play("speech/tux_hello.ogg"); + wait(3); + Sound.play("speech/penny_runt_01.ogg"); + wait(1); + Sound.play("speech/tux_murp_01.ogg"); + wait(1); RADIO.set_action("loud"); - wait(10); + Sound.play("speech/tux_rap.ogg"); + wait(15); + shake_bush(); + wait(2); + shake_bush(); + wait(2); + shake_bush(); + wait(1); + + //enter Nolok + NOLOK.set_velocity(-180, 600); + NOLOK.set_visible(true); + DisplayEffect.fade_out(1.5); + wait(3); + + //darkness + NOLOK.set_visible(false); + PENNY.set_visible(false); + RADIO.set_action("quiet"); + SUPERTUX.set_pos(3550, SUPERTUX.get_pos_y()); + + //wake up, Tux... + DisplayEffect.fade_in(4); + wait(4); + Sound.play("speech/tux_upset.ogg"); + wait(3); + tux_upset(); + wait(1); + tux_upset(); + wait(4); + SUPERTUX.set_action("stand-right"); + SUPERTUX.set_velocity(300,700); + wait(1); + + //end intro sequence + DisplayEffect.fade_out(2); + wait(3); Level.finish(); } +function shake_bush() +{ + //Sound.play("sounds/rustle.wav"); + local bushx = BUSH.get_pos_x(); + local bushy = BUSH.get_pos_y(); + for(local i = 0; i < 20; ++i) { + BUSH.set_pos(bushx + rand() % 6 - 3, bushy); + wait(0.05); + } +} + +function tux_upset() +{ + SUPERTUX.set_action("stand-right"); + SUPERTUX.set_velocity(200,0); + wait(0.3); + SUPERTUX.set_velocity(0,0); + wait(0.4); + SUPERTUX.set_action("stand-left"); + SUPERTUX.set_velocity(-200,0); + wait(0.3); +} + diff --git a/data/levels/test/intro2.stl b/data/levels/test/intro2.stl index 0c563ef42..c9eae7b46 100644 --- a/data/levels/test/intro2.stl +++ b/data/levels/test/intro2.stl @@ -6,7 +6,7 @@ (sector (name "main") (init-script "intro()") - (music "music/intro.ogg") + ;; (music "music/intro.ogg") (gravity 10.000000) (tilemap (layer "background") @@ -227,7 +227,16 @@ (layer 105) (visible #t) (physic-enabled #t) - (solid #f) + (solid #t) + ) + (scriptedobject + (x 3650) (y 850) + (name "NOLOK") + (sprite "images/creatures/nolok/nolok.sprite") + (layer 100) + (visible #t) + (physic-enabled #t) + (solid #t) ) ) ) diff --git a/data/speech/penny_runt_01.ogg b/data/speech/penny_runt_01.ogg new file mode 100644 index 000000000..e556763c9 Binary files /dev/null and b/data/speech/penny_runt_01.ogg differ diff --git a/data/speech/tux_hello.ogg b/data/speech/tux_hello.ogg new file mode 100644 index 000000000..b727e8cfc Binary files /dev/null and b/data/speech/tux_hello.ogg differ diff --git a/data/speech/tux_murp_01.ogg b/data/speech/tux_murp_01.ogg new file mode 100644 index 000000000..6e0c8d690 Binary files /dev/null and b/data/speech/tux_murp_01.ogg differ diff --git a/data/speech/tux_rap.ogg b/data/speech/tux_rap.ogg index 03cb17539..4e202d3b0 100644 Binary files a/data/speech/tux_rap.ogg and b/data/speech/tux_rap.ogg differ diff --git a/data/speech/tux_upset.ogg b/data/speech/tux_upset.ogg new file mode 100644 index 000000000..ee59f4aa2 Binary files /dev/null and b/data/speech/tux_upset.ogg differ