summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-21 13:21:00 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-21 13:21:00 -0400
commit5c934bd482e5d230141fc2fdb7552214baa1d674 (patch)
tree2ab626835238ed3c85820181c85e702e1ece4816
parent61aa4f941e67cf45833f1e12fe25428b3f283f74 (diff)
downloadether-5c934bd482e5d230141fc2fdb7552214baa1d674.tar.gz
ether-5c934bd482e5d230141fc2fdb7552214baa1d674.tar.bz2
ether-5c934bd482e5d230141fc2fdb7552214baa1d674.zip
finishing reading the story clears out all signs
and a sound effect plays
-rw-r--r--res/childoflight.txt10
-rw-r--r--res/fmod/.cache/{361fc1a8-d59d-457a-a127-53c15fc44ad0}.pdcbin1168 -> 1176 bytes
-rw-r--r--res/fmod/Metadata/Event/{16acdc48-a753-4b07-b57a-af0586e61c24}.xml32
-rw-r--r--src/game.cpp27
-rw-r--r--src/game.h2
5 files changed, 49 insertions, 22 deletions
diff --git a/res/childoflight.txt b/res/childoflight.txt index 72cc037..b435487 100644 --- a/res/childoflight.txt +++ b/res/childoflight.txt
@@ -1,12 +1,12 @@
1"Your life, and the lives of those who believe in you. Are you willing to put it all on the line?"\nThose words echoed in the child's head more than any other as he put his hands on the lamp. Through it, he could feel the sun's enormous presence far below him. Its power was palpable; a gentle thrumming that tickled his fingers. It was strong -- stronger and nearer than it had been with the other lamps. Up close, it felt like all there was. 1"Your life, and the lives of those who believe in you. Are you willing to put it all on the line?"\nThose words echoed in the child's head more than any other as he put his hands on the lamp. Through it, he could feel the sun's enormous presence far below him. Its power was palpable; a gentle thrumming that tickled his fingers. It was strong -- stronger and nearer than it had been with the other lamps.\nUp close, it felt like all there was.
2The lamp was light in his hands. Without a word he pulled, and light poured out. He closed his eyes and all he saw was light. 2The lamp was light in his hands. Without a word he pulled, and light poured out. He closed his eyes and all he saw was light.
3The child was nowhere when he awoke. Bright, white emptiness stretched out in all directions. He gulped as he looked around, and felt that emptiness resonate in his chest.\n"Hello?" he called out. No one answered. 3The child was nowhere when he awoke. Bright, white emptiness stretched out in all directions. He gulped as he looked around, and felt that emptiness resonate in his chest.\n"Hello?" he called out. No one answered.
4Trembling, the child pushed himself to his feet. He'd been through countless battles, been spat on by people he used to trust, and even took down the immortal ruler of the world. He told himself he could handle whatever this was.\nHe hadn't had to do those things by himself, though. 4Trembling, the child pushed himself to his feet. He'd been through countless battles, been spat on by people he used to trust, and even took down the immortal ruler of the world. He told himself he could handle whatever this was.\nThe only difference was that now he had to do them alone.
5The child took a step. His bare foot thudded against an invisible ground. When nothing further happened, he kept going. "Choose a direction and just walk," he thought. There was nothing else to do.\n"Is anyone out there?" 5The child took a step. His bare foot thudded against an invisible ground. When nothing further happened, he kept going. "Choose a direction and just walk," he thought. There was nothing else to do.\n"Is anyone out there?"
6The child's steps turned inside out. The ground flipped over and curved in on itself. He saw figures in the distance but when he approached he realized it was himself he was seeing. He felt a headache start to come on, and it only grew when something finally did appear.\nA black spiral, twisting out from beneath him. He climbed and climbed, and his feet hurt and his chest ached and his arms twisted but it wasn't enough to take him down. Somehow he felt like nothing would ever be able to stop him again. One foot after another he climbed and watched the matter splay out before him. This thing he'd found, it was immense. It was infinite.\nIt was the Sun. 6The child's steps turned inside out. The ground flipped over and curved in on itself. He felt a headache start to come on, and it only grew when something finally did appear.\nA black spiral, twisting out from beneath him. He climbed and climbed, and his feet hurt and his chest ached and his arms curled. Yet he still continued. Somehow he felt like nothing would ever be able to stop him again.\nOne foot after another he climbed and watched the matter splay out before him. This thing he'd found, it was immense. It was infinite.\nIt was the Sun.
7"Pure hearted one," the Sun said without saying, not a roaring voice but a subtle understanding planted in the child's mind. "We meet at last."\nThe child gulped. Throughout all that time searching for and lighting the lamps, he hadn't considered what would actually happen if he won. But now here he was, facing infinity itself, and it dawned on him the Sun had probably been sealed away for a good reason.\nWould saving the world be worth the consequences? 7"Pure hearted one," the Sun said without saying, not a roaring voice but a subtle understanding planted in the child's mind. "We meet at last."\nThe child gulped. Throughout all that time searching for and lighting the lamps, he hadn't considered what would actually happen if he won. But now here he was, facing infinity itself, and it dawned on him the Sun had probably been sealed away for a good reason.\nWould saving the world be worth the consequences?
8"H-hello?" the child stammered. It came out as nothing more than a squeak, but a shift in the Sun's surface -- starry as the night sky -- told him that it heard.\nIt spoke: "For thousands of years I have slept here, ever since the world grew past the need for my power."\nAn eye -- incomprehensibly large -- regarded the boy who'd raised it from its slumber. An eye which had seen countless things: births, deaths, loves, wars. A being who'd caused so many of them, and had to be shut away to contain its limitless power. A power that was once again free. 8"H-hello?" the child stammered. It came out as nothing more than a squeak, but a shift in the Sun's surface told him that it heard.\nIt spoke: "For thousands of years I have slept here, ever since the world grew past the need for my power."\nAn eye -- incomprehensibly large -- regarded the boy who'd raised it from its slumber. An eye which had seen countless things: births, deaths, loves, wars. A being who'd caused so many of them, and had to be shut away to contain its limitless power. A power that was once again free.
9The child took a deep breath. "I'm sorry I woke you up," he said, voice wobbling like a teeter totter. "I had to light the lamps to stop someone else from doing it. He wanted to end the world. But I want to save it."\nThat deep, immaterial voice continued: "I've seen visions in my dreams of your world crumbling. I've felt your despair. I've heard your cries for help. I've seen your strength, clear as day, in the pieces of your heart that you shared." 9The child took a deep breath. "I'm sorry I woke you up," he said, voice wobbling like a teeter totter. "I had to light the lamps to stop someone else from doing it. He wanted to end the world. But I want to save it."\nThat deep, immaterial voice continued: "I've seen visions in my dreams of your world crumbling. I've felt your despair. I've heard your cries for help. I've seen your strength, clear as day, in the pieces of your heart that you shared."
10The child saw himself reflected in that eye. Saw his feet lift off the ground, pulled by some invisible force. Saw the sparks of magic flying around his hands, felt his being churning out of control as something dark, something horrible, something unfathomably ancient poured into his mind, squeezing and pulling it like taffy, tearing it apart and putting it back together.\n"Now my power is needed once again," the Sun said. "As you have shared with me, I will share it in return." 10The child saw himself reflected in that eye. He saw his feet lift off the ground, pulled by some invisible force. He saw the sparks of magic flying around his hands, felt his being churning out of control as something dark, something horrible, something unfathomably ancient poured into his mind, squeezing and pulling it like taffy, tearing it apart and putting it back together.\n"Now my power is needed once again," the Sun said. "As you have shared with me, I will share it in return."
11The child tried to ask what that meant, but his throat squeezed tight and choked the words to death. Sweat poured from his brow as the worst fever he'd ever felt took hold. His head was being thrust beneath the surface of the water, his torso was being struck by lightning from a machine.\nThe Sun watched him float there, writhing and sweating and sparking with violent electricity. It closed its eye.\n"I promise you that I will not miss it." 11The child tried to ask what that meant, but his throat squeezed tight and choked the words to death. Sweat poured from his brow as the worst fever he'd ever felt took hold. His head was being thrust beneath the surface of the water, his torso was being struck by lightning from a machine.\nThe Sun watched him float there, writhing and sweating and sparking with violent electricity. It closed its eye.\n"I promise you that I will not miss it."
12The thrumming from before was inside of him now. The Sun's heartbeat was gone -- it was his own. The child opened his mouth to scream, and what came out was light. \ No newline at end of file 12The thrumming from before was inside of him now. The Sun's heartbeat was gone -- it was his own. The child opened his mouth to scream, and what came out was light. \ No newline at end of file
diff --git a/res/fmod/.cache/{361fc1a8-d59d-457a-a127-53c15fc44ad0}.pdc b/res/fmod/.cache/{361fc1a8-d59d-457a-a127-53c15fc44ad0}.pdc index 45c8cb1..526e077 100644 --- a/res/fmod/.cache/{361fc1a8-d59d-457a-a127-53c15fc44ad0}.pdc +++ b/res/fmod/.cache/{361fc1a8-d59d-457a-a127-53c15fc44ad0}.pdc
Binary files differ
diff --git a/res/fmod/Metadata/Event/{16acdc48-a753-4b07-b57a-af0586e61c24}.xml b/res/fmod/Metadata/Event/{16acdc48-a753-4b07-b57a-af0586e61c24}.xml index 78ae302..88a9645 100644 --- a/res/fmod/Metadata/Event/{16acdc48-a753-4b07-b57a-af0586e61c24}.xml +++ b/res/fmod/Metadata/Event/{16acdc48-a753-4b07-b57a-af0586e61c24}.xml
@@ -41,9 +41,6 @@
41 </relationship> 41 </relationship>
42 </object> 42 </object>
43 <object class="MasterTrack" id="{a7a5cfe4-2dbc-47f7-b8fe-983bc8ec1345}"> 43 <object class="MasterTrack" id="{a7a5cfe4-2dbc-47f7-b8fe-983bc8ec1345}">
44 <property name="uiTrackHeight">
45 <value>28</value>
46 </property>
47 <relationship name="mixerGroup"> 44 <relationship name="mixerGroup">
48 <destination>{efdf83a4-38c7-4808-ab1f-968e93dbe51d}</destination> 45 <destination>{efdf83a4-38c7-4808-ab1f-968e93dbe51d}</destination>
49 </relationship> 46 </relationship>
@@ -60,15 +57,8 @@
60 </relationship> 57 </relationship>
61 </object> 58 </object>
62 <object class="EventAutomatableProperties" id="{8f26f5d5-c667-43db-9408-0a3025dc34ff}" /> 59 <object class="EventAutomatableProperties" id="{8f26f5d5-c667-43db-9408-0a3025dc34ff}" />
63 <object class="MarkerTrack" id="{786e0b59-c8f6-49dd-b8d5-ebafba6e3103}"> 60 <object class="MarkerTrack" id="{786e0b59-c8f6-49dd-b8d5-ebafba6e3103}" />
64 <property name="uiTrackHeight">
65 <value>100</value>
66 </property>
67 </object>
68 <object class="GroupTrack" id="{03ba2f27-4015-4304-8be4-4a63cda75629}"> 61 <object class="GroupTrack" id="{03ba2f27-4015-4304-8be4-4a63cda75629}">
69 <property name="uiTrackHeight">
70 <value>100</value>
71 </property>
72 <relationship name="modules"> 62 <relationship name="modules">
73 <destination>{a073688a-03a0-4123-898f-98a2b374a325}</destination> 63 <destination>{a073688a-03a0-4123-898f-98a2b374a325}</destination>
74 </relationship> 64 </relationship>
@@ -124,6 +114,8 @@
124 <relationship name="effects"> 114 <relationship name="effects">
125 <destination>{2eb2f085-cc81-4c44-9e4a-08287453b502}</destination> 115 <destination>{2eb2f085-cc81-4c44-9e4a-08287453b502}</destination>
126 <destination>{8d39c25d-1398-4756-872e-82b19367ef4c}</destination> 116 <destination>{8d39c25d-1398-4756-872e-82b19367ef4c}</destination>
117 <destination>{23e79ceb-beea-49bf-abe0-6e6dd5277c91}</destination>
118 <destination>{5dba1a2f-1043-4281-975a-0cf58bae2d90}</destination>
127 </relationship> 119 </relationship>
128 </object> 120 </object>
129 <object class="MixerBusPanner" id="{43f6e73d-d194-473e-9c23-a11ca6f39d20}" /> 121 <object class="MixerBusPanner" id="{43f6e73d-d194-473e-9c23-a11ca6f39d20}" />
@@ -136,5 +128,21 @@
136 <object class="MixerBusPanner" id="{dfce3079-8628-4d24-8bd8-db24ab4953c4}" /> 128 <object class="MixerBusPanner" id="{dfce3079-8628-4d24-8bd8-db24ab4953c4}" />
137 <object class="MixerBusFader" id="{2eb2f085-cc81-4c44-9e4a-08287453b502}" /> 129 <object class="MixerBusFader" id="{2eb2f085-cc81-4c44-9e4a-08287453b502}" />
138 <object class="SpatialiserEffect" id="{8d39c25d-1398-4756-872e-82b19367ef4c}" /> 130 <object class="SpatialiserEffect" id="{8d39c25d-1398-4756-872e-82b19367ef4c}" />
131 <object class="DelayEffect" id="{23e79ceb-beea-49bf-abe0-6e6dd5277c91}">
132 <property name="delay">
133 <value>120</value>
134 </property>
135 </object>
136 <object class="SFXReverbEffect" id="{5dba1a2f-1043-4281-975a-0cf58bae2d90}">
137 <property name="decayTime">
138 <value>3500</value>
139 </property>
140 <property name="earlyDelay">
141 <value>68</value>
142 </property>
143 <property name="lateDelay">
144 <value>35</value>
145 </property>
146 </object>
139 <object class="MixerBusFader" id="{086f10eb-52a5-42bc-88e5-58c78026364c}" /> 147 <object class="MixerBusFader" id="{086f10eb-52a5-42bc-88e5-58c78026364c}" />
140</objects> \ No newline at end of file 148</objects>
diff --git a/src/game.cpp b/src/game.cpp index d63c208..edc1605 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -353,7 +353,7 @@ void Game::recalculateRender() {
353 map.at(x,y).dirtyRender = false; 353 map.at(x,y).dirtyRender = false;
354 354
355 if (map.tile(x,y) == Tile::Floor && (!map.at(x,y).lit || !map.at(x,y).wasLit)) { 355 if (map.tile(x,y) == Tile::Floor && (!map.at(x,y).lit || !map.at(x,y).wasLit)) {
356 int renderDesc = 0; 356 /*int renderDesc = 0;
357 if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7); 357 if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7);
358 if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6); 358 if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6);
359 if (isTileSetOrNotLit(map, x+1, y-1)) renderDesc |= (1 << 5); 359 if (isTileSetOrNotLit(map, x+1, y-1)) renderDesc |= (1 << 5);
@@ -361,9 +361,9 @@ void Game::recalculateRender() {
361 if (isTileSetOrNotLit(map, x+1, y+1)) renderDesc |= (1 << 3); 361 if (isTileSetOrNotLit(map, x+1, y+1)) renderDesc |= (1 << 3);
362 if (isTileSetOrNotLit(map, x , y+1)) renderDesc |= (1 << 2); 362 if (isTileSetOrNotLit(map, x , y+1)) renderDesc |= (1 << 2);
363 if (isTileSetOrNotLit(map, x-1, y+1)) renderDesc |= (1 << 1); 363 if (isTileSetOrNotLit(map, x-1, y+1)) renderDesc |= (1 << 1);
364 if (isTileSetOrNotLit(map, x-1, y )) renderDesc |= (1 << 0); 364 if (isTileSetOrNotLit(map, x-1, y )) renderDesc |= (1 << 0);*/
365 365
366 if (/*renderDesc == 0 && */map.at(x,y).sign) { 366 if (/*renderDesc == 0 && */map.at(x,y).sign && !storyDone) {
367 map.at(x,y).renderId = TilesetIndex(24, 13); 367 map.at(x,y).renderId = TilesetIndex(24, 13);
368 } else if (std::bernoulli_distribution(0.05)(rng)) { 368 } else if (std::bernoulli_distribution(0.05)(rng)) {
369 static const std::vector<int> furnishings { 369 static const std::vector<int> furnishings {
@@ -373,7 +373,7 @@ void Game::recalculateRender() {
373 TilesetIndex(21, 3), 373 TilesetIndex(21, 3),
374 TilesetIndex(22, 3)}; 374 TilesetIndex(22, 3)};
375 375
376 if (/*renderDesc == 0 &&*/ !(x == player_x && y == player_y) && std::bernoulli_distribution(0.005)(rng)) { 376 if (/*renderDesc == 0 &&*/ !storyDone && !(x == player_x && y == player_y) && std::bernoulli_distribution(0.005)(rng)) {
377 map.at(x,y).renderId = TilesetIndex(24, 13); 377 map.at(x,y).renderId = TilesetIndex(24, 13);
378 map.at(x,y).sign = true; 378 map.at(x,y).sign = true;
379 } else { 379 } else {
@@ -385,6 +385,8 @@ void Game::recalculateRender() {
385 map.at(x,y).renderId = -1; 385 map.at(x,y).renderId = -1;
386 } 386 }
387 } else if (map.tile(x,y) == Tile::Wall) { 387 } else if (map.tile(x,y) == Tile::Wall) {
388 map.at(x,y).sign = false;
389
388 static bool initWalls = false; 390 static bool initWalls = false;
389 static std::vector<int> wallRenders(256, TilesetIndex(21, 12)); 391 static std::vector<int> wallRenders(256, TilesetIndex(21, 12));
390 if (!initWalls) { 392 if (!initWalls) {
@@ -477,6 +479,7 @@ void Game::recalculateRender() {
477 } 479 }
478 } else { 480 } else {
479 map.at(x,y).renderId = -1; 481 map.at(x,y).renderId = -1;
482 map.at(x,y).sign = false;
480 } 483 }
481 } 484 }
482 } 485 }
@@ -783,7 +786,7 @@ void Game::updatePlaying(size_t frameTime) {
783 if (lookTile.text.empty()) { 786 if (lookTile.text.empty()) {
784 int lineToRead = nextSignIndex++; 787 int lineToRead = nextSignIndex++;
785 if (nextSignIndex >= signTexts.size()) { 788 if (nextSignIndex >= signTexts.size()) {
786 nextSignIndex = 0; 789 storyDone = true;
787 } 790 }
788 lookTile.text = signTexts[lineToRead]; 791 lookTile.text = signTexts[lineToRead];
789 } 792 }
@@ -1098,6 +1101,20 @@ void Game::update(size_t frameTime) {
1098 menu.update(frameTime, *this); 1101 menu.update(frameTime, *this);
1099 } else if (sign.signDisplayState != SignInstructionState::Hidden) { 1102 } else if (sign.signDisplayState != SignInstructionState::Hidden) {
1100 sign.update(frameTime, *this); 1103 sign.update(frameTime, *this);
1104
1105 if (!clearedSigns && storyDone && sign.signDisplayState == SignInstructionState::FadingOut) {
1106 for (int y = map.getTop(); y < map.getBottom(); y++) {
1107 for (int x = map.getLeft(); x < map.getRight(); x++) {
1108 if (map.at(x,y).sign) {
1109 map.at(x,y).sign = false;
1110 map.at(x,y).renderId = -1;
1111 }
1112 }
1113 }
1114
1115 muxer.playSound("dash");
1116 clearedSigns = true;
1117 }
1101 } else { 1118 } else {
1102 updatePlaying(frameTime); 1119 updatePlaying(frameTime);
1103 } 1120 }
diff --git a/src/game.h b/src/game.h index 5bdc245..ae5f157 100644 --- a/src/game.h +++ b/src/game.h
@@ -125,9 +125,11 @@ public:
125 125
126 std::vector<std::string> signTexts; 126 std::vector<std::string> signTexts;
127 int nextSignIndex = 0; 127 int nextSignIndex = 0;
128 bool storyDone = false;
128 SignInstructionState signInstructionState = SignInstructionState::Hidden; 129 SignInstructionState signInstructionState = SignInstructionState::Hidden;
129 Interpolation signFade; 130 Interpolation signFade;
130 Sign sign; 131 Sign sign;
132 bool clearedSigns = false;
131 133
132 Menu menu; 134 Menu menu;
133 135