6 Waves
Four rocks drift and break, and then the field is empty for good. By the end of this chapter, the field comes back. WAVE 1 shows in the middle of the screen, and the rocks appear near the edges. Clear them all. The next wave arrives with more rocks, moving a little faster, in a new material.
The game as it is at the end of this chapter. Click the game to play.
If your game and this chapter part ways, here is the chapter’s finished project. Open it and compare, or start Chapter 7 from it.
To open it, right-click the downloaded file, choose Extract All... and then Extract. Start Myth Engine, choose File › Open Project... and pick the .mythproj file in the new folder. Beside it, OFL.txt is the license of the project’s font, Press Start 2P.
6.1 The Idea
The last small rock cracks apart, and the field is empty.
Three notes climb, one after another. That’s Sector Clear, with Hyper’s quick rising whistle under the first. For a moment, nothing moves but your Ship. Then two words light up in the middle of the screen, WAVE 2, and hang there for a breath. They go out, and six rocks are already there, drifting near the edges. Their cracks glow cyan this time. They’re moving a little faster, too.
That’s a wave: one field of rocks, from the moment it’s announced to the moment the last rock breaks. The pause between two waves is the sector jump. In Chapter 11 the whole sky will surge forward during it, but for now it’s the two sounds and a short quiet.
Right now your game has one field, placed by hand. Once it’s gone, it’s gone. A field that comes back needs someone to watch for the last rock. That’s Game Rules again. It got the lives in Chapter 5, and now it gets the waves.
Watching for the last rock sounds like counting. But nothing in this chapter counts rocks. Myth has an Event for the moment the last one is gone, No Instances Left. Think of the last person out of a room switching off the light. Nobody keeps a count at the door. The room knows when it’s empty.
The chapter also makes the game’s first Data Table, a list of six rock materials that take turns, one wave after another.
6.2 The Plan
Here’s how the pieces work together, read from left to right.
- The game starts -> Waves sets
$waveto 0 and announces nextWave to the whole game. - The message nextWave arrives -> Waves adds 1 to
$wave, shows the wave’s number on the Wave Banner, and starts a timer. - The timer rings -> the banner goes, and Create Asteroids Along Edges brings in the Large Asteroids.
- Each new Asteroid appears -> Asteroid Material gives it this wave’s picture, and Asteroid Drift makes it a little faster than last wave’s.
- The last Asteroid is destroyed -> Waves plays Sector Clear and Hyper, and starts the sector jump’s timer.
- That timer rings -> Waves announces nextWave again, and the next wave begins.
6.3 Set Up
This chapter needs five new pictures from the Starter Kit, one sound and one Global Variable. The pictures are the other five rock materials: Brittle, Crystal, Dense, Metal and Volatile. Asteroid Standard has been in use since Chapter 4. The sound is Sector Clear, the three notes that climb when a field is cleared.
Make wave the way you made lives, with the + on Ship Gun’s Globals card and New Global…. It’s a Number, and its Default stays at 0.
A Loading Group is a set of assets the game gets ready before it starts. This one holds all six rock pictures. A new wave changes every rock’s picture at the moment it appears, so each picture should be ready by then.
Its line has the longest path in the book, so here it is a step at a time. Open Game Settings and choose Publish in the list on the left. Output is a section of that page. Inside it, Memory and Loading is a fold that starts closed, so click its name. Loading Groups is the last thing in it, with an Add Loading Group button.
The last name on the card’s path, Asteroid Materials, is the group you’re about to make, not one to find. Press Add Loading Group. A fold named Loading Group 1 appears. Open it and type Asteroid Materials into its Name. Turn on its switch, Prepare Before the Start Scene, too.
Last, the pictures. Each one is picked from the list that starts Add Scene, Object or Asset…, and each pick adds a line to the group. If the fold closes as you go, click its name. When it’s right, the group holds six lines, from sprite: Asteroid Standard to sprite: Asteroid Volatile, and its switch is on.
The Data Table you’ll make later shares the name Asteroid Materials. That’s on purpose, and it’s harmless. One is a setting and the other a resource, and the formulas in this chapter only ever read the table.
Leave PLACE THESE and REMOVE THESE PLACEMENTS for now. Each waits for its moment. The Wave Banner goes into Space as soon as you’ve made it, and the four rocks from Chapter 4 come out once Waves can bring its own.
Asteroid MaterialsOnsprite: Asteroid Standard, sprite: Asteroid Brittle, sprite: Asteroid Crystal, sprite: Asteroid Dense, sprite: Asteroid Metal, sprite: Asteroid Volatile6.5 Rocks From the Edges
Now the game learns where a wave’s rocks come from.
6.5.1 Create Asteroids Along Edges
Picture a band along each edge of the screen, like the frame around a picture. A wave’s rocks appear only in that frame. The top and bottom bands are edgeBand deep, 3.438 meters, and the sides sideBand, 4.688 meters. Each is about a seventh of the screen. The middle stays clear for the Ship. Park it near an edge as a wave arrives, though, and a rock can appear right on top of it. That’s the game’s own rule, not a slip in your build.
It has two Repeats, each perBand times. The first places rocks along the top and bottom. Each time round, it picks a spot along the edge, a depth into the band, and a coin toss, edgeRoll. Generate Random Integer gives 0 or 1, since it includes both ends.
An If reads the coin. On 0, the rock goes in the bottom band, near Y 0. Otherwise it goes in the top band, counted down from $areaHeight, the field’s height, the Global from Chapter 3. The second Repeat does the same for the left and right sides, with a coin of its own, sideRoll.
Each Create Instance names creator in its Applies To. A Function has no Object of its own, so it can’t make anything by itself. The Object that calls it hands itself over as creator, and the rocks are made through that Object.
Creates perBand Asteroids in bands along the top and bottom edges and as many along the left and right edges.
perBandtimes- Action Name
acrossX- Maximum
$areaWidth
- Action Name
depthIntoEdgeBand- Maximum
edgeBand
- Action Name
edgeRoll- Maximum
1
edgeRoll.value == 0- Applies To
creator- Object to Create
asteroid- X
acrossX.value- Y
depthIntoEdgeBand.value- Created As
bottomAsteroid
- Applies To
creator- Object to Create
asteroid- X
acrossX.value- Y
$areaHeight - depthIntoEdgeBand.value- Created As
topAsteroid
perBandtimes- Action Name
upY- Maximum
$areaHeight
- Action Name
depthIntoSideBand- Maximum
sideBand
- Action Name
sideRoll- Maximum
1
sideRoll.value == 0- Applies To
creator- Object to Create
asteroid- X
depthIntoSideBand.value- Y
upY.value- Created As
leftAsteroid
- Applies To
creator- Object to Create
asteroid- X
$areaWidth - depthIntoSideBand.value- Y
upY.value- Created As
rightAsteroid
Make it with Add > Function. It’s the game’s second Function, after Show Life Icon. Its PARAMETERS go on its Start block, with the + beside Parameters, as icon and slot did. The first two hold Objects. For each, pick the Object near the very end of the Type list. Three Numbers follow. Each gets the card’s Starts at as its Default.
Almost every Action here sits inside something, so where you click decides where a block goes. The passage on If, Else and Repeat has each of these clicks.
The first Repeat goes in from a right-click on Start, with Add unattached Action here, and joins the line with Connect to sequence. Its Count is the box on the block. Type perBand there. Right-click the Repeat and choose Add inside Repeat for each Action of its panel, the If too. Join each one with Connect to sequence. The If’s condition is its one box, edgeRoll.value == 0.
Create Instance goes on the If’s True line, with Add inside Then. Its Applies To starts on Self. A Function has no Object of its own, so pick creator, under Object Parameters. Object to Create starts on Choose an Object Parameter. Pick asteroid. Now right-click the If and choose Add Else, and give the Else its own Create Instance with Add inside Else. It starts the same way, so pick creator and asteroid again. Position Relative To stays on World in both.
Nothing reads bottomAsteroid, topAsteroid, leftAsteroid or rightAsteroid, the names in Created As. Type them anyway.
The second Repeat goes on Start’s own line, below the first. Add it from the Action List, and Connect to sequence puts it at the end of that line. Build it the same way as the first, panel by panel.
Nothing calls the Function yet. Waves will, in a moment.
6.6 The Circle of Waves
This part is the chapter’s one hard idea, so take it slowly. It’s a circle: announce, bring the rocks, wait for an empty field, jump, and announce again.
6.6.1 Waves
Waves goes on Game Rules, beside Lives and Respawn, and its five Events together make the circle.
It starts at Game Start, where $wave goes to 0. Then Trigger Custom Event announces nextWave to the whole game. It’s the same Action Ship Crash uses to send shipDestroyed in Chapter 5, not Trigger Custom Event on Object.
Why tell everyone, when only Waves itself listens? A new wave is news. In Chapter 11 the sky will hear it too, and ease out of its surge as the next wave begins.
Why not start the wave right there, at Game Start? Two different moments start a wave: the game beginning, and a sector jump ending. Both send the same message. So a wave always begins in one place, the nextWave Event.
When nextWave arrives, the wave’s number goes up by one, and the banner lights up to show it. Then Waves waits. Its timer, bannerTime, rings once after 1.6 seconds, time enough to read two words.
When it rings, the banner goes, and Waves works out how many rocks each pair of bands gets, perBandThisWave. It’s a value for this one moment, made by Declare Variable and gone when the Event is done. It’s $wave + 1, but an If keeps it from going past maxAsteroidsPerBand, 6. Wave 1 gets two rocks shared between the top and bottom bands, and two between the sides. That’s four in all. Wave 5 gets six and six, and so does every wave after it.
Then Waves calls Create Asteroids Along Edges. It hands over self as creator. Here, self means Game Rules, the Object Waves is attached to, and the rocks are made through it. It also hands over its own edgeBand and sideBand. They hold the same numbers as the Function’s, but the call sends Waves’ own. So to change the bands, you’d change them here.
Now the rocks drift and break, and Waves does nothing at all. It waits for one moment, No Instances Left.
What about the start of a wave, when the field is empty before any rock is out? That doesn’t count. No Instances Left runs only when a rock is destroyed and it was the last one. The light goes off as the last person leaves, not while a room waits for its first.
Remember the Tag from Chapter 4? All three sizes wear Asteroid. So No Instances Left on the Tag Asteroid waits for the last rock of any size. A Large that breaks leaves two Medium behind. The field isn’t empty yet. Only when the last Small is gone does the Event run.
Sector Clear and Hyper play together. A second timer, sectorJump, rings once, jumpSeconds later, 1.4 seconds. When that one rings, the jump is over, and Waves announces nextWave once more, the way Game Start did. The circle closes.
Each wave announces itself with the banner, then brings its Large Asteroids; clearing every Asteroid starts the sector jump and then the next wave.
Any Object- Variable
$wave- Value
0
- Custom Event
nextWave
- Variable
$wave- Operator
+=- Value
1
- Applies To
@self.banner- Visible
Yes
- Timer Name
bannerTime- Repeat Every (s)
@self.bannerSeconds- Ring Once
Yes
- Name
perBandThisWave- Value
1
- Applies To
@self.banner- Visible
No
- Variable
perBandThisWave- Value
$wave + 1
perBandThisWave > @self.maxAsteroidsPerBand- Variable
perBandThisWave- Value
@self.maxAsteroidsPerBand
- creator
self- asteroid
@self.asteroid- perBand
perBandThisWave- edgeBand
@self.edgeBand- sideBand
@self.sideBand
- Sound
"Sector Clear"
- Sound
"Hyper"
- Timer Name
sectorJump- Repeat Every (s)
@self.jumpSeconds- Ring Once
Yes
- Custom Event
nextWave
Now build it, from the top of the card. Make it like Lives and Respawn, its SHARED VARIABLES first, each one Constant. asteroid and banner hold Objects. Pick Object, far down the Type list, and leave each Starting Value, a button, at None. Game Rules fills them in. The five Numbers follow.
Each Event’s Actions go in from a right-click on its Mode 1, with Add unattached Action here, then Connect to sequence. In Game Start, the Variable box takes $wave, dollar sign and all, and Trigger Custom Event’s box takes nextWave, bare. For the second Event, type nextWave into the Add Event window’s filter. It’s there already, because Game Start sends it.
nextWave’s Change Variable adds 1 to the wave, and the card writes that as +=. Click the = on its block, pick += · Add in the list, and type 1 into its Value. Set Visible’s Applies To lists @self.banner under Objects in Variables. Visible is a Yes / No list. Pick Yes. Type the Timer Name bare, bannerTime, then @self.bannerSeconds, and pick Yes in Ring Once. The timer’s own Event takes the same two windows as respawnDelay’s in Chapter 5.
That Event starts with Declare Variable. Its Type stays on Number. Type perBandThisWave into its Name and 1 into its Value. Each Change Variable’s Variable box takes the same name. Once you leave the box, it reads self.perBandThisWave, and that’s the same value, the one Declare Variable made. The If’s box and the call’s perBand box take the name as you type it.
The If’s condition is its one box: perBandThisWave > @self.maxAsteroidsPerBand. Its Change Variable goes on the True line, with Add inside Then. And the call goes on the Event’s own line, below the If, where the card puts it without an indent. Add it from the Action List’s Functions group, and join it with Connect to sequence.
Its creator list starts on self, so it needs nothing at all. Pick @self.asteroid in its asteroid list, and type the card’s values into the three number boxes.
Type No Instances Left into the Add Event window’s filter to find that Event. No second window opens. Its Object is a list on the Event’s block, in its Object section, which starts closed. Click the heading to open it. The list is labeled Collision Target, as on a Collision Event, though nothing collides here. It starts on Any Object. Pick Tagged Asteroid, at the list’s end, and Myth renames the Event to the card’s heading. In the two Control Sounds, pick Sector Clear and Hyper from the Sound lists. The sectorJump timer works like bannerTime.
Attach Waves to Game Rules, below Lives and Respawn, and switch back to Components. Under Variables, asteroid’s and banner’s Values are buttons that read None. Press the first and pick Asteroid Large. The second gets Wave Banner. The five numbers keep the card’s values, so the card lists only those two.
ShipAsteroid LargeWave BannerNow the four rocks from Chapter 4 can go. Click each Asteroid Large in the Scene Explorer of Space and press Delete, as REMOVE THESE PLACEMENTS lists. Waves brings its own.
Run the game.
For a moment, there’s only the Ship and WAVE 1. The banner goes out, and four rocks are there, near the edges. Break them all. Three notes climb, and the field is quiet. Then WAVE 2, and six more.
They’re all Standard rocks, though, and no faster than the first ones. That’s the next part.
6.7 Faster, and a New Material
Last, each wave gets its own speed and look.
6.7.1 Asteroid Drift
Asteroid Drift already picks a random speed for each new rock. Now it multiplies that speed by a number that grows with the wave.
Two new Variables do that work, and their names are close, so keep them apart by their jobs. The first, speedUpWave, is a wave number: the wave, but never more than 9. The second, waveSpeedUp, is the multiplier made from it.
In wave 1, waveSpeedUp is 1, so nothing changes. Each wave after it adds speedUpPerWave, 0.07, and by wave 9 the rocks are more than half again as fast. After that, an If holds speedUpWave at speedUpLastWave, 9, so the rocks stop speeding up.
It works like the If in Waves. Change speedUpLastWave, and the limit moves with it.
Asteroid Drift needs to know the wave, so it gets a new Shared Variable, wave. Why a Shared Variable, when Waves reads $wave itself? So each Object can say which wave it belongs to. The three sizes tie it to $wave in a moment, so their rocks follow the waves. In Chapter 9, the rocks drifting behind the title screen set it to 1 instead, so they always move like the first wave’s.
The card’s first three SHARED VARIABLES are Chapter 4’s. Only the green lines are new.
A new Asteroid starts on a random tumble pose and turn, spins, and drifts in a random direction.
Any Object- Name
waveSpeedUp- Value
1
- Name
speedUpWave- Value
1
- Action Name
poseNumber- Maximum
7
- Frame
poseNumber.value * 4
- Action Name
turnDegrees- Maximum
359
- Degrees
turnDegrees.value
- Action Name
spinSpeed- Minimum
-@self.maxSpin- Maximum
@self.maxSpin
- Spin
spinSpeed.value
- Action Name
headingDegrees- Maximum
359
- Direction
headingDegrees.value
- Action Name
driftSpeed- Minimum
@self.minSpeed- Maximum
@self.maxSpeed
- Variable
speedUpWave- Value
@self.wave
@self.wave > @self.speedUpLastWave- Variable
speedUpWave- Value
@self.speedUpLastWave
- Variable
waveSpeedUp- Value
1 + @self.speedUpPerWave * (speedUpWave - 1)
- Speed
driftSpeed.value * waveSpeedUp- Speed
driftSpeed.value
Now look closely at where the new steps sit on the card. Two come first, ahead of everything Chapter 4 built, and four more sit between step 11 and Set Speed, now step 16. Set Speed has to come last. It uses waveSpeedUp.
First come the three green SHARED VARIABLES, wave, speedUpPerWave and speedUpLastWave, all Numbers and Constant, with the + on that card.
The two Declare Variables make waveSpeedUp and speedUpWave, each with 1 in its Value. Add each from Mode 1’s right-click, then put them at the top with the round handles from the passage on Actions. Click the handle at the bottom of Mode 1, then the one at the top of the first Declare Variable. Next, the bottom of that one, and the top of the second.
Now the four steps near the end. Each goes in from a right-click on the last block of the line, and joins after Set Speed with Connect to sequence. Type each Change Variable’s name. Once you leave the box, it reads self.speedUpWave or self.waveSpeedUp. Step 14 goes on the If’s True line, with Add inside Then, and step 15 below the If.
Last, move Set Speed to the end. Click the handle at the bottom of step 15, then the handle at the top of Set Speed. Set Speed moves below step 15, and the line closes up behind it. Type its new Speed. Asteroid Drift is done.
6.7.2 Asteroid Materials
The six materials are a Data Table, made with Add > Data Table. It’s a short one, a single column with six rows.
Each row is shaped by a Data Structure, the card’s Asteroid Materials Entry, and Myth makes it along with the table. A new table has no columns at all. Open Asteroid Materials Entry, under Data in the Resources, and press Add Field. Type sprite over the field’s name, and pick Sprite in its Type list, among the kinds of thing below the plain values. Its Value turns into a list that reads None, the card’s default.
One row of the "Asteroid Materials" Data Table.
Back in the table, the sprite column is there now. Its small tag reads Object. Its cells hold Sprites all the same. Each row has a name in the Entry column, from Standard to Volatile, and the order matters, because it’s the order the waves use them. Standard, Brittle and the rest aren’t values in a column. They’re the rows’ own names. The passage on Data Table cards shows how the card’s Row 0 becomes the first row on your screen.
Asteroid StandardAsteroid BrittleAsteroid CrystalAsteroid DenseAsteroid MetalAsteroid VolatilePress Add Row six times. Double-click each new row’s name in the Entry column, type the card’s, and press Enter.
Each sprite cell holds a list, and a click on the cell opens it. Pick the row’s picture there.
6.7.3 Asteroid Material
Asteroid Material, with no s, is the Logic that reads the table. It gives each new rock its wave’s picture, in one Create Event.
First it works out a row, materialRow. Wave 1 uses row 0, the first row, so the row is the wave minus 1. But there are only six rows, so what happens at wave 7?
That’s what the % is for. It gives the remainder, what’s left over after dividing one number by another. Wave 7 asks for row 6. Six goes into 6 once, with nothing left over, so 6 % 6 is 0. Wave 7 is Standard again, and the six materials come round in order for as long as you last.
The count of rows comes from dataCount("Asteroid Materials"). Add a seventh material someday, and the circle grows by itself.
Then Set Sprite gives the rock that row’s picture. On the card, its Sprite holds data("Asteroid Materials", materialRow, "sprite"), the table’s name, the row, and the column.
A new Asteroid uses the sprite of the current wave's material, from the Asteroid Materials Data Table.
Any Object- Name
materialRow- Value
0
- Variable
materialRow- Value
(@self.wave - 1) % dataCount("Asteroid Materials")
- Sprite
data("Asteroid Materials", materialRow, "sprite")
Its one Shared Variable, wave, is a Number, Constant, at 1. Asteroid Drift asks for wave too. An Object that holds both keeps one wave, for the two of them. The Actions go in from Mode 1’s right-click. Declare Variable makes materialRow, with 0 in its Value. Type materialRow into Change Variable’s Variable box, and the whole formula into its Value, quotes and all.
Set Sprite comes last, after Change Variable. Join it to the line before you give it the formula. A loose block can’t see materialRow, and Myth would mark the name as a problem.
Its Sprite is a list of your pictures, and the last choice in it is From a Value. Pick that, and the Sprite turns into a box. Click it again, type the card’s formula, quotes and all, and press Enter. Set Sprite also puts self.sprite on the Components card by itself, though the card leaves it out. It does no harm.
6.7.4 The Three Sizes
Each size gets two changes. It gains Asteroid Material, and its wave follows the Global. Asteroid Drift and Asteroid Material share one wave row under Variables. Pick Expression in its Kind list, and type $wave into the Expression box, dollar sign and all, as you did with maximumX in Chapter 3. Asteroid Drift’s other two new Variables keep the card’s numbers.
There’s one thing to watch. Asteroid Material must come first in the Attached Logic, above Asteroid Drift. Set Sprite starts a picture on its first pose. Asteroid Drift picks a random pose, so it has to come after, or every rock would show that same first pose.
A new Logic Component joins the bottom of the list. Drag it by its grip, the dotted handle on its left, up to the top. Or click its grip once, then press Alt with the up arrow, once for each place it climbs.
X 3.875, Y 3.875OnSensorCircle1.510Asteroid StandardX 3.875, Y 3.875AsteroidAsteroid MediumExpression$waveThe Medium and the Small get the same two changes. Nothing else on their cards moves.
X 2.0625, Y 2.0625OnSensorCircle0.78110Asteroid StandardX 2.0625, Y 2.0625Asteroid220.006ExplosionSmallAsteroid SmallExpression$wave2.54.219X 1.125, Y 1.125OnSensorCircle0.40610Asteroid StandardX 1.125, Y 1.125Asteroid140Asteroid BreakAsteroid Small0Expression$wave3.756.094Run the game, and clear a field. WAVE 2 comes in cracked with cyan, and a little quicker. The field has a rhythm now.
Watch for each of these. The first five come in a few minutes of play, and for the last two, the tip below the list helps.
- WAVE 1 shows in the middle of the screen, a little above the Ship. For 1.6 seconds there are no rocks. Sector Clear stays silent.
- When the banner goes out, four Large rocks appear near the edges. None appears in the middle.
- Break a Large rock. The field isn’t clear until its Mediums and Smalls are gone too.
- Break the last rock. Sector Clear and Hyper play, and 1.4 seconds later WAVE 2 shows.
- Wave 2 has six rocks, cracked with cyan, and each wave’s rocks drift a little faster than the last.
- Waves 3, 4 and 5 have eight, ten and twelve rocks, in Crystal, Dense and Metal. After that, it stays at twelve.
- Wave 6 is Volatile, cracked through with glowing orange seams, and wave 7 is Standard again.
To see a later wave sooner, open Waves, and in its Game Start Event type 5 over the 0 in Change Variable’s Value box. The game opens on WAVE 6, or on WAVE 7 with a 6. Put the 0 back when you’ve looked.
A banner. Rocks from the edges. An empty field, two sounds, a jump. Then the banner again, one number higher, and every new rock reads that number for its picture and its speed.
Underneath is one idea. Waves answers two moments, the field going empty and the jump’s timer ringing, and does nothing in between. Every wave begins in one place, the nextWave Event, however it started.
6.8 If It Didn’t Work
Something may be a little off the first time, and that’s normal. Run the game, watch what the field does, and take it one piece at a time.
A piece that does nothing at all? Look on its canvas for a block with no arrow into it, and join it with Connect to sequence.
The banner never shows, and no rocks come? Perhaps Waves isn’t attached to Game Rules, or Game Rules isn’t in Space. If both are fine, look at the Game Start Event. Its Trigger Custom Event should send nextWave, spelled the same as the Event that listens.
WAVE 1 shows and stays? The Event that listens for the timer needs the timer’s own name, bannerTime.
The banner goes out, and no rocks come? Look at the call to Create Asteroids Along Edges, in Waves’ bannerTime Event. Its creator list should say self. Its asteroid list should hold @self.asteroid. Under Game Rules’ Variables, the Value of asteroid should read Asteroid Large, not None. If those are right, open the Function. Each Create Instance’s Applies To should be creator, not Self.
Rocks keep pouring in, a fresh handful every second and a half, and the banner never comes back? The bannerTime timer’s Ring Once is No, so pick Yes. If the banner flashes WAVE 2, WAVE 3, WAVE 4 instead, a new number every second and a half, it’s the sectorJump timer’s Ring Once.
Every wave has only two rocks? The call’s perBand box still holds the Function’s own 1. Type perBandThisWave there.
The banner reads WAVE with no number, or WAVE 0? Check the Text you typed, WAVE {$wave}, braces and all. If it reads WAVE {value}, that’s Myth’s way of showing it, and it’s fine. Then check nextWave’s Change Variable: $wave in its Variable box, += after it, and 1 in its Value.
The banner sits in a corner, or never shows? Look at its placement’s Screen Anchor. The middle dot should be lit, with 0 and 80 in Screen Offset (px).
The first wave has eight rocks? The four from Chapter 4 are still placed, so remove them from Space.
The field empties and no new wave comes? Open the No Instances Left block’s Object section, where Collision Target should say Tagged Asteroid. If it does, check that the sectorJump timer and the Event that listens for it share one name.
A new wave arrives while Mediums are still drifting? No Instances Left may be set to Asteroid Large, which is gone sooner. Pick Tagged Asteroid. Every size wears that Tag, so it waits for the last rock of all.
The rocks never speed up, though both wave boxes say $wave? Look at Asteroid Drift’s order. Set Speed must be the last step. If it sits above the new ones, move it down with the handles.
The material never changes, or the rocks never speed up? Perhaps a size’s wave is still Constant, at 1. On each size, wave needs Expression in its Kind list, and $wave in the box that takes the Value’s place.
Every wave is Standard, though the rocks speed up? Look at the Sprite of Asteroid Material’s Set Sprite, out at the end of the line. It should hold the card’s formula, not a picture’s name. If Myth turned the formula red, perhaps Set Sprite was still loose when you typed it. Join it to the line, and type the formula again.
Every rock in a wave shows the same pose? Asteroid Material has slipped below Asteroid Drift in that size’s Attached Logic, so move it back to the top.
Each of these is a small fix. Make it, run the game again, and you’re back with the chapter. The catch-up download in the Goal is this chapter, finished, if you’d like to compare.
What should a field feel like? Make maxAsteroidsPerBand 3, and every wave stays small and quick, or make it 9, and wave 8 fills the screen. Set speedUpPerWave to 0.2, and the rocks race by wave 5. You could even swap the pictures in Asteroid Material’s Ifs, so your favorite material comes sooner. Chapter 7 is written for the card’s numbers. Set them back before you go on, and write yours down if you’d like to keep them.
Still stuck? Search the manual, or ask in the Myth Engine Discord (opens a new tab).
A field that keeps coming back, a little faster each time. In Chapter 7, every rock you break starts to count.
