- Learn
- Build a Game
- Sky Ace
- Making What a Card Shows
Making What a Card Shows
Every piece of Sky Ace comes to you in two parts. First a story. It’s a few paragraphs that put the piece in your head: what it does in the game, and roughly how. Then a card: the same piece written out exactly, every name and every number. Read the story, look at the card with that picture in mind, and build.
This page is about the cards. Each passage shows how to make one kind of thing in Myth Engine, in the editor’s own words. You don’t need to read it all now. Read the first two passages, Before your first card and The Set up card. A paragraph in them that starts with a later chapter, such as From Chapter 2, can wait for that chapter. Then start Chapter 1, and come back when a card shows you something new.
The editor will feel strange at first. That passes. A chapter or two in, your hands will know where things are.
Before Your First Card
Everything your game is made of lives in the Resources panel on the left: Objects, Logic, pictures, sounds, Scenes. To make something new, press Add at the bottom of the panel. The Add Resource window asks what kind. Double-click a thing to open it, and it opens in a tab of its own.
A card lists only what you change. Anything it leaves out stays the way the editor starts it.
The Set Up Card
Each chapter opens with a Set up card. It holds everything that isn’t an Object or its Logic: art, sounds, keys, settings, and where things go in the Scene. Each block starts with a heading in capitals.
ART, SOUNDS and BACKGROUND name the pictures, sounds and backgrounds this chapter uses. They’re already in your project from the Starter Kit, so there’s nothing to make. The list tells you which ones are about to matter. In Chapter 1, that’s the Fighter Art, the Screen Frame Art and the Pacific Ocean. A Layer line under BACKGROUND names a layer inside it, so you know it when you see it, and its kind: Image for a picture.
COMMANDS are the game’s controls. Your Logic asks a Command whether it was pressed, and never which key that was. A 2D Axis Command, such as Fly, has four directions, and each direction has its own keys. Chapter 1’s Fly comes with a Logic Component, so you don’t make it. Whenever the editor makes something on a card for you like this, the chapter says so, and you never make a second.
From Chapter 2, you make Commands yourself. Open Game Settings, the button above the Resources, and choose Input Manager. Press Add Command. A small window asks for the Command Name and the Input Type, Button or an Axis, and its own Add Command button makes it. A new Button Command has one empty row that reads No Input Assigned. Click it, and press the card’s key. Add Keybinding gives it another row for the next key.
From Chapter 10, INPUT CONTEXTS group Commands that work together, and Add Input Context in the Input Manager makes one.
From Chapter 2, GLOBAL VARIABLES are values the whole game shares, such as the score. On a card a Global has a $ in front, as in $gunLevel, and that’s how you tell it from the others. You make one from any Logic Component. Open it, and down the left side of its canvas sits a small card named Globals. Press the + on it and choose New Global…. The Add Global window asks for a Name, a Type and a Default, the value it starts at. Its name is gunLevel, without the $, so type gunLevel in Name. Then press Add.
GAME SETTINGS lines say where each field is. GAME SETTINGS > Display > Window means: open Game Settings, choose Display, and find the Window group. The field names under it are the ones you’ll see there. Enter them in the card’s order. Where the order matters, because one setting hides another, the chapter says why. Under Audio, the two volumes are sliders. Drag each one until its reading shows the card’s number, such as 55%. From Chapter 4, GAME SETTINGS > General > Game State lists the states a mission can be in, such as Playing and Mission Failed. Your project has Playing already, marked Initial. For each new one, press the + under the list, Add Game State. Type its name, and press the window’s button.
A SCENE block with (new) is a new Scene: Add, then Scene. Chapter 1’s is the one exception. A new project already has a Scene, and Chapter 1 has you rename it. To reach a Scene’s own settings, open it and pick the arrow tool above the preview. Then click an empty spot. The Properties on the left show its Background Color, its Screen Backgrounds and its Cameras and Views. The card’s Camera line gives the Main Camera’s Position, the middle of what it sees, then its Visible Width and Visible Height, in meters. The View line is the Scene’s Main View. Its Background line is the sea: add it under Screen Backgrounds. The card puts Start Scene right after the Scene it names, never before it. It picks a Scene from a list, and a Scene is on that list only once it exists.
PLACE THESE lists what to put in the Scene, and where. Open the Scene, and the Place Scene Content panel is on its left. Your Objects are near its bottom, under Predefined Objects. Drag one onto the Scene. Then type the card’s X and Y into its World Position, in meters.
The frame, the bars and the words on the screen are placed differently. They stay put while the sea moves under them. Their X and Y go into Screen Offset (px), counted in pixels from the spot their Screen Anchor picks. A placement marked hidden starts out of sight, so turn off Visible at Game Start.
From Chapter 4, REMOVED names something the game no longer needs. Right-click it in the Resources. Delete is at the bottom of the menu. In Chapter 9, a Logic Component goes by a new name instead, and the chapter says so. Its Rename line, on the same menu, opens a box in its row. Type the new name, and press Enter.
From Chapter 9, CHANGE THESE PLACEMENTS changes what’s already in the Scene. Select each placement it names, and give it the card’s values, as for a new one.
A Placement’s Own Values
Some lines under a placement start with “with”. Each one is a value that only this placement has. Select the placement in the Scene, and look down its Properties.
with Z-Index = 120 is the placement’s Z-Index, under Rendering. A higher number draws in front, so the score’s words sit on top of the bar behind them.
From Chapter 10, with Screen Anchor = Center is the placement’s own Screen Anchor. Pick it first, then type the Screen Offset. Picking an anchor moves the numbers so the placement stays where it is.
From Chapter 2, a line such as with Per Instance Variables > Level = 2 gives this placement its own start for one of its Logic’s Variables. Each of the placement’s Logic Components has a section under Logic, near the bottom of its Properties. In it, under Per Instance Variables, each Variable has a box, named after it: Level for level. The box holds what the Variable starts at. Type the card’s value there. The section then counts it, 1 override, and a small Reset button beside the box would put it back.
A line ending in (Edit Object Locally) changes one of the Object’s own components, for this placement only. Select the placement and press Edit Object Locally. Choose the component the card names in Attached Components, and change its field. Back to Scene takes you back.
An Object Card and Its Components
An Object is a thing in your game: the Fighter, a Zero Fighter, a word on the screen. Make one with Add > Object. The Create Object window asks for the card’s name and an Object Type. An Object whose card has a Collider is a 2D Object, and its Collider is already there, though not its Sprite. Every other Object is an Empty Object, and you attach what its card lists. Here is the Fighter’s card. You’ll build it in Chapter 1, in its own part.
X 3, Y 3Off30Fighter ArtX 3, Y 3X 0, Y -0.094X 0.656, Y 0.75Collide Only With10.3131.31321.1887.18830The card lists the Object’s components, with the fields to change under each one. A component gives an Object one ability. Sprite shows a picture. Text / UI shows words, and Collider gives the Object a shape, so it can touch things. Data Structure lets it carry a set of named values. Transform is on every Object from the start, and says where the Object is and how big.
In the Object editor, the list at the top right of the preview says Components. Leave it there for now. Open a group in the Component Toolbox and click a component to attach it. Sprite and Text / UI are under Rendering, Collider under Physics, and Data Structure and Tags under Data. Select a component in the Attached Components, and its Properties open on the left, below the Object’s own. The card’s lines are those Properties, in the same order. Transform > Size under Sprite is the picture’s own size: meters for a thing in the world, pixels for a thing on the screen.
The Transform’s Bounding Box is a box the Object keeps for its own size, apart from its picture. Nothing in Sky Ace measures from it. Its Size doesn’t change how the picture looks, but type the card’s numbers anyway, so your Object matches the game’s.
The cards of words and pictures that sit on the screen start with Transform lines of their own: Space Window / UI, a Screen Anchor, and Render Layer UI. Set Space first. The Screen Anchor grid appears once Space is Window / UI, and the Render Layer turns to UI by itself. Then pick the card’s anchor on the grid.
A new Collider’s Shape is a Box. Shape and Transform > Size is the box, and it can be much smaller than the picture. The Fighter’s is, so only the middle of the plane can be hit. Position moves the box away from the Object’s middle.
The Collider’s Tags and Interactions section says what this Collider may touch. Its Interactions list starts at Everything. The card’s Collide Only With means: only what’s on its list. The Fighter’s list is empty in Chapter 1, so it touches nothing yet, and the Collider says so: Nothing listed: this Collider meets nothing.
A card’s Transform may end with Physics > Physics Object. That’s a switch in the Transform’s own Physics section, below its Bounding Box. A new 2D Object starts with it on, so bumps and pushes can move it. An Empty Object starts with it off. The card names it only where yours should differ: Off, as on the Fighter, means turn the switch off. A thing on the screen has no Physics section at all. It isn’t the Component Toolbox’s Physics group, though they share a name.
From Chapter 3, Objects carry Tags. A Tag is a word stuck on an Object, like a label on a jar, so other things can find every Object that wears it. Every enemy plane wears the Tag Enemy Aircraft. A card gives them under Tags, as Object Tags Enemy Aircraft. Attach Tags from the Data group. In its Properties, open the Tag to Add list. The first time, choose Create New Tag… and press the + beside the list, Add Selected Tag. The Create Tag window asks for the Tag. Type the card’s, and press OK. After that, the Tag is in the list for every Object. Pick it, and press the + again.
That’s how a Collide Only With list reaches a whole kind of Object at once. The MG Round’s card reads Collide Only With Tagged Enemy Aircraft. Under Interactions, press Search to add… The window lists your Objects first, then your Tags, each as Tagged and its name. Pick the card’s. So tag your Objects first, before the lists that name their Tags.
From Chapter 3, words on the screen use Text / UI. It has a Font list, and every font in it is written in its own letters. Type Bebas into it, and pick Bebas Neue. Its Color is a swatch, the small square of color. Click it, and type the card’s code into the HEX box, with its # or without it. That box keeps two more characters at its end, FF. Leave them. They keep the color solid.
Its Font Size is a list, and you can type in it too. Type the card’s size and press Enter. Then it stays.
From Chapter 4, a card may give an Alignment, such as Center or Right. Alignment is three small buttons with lines drawn on them, and each says its name when you hover over it: Align Left, Align Center and Align Right. Press the card’s.
A Text line such as {$score} shows a live value. Type it into the Text field as the card spells it, braces and all. While the game runs, the words follow $score. When a card gives Text Bounds Wrap to Width, pick it before you type the Size X under it. Picking it sets that width to fit the words.
From Chapter 3, a Data Structure component gives the Object a set of named values, and the card picks which: Data Structure Enemy Stats. Its Input Source Data Table and its Data Table, Enemy Types, mean: fill those values from the table’s row named like this Object. So each enemy reads its own speed and health.
Logic comes last on an Object card, and it isn’t in the toolbox. Switch the list at the top right to Logic, and the Compatible Logic list opens on the right. Click each Logic Component the card names. It joins the Attached Logic, under any that are there already. When a Logic Component needs a Data Structure, attaching it adds that Data Structure to the Object too, if the Object doesn’t carry it yet. Then you set the card’s lines under the Data Structure, as above. Nothing is added twice.
The lines under Shared Variables and Per Instance Variables come after the Logic, because the Logic brings them. Switch the list back to Components. At the top of the Properties, under Variables, each Variable the Logic gives this Object has its own rows: a name box, its Type, its Kind and its Value. Under it a line says where it came from, such as From Logic: Top-down Controls. A card line such as moveSpeed 10.313 is that Value, so type the card’s number into it.
Those Value boxes keep three decimals, no more. The game you played above was made with a few longer numbers, such as 10.3125. The card gives each one as your box will keep it. The difference is far too small to see.
From Chapter 2, some Values are Objects, such as the round the Fighter’s guns fire. The card writes round MG Round. That Value is a button that reads None until you press it and pick the Object. From Chapter 8, a Value may be a sound, such as a pickup’s collectSound. Pick it the same way.
From Chapter 3, a line may change a Variable’s Kind, as in maximum > Kind Expression. Pick Expression in its Kind list. An Expression box takes the Value’s place. Type the card’s line under it there, as the card spells it, quotes and all. An Expression works out its value from something else, here the health in the Object’s own Enemy Stats.
Each row of the Attached Logic has a small switch near its left end. It’s blue when it’s on. From Chapter 4, a card may mark a Logic Component (turned off). Attach it, then click its switch, so the switch turns gray. That Logic Component answers no Events until other Logic turns it on while the game runs. The red button at a row’s right end takes it off again.
From Chapter 5, many Objects come in look-alike sets. Build one first. Then right-click it in the Resources, and choose its Duplicate line. Myth makes a copy and opens it, named with a number: Jungle Island2 from Jungle Island, or Cloud 2 from Cloud 1.
Type the card’s name in the copy’s Name box, unless Myth’s name is already the card’s, as Cloud 2’s is. Next, go down its card and change what differs. The copy keeps everything else, its Variables’ values too.
A Data Structure Card
A Data Structure is a small form of named fields, and an Object carries one filled-in copy. Every enemy carries Enemy Stats: its speed, its health and its points. Here is Enemy Stats, from Chapter 3.
What every enemy carries; each enemy takes the values from its own row of Enemy Types.
Make one with Add > Data Structure. The Create Data Structure window asks only for its Name, so type the card’s, and the new Data Structure starts with no fields at all.
The sentence under the name is its Description. Type it in if you like. The game never reads it, but you will, months from now. Then press Add Field for each line. A field has a Name, a Type and a Value, and the card’s default goes in Value.
A Data Structure whose name ends in Entry, such as Chapter 2’s Gun Patterns Entry, is one you don’t make this way. Myth makes it with its Data Table. The Data Table passage below shows where to find it.
From Chapter 7, a field can be Boolean, a yes or a no. Pick Boolean in its Type list, and its Value turns into a switch that reads No. The card writes that default as false, and false is No.
A Logic Component Card
A Logic Component is a piece of behavior you attach to an Object: how the guns fire, how the score counts. Make one with Add > Logic Component. The Create Logic Component window asks for a Name and a Starter. Leave the Starter on Empty Logic Component. This card is from Chapter 2. It removes a round once it has flown out of sight.
Removes this Object once it has left the view, so nothing that has flown away keeps costing time.
Any ObjectThe top of the card names the Logic Component, and the Object you’ll attach it to in this game. The sentence under the name is its Description. The Attach to line under that is the Logic Component’s own setting. Leave it at Any Object, where a new one starts.
A new Logic Component opens on a big, empty canvas, crossed by a grid. Down its left side sits a column of small cards: Logic Component, Globals, Data Structures, Components, Per Instance Variables and Shared Variables. Each has a + in its corner, and the card’s blocks of the same names are made with them. The first one folds open to show the Name, the Description and Attach to.
SHARED VARIABLES are values this Logic keeps on each Object it’s attached to, one for all of that Object’s copies. Each Object can set its own, as the Fighter’s card does. Press the + on Shared Variables. The Add Shared Variable window asks for a Name, a Kind, a Type and a Starting Value. Its Kind starts on Changeable. Pick the card’s, Constant on most of them. Then press Add. In the Logic, a Shared Variable reads with an @ in front: @self.hitSparksCount.
From Chapter 2, PER INSTANCE VARIABLES are values each copy keeps for itself, such as the level of each of the four pips. The + on Per Instance Variables opens Add Per Instance Variable: a Name, a Type and a Starting Value. One reads without the @: self.level.
A Type list is long. Number, Text and Boolean are at its top, Color and Sound further down. An Object Variable, such as the Fighter Guns’ round, takes Object. Its Starting Value button reads None. Leave it there, because each Object card picks its own.
From Chapter 3, DATA STRUCTURES name the Data Structure this Logic reads on its Object, and how it reads it. Press the + on Data Structures, and pick the card’s under Existing Data Structures. Myth gives it a name of its own, and the card’s row shows it: Enemy Stats self.enemyStats. The Logic reads every field through that name, as self.enemyStats.speed.
The rest of the card is its Events, each with its Actions. Those come next.
A Logic Component That Comes Built In
Four of this game’s Logic Components come whole from Myth Engine: Top-down Controls, Keep Inside Box, Meter with Thresholds and Pause Overlay Lifecycle. Their card says so. Here’s the one that keeps the Fighter inside its flying box.
Clamps an instance to an authored rectangular play area every Step.
Any ObjectMake it with Add > Logic Component, like any other. In the Create Logic Component window, open the Starter list and pick it by name. Top-down Controls is in the Controls group, Keep Inside Box under Movement, Meter with Thresholds under State, and Pause Overlay Lifecycle under UI. Press Create. It takes the Starter’s name, and its Events are already built. Its Shared Variables start at the card’s values, so there’s nothing else to do here. You set them on the Object card.
Top-down Controls brings one more thing with it. It adds a 2D Axis Command named after itself to the Input Manager, with the arrow keys and W, A, S and D already bound. Chapter 1 shows you what to do with it.
Events: The When Bars
An Event is a moment your Logic waits for: the game starting, a key pressed, a timer ringing. Each Event on a card starts with a plain heading, such as When Leaving the View. That’s the name Myth gives the Event itself. You never type it. It tells you which Event the card means, and it’s the name you’ll pick when an Action asks for an Event.
Under the heading is the When bar. It names the kind of Event. Then comes its setting, if it has one: a Command, a Direction, a Timer name, an Object, a Global Variable or a Mouse button. Press Add Event, the + in the canvas’s toolbar. The window has a filter at the top, so type the kind’s name there, pick it and press OK. When the kind has a setting, a second window asks for it, such as which Command. Pick the card’s and press OK again.
The Event lands on the canvas as a big green block, with a smaller one beside it, joined by an arrow. That smaller block is the Event’s Mode, named Mode 1. Its Actions hang below it in one line, and the line ends at End. A card’s Event with one way of answering shows no Mode at all. Leave Mode 1 as it is.
A Logic Component can have many Events, and they all sit on the one canvas, each with its own line. The buttons at the bottom of the canvas zoom it, and Fit shows the whole of it at once.
For Chapter 2, the paragraphs above this one are all you need. The rest of this passage is for later chapters: timers, meters, collisions and messages from Chapter 3, Modes from Chapter 4, and switches from Chapter 9.
From Chapter 3, a When bar may name a Timer name. A Timer name is one you make up, so the second window can’t list it. Choose Type a timer name… and press OK. A small window comes next, and the card’s name goes in its box.
When a When bar names no setting, as Meter Threshold Reached’s doesn’t, leave the window’s first choice, Any meter, and press OK. Collision Enter asks for nothing. Neither do Collision and Collision Leave. Their Object is a list on the Event’s block, in its Collision section, which starts closed. Click its heading to open it. The list is Collision Target, and it starts at Any Object. The card’s Object: tag:Enemy Aircraft is the Tag. Pick Tagged Enemy Aircraft, under Tags at the list’s end, and Myth renames the Event to match the card’s heading. The list shows a Tag only once an Object wears it.
The Event’s block also lists its Event Variables. The first is other, the other Object in this Event: for a collision, the one that was hit. A card’s Applies To other means that one.
From Chapter 3, many Events in this game are a Custom Event. That’s a message one piece of Logic sends and others listen for, like a bell rung in one room and heard in another. Its When bar names the message, such as enemyShotDown. To listen for a new one, type Custom into the Add Event window’s filter, pick Add Custom Event…, and press OK. A window asks for its Event Name. Type the message, and press OK. When some Logic already sends a message, that message is in the list too, ready to pick.
Sending often comes first. An Action such as Trigger Custom Event has a Custom Event field, and it takes any name you type. So you can send a message before anything listens for it. Type it as the card spells it, and the listener you make later uses the same name.
There are two ways to send. Trigger Custom Event rings the bell for every Object in the game that listens. Trigger Custom Event on Object rings it on one Object only: the one its Applies To names. The card always says which.
From Chapter 4, some Events answer in more than one way. Each way is a Mode, with its own name and its own line of Actions. On a card it’s a line under the When bar, such as Mode: Choose a Pilot. A card shows an Event once for each of its Modes, each time with the Event’s own heading and When bar. Two headings alike are one Event with two Modes.
Name the first Mode: right-click Mode 1 and choose Rename Mode…. Type the card’s name. For each of the others, right-click the Event’s block and choose New Mode…. A window asks for its Mode Name. Each new Mode gets its own block, to the right of the last, with its own line. Its Actions go there.
An Event with several Modes shows Modes on its block, with two choices. With One at a time, one Mode answers. The card marks it (Starting Mode), and you pick it in the block’s Starting Mode list. Switch Mode changes it while the game runs. With Combined, several Modes answer together, and the card says Combined after each one. Then each Mode block has a small switch, On at start. Turn it on where the card says On at start. The ones that are on answer in their order, left to right, so make them in the card’s order.
Turn On Mode and Turn Off Mode switch one Mode of a Combined Event while the game runs, and Reset Modes puts an Event’s Modes back the way they started. Their block picks the Event and the Mode from two lists. The Event list starts on Current Event, the Event this block is in, which is what a card with no Event line means. The other Events are listed with the Object that carries them, as On the Enemy Fire Timer · Zero Fighter. The card names another Logic’s Event with that Logic in brackets, as While Fire Is Held (Fighter Guns). Then the Mode list holds that Event’s Modes. A Logic Component that isn’t on an Object yet has its Events listed with its own name instead.
From Chapter 9, two Events answer a switch. On Enable runs when other Logic switches its Logic Component on, with Set Logic State. On Disable runs when it’s switched off, and Myth names the two When Enabled and When Disabled.
Actions, One at a Time
Under each Event, the numbered rows are its Actions, in order. On the canvas they’re blocks, joined by arrows into one line that runs down from the Mode to End. Click an Action in the Action List on the right, and its block appears. The list’s groups start closed. Type the Action’s name into the search box at its top instead.
A new block lands beside the line, not on it. No arrow runs to it. Until one does, it does nothing when the game runs. So right-click it and choose Connect to sequence. It joins the end of the line, above End, and an arrow runs to it. Join each Action as you add it, in the card’s order. The line grows down the canvas.
Fill in the fields the card lists. Each field is a small box on the block, after its name. The others keep the value they start with. So an Action with no lines under it is whole: add it, join it, and leave every field as it starts.
Every value on a card is written as its box takes it. A plain name like level is one of this Logic’s Variables or a Function’s Parameters. A name like $gunLevel is a Global Variable. Most boxes read what you type as a small formula. In those, a word needs quotes, so the card gives it with them: "fireRate". Without them the box reads the word as the name of something else, and the block turns red. The Errors bar under the canvas counts it, and says what’s wrong.
A few boxes take a name as it is: a Timer Name, a Cooldown Key, a Custom Event. The card gives those bare. Type them bare too. Once you’re done, the block draws the name between quote marks, as “blink”. That’s only how it shows a name. Leave it. From Chapter 4, a Function’s Cooldown Key box is the other kind, a small formula. There the card gives the name in quotes, as "protection". Type the quotes too.
Some fields are lists, not boxes: Applies To, a sound, a particle effect, a Yes or No. Click one, and pick the card’s. Where the card writes a list’s value in quotes, such as “Hit Sparks”, pick Hit Sparks. A Yes or No list takes the card’s Yes or No. A card’s true there is Yes. From Chapter 4, a color on a block, such as Camera Flash’s Color, is a swatch. Click it, and type the card’s code into its HEX box.
A Change Variable reads Set on its block, with an Operator box beside its Variable. It starts at =. Then the Value replaces what the Variable held. With +=, the Value is added on, and with -=, it’s taken away. No Operator line on the card? It’s =.
Its Variable box takes every kind of Variable. A Global, such as $score, keeps its $, and a Shared Variable keeps its @, as @self.blinkSeconds. From Chapter 4, a Function makes Variables of its own with Declare Variable, a Type, a Name and a starting Value. After that, the card names it plainly, as wait.
Some Actions have an Applies To line, naming the Object the Action works on. On the block, Applies To is a list, and it starts on Self, the Object this Logic is attached to. The card’s self is Self. So an Action whose card has no Applies To line needs nothing picked. The list’s other groups hold the rest: Other, under Event Context, and from Chapter 3 your Tags, as Tagged Enemy Aircraft. In a Function, the list holds its Object Parameters, such as Caller.
After a Create Instance, the next Actions often say created. That’s the name Create Instance gives the new Object, in its Created As box. In the Applies To list it reads created · Instance Set, under Earlier Action Results, and each Action you add after the Create Instance starts there already.
Create Instance’s Position Relative To list holds World and Self. Self counts the card’s X and Y from the Object the Action works on, the one its Applies To names. Its Object to Create is a list too. In a Function, it holds the Function’s Object Parameters, such as Chapter 2’s round. In a Logic Component, it holds self and the Logic’s own Object Variables, such as Chapter 4’s @self.round. At its bottom is From a Value (Variable, Data Table, Expression). That one is for a value the list doesn’t name, such as Chapter 3’s enemy. Pick it. The list turns into a box. Type the card’s value there.
From Chapter 4, Check Game State’s Game State list offers your Game States. A new Check Game State or Set Game State starts on Playing. That’s the one marked Initial. The list also holds the Logic’s own Variables that fit. Chapter 4’s self.state is one.
Some Actions hand back an answer. On the card, their first line is an Action Name. On the block it’s the last box, after the word as, and it holds a name of Myth’s to start, such as cooldownReadyResult. Type the card’s name over it, with no quotes. A later Action reads the answer by that name. machineGunsReady.value is the answer a Check Cooldown Ready gave, true or false.
From Chapter 3, Change Component Value changes one field of a component, the one its Component Value path names. Type the path as the card spells it. The path self.runMissionTimelineData.nextRow is the nextRow field of a Data Structure the Object carries.
A Function goes in the same way as any Action, from the Functions group of the Action List. The card gives it a small Function tag. Its fields are the Function’s Parameters, by the names you gave them. The card writes the first one small, as caller, where your block says Caller. An Object Parameter’s field is a list. A new call starts it on self, so caller self needs nothing at all. The list also holds the Logic’s own Object Variables. When a card gives one, as Chapter 2’s round @self.round or Chapter 4’s fighter @self.fighter, pick it there. The other fields are boxes, and their values are typed.
From Chapter 8, two Actions, Pick Data Row and Tween, stay out of the Action List until Advanced Mode is on. Choose Settings > Advanced Mode at the top of the editor, and they’re there. Your game stays the same. Only the editor shows more.
If, Else, Repeat and While
An If runs some Actions only when its condition is true. It’s in the Action List’s Logic group, with Repeat and While. On the canvas it’s wide and pointed, with a line marked True running down from it. That line is the card’s Then panel. Join the If itself to the main line with Connect to sequence, like any block.
Its condition goes in the one box on the If, Condition. Click it, and type the card’s condition whole, such as $gunLevel >= level. Then press Enter. A red edge means a name in it isn’t one this Logic knows. Check the spelling against the card.
A condition can have two parts, joined on the card with &&, and, or with ||, or. Type them into the same box, as the card does. With ||, one true part is enough. With &&, every part has to be true before the Then panel runs.
To put a block on the True line, right-click the If and choose Add inside Then. A window, Add Action - Then of If, has the Action List’s own groups, Functions among them, and a filter at the top. Pick the Action and press OK. It lands under the If, on its True side, but not joined yet. Right-click it and choose Connect to sequence, as on the main line. It joins the end of the True line. Do the same for each block in the panel, in the card’s order.
From Chapter 4, an If can sit inside another If’s True line, as in Aim Down at the Fighter. Each If’s right-click menu has its own Add inside Then. It adds to that If’s own line. So find the If whose line the card’s step is on. Right-click that one.
From Chapter 3, a card may go on after an If, with a step that has no indent. That step is on the main line, below the If. Add it from the Action List and join it with Connect to sequence. It goes under the If, above End.
The card’s Otherwise panel is the If’s Else, the Actions for false. Right-click the If and choose Add Else. The Else appears to the right of the If, on a line marked False. Right-click the Else and choose Add inside Else for each of its Actions, and join each one with Connect to sequence. Otherwise gets a step number like everything else. It isn’t in the Action List, though.
A Repeat runs its Each time panel a set number of times, its count. Its box is on the Repeat block itself, and it starts at 1. Type the card’s count there. Right-click the Repeat and choose Add inside Repeat for each Action in the panel, and join each one with Connect to sequence. Inside a Repeat, local.index says which pass through the Repeat this is, counting from 0. Type it as the card does.
From Chapter 6, a While runs its panel again and again, as long as its condition holds. Its condition is one box, as an If’s is. Right-click it and choose Add inside While for each Action in its panel, and join each one the same way.
The step numbers count right through the panels. So step 2 may sit inside an If that began at step 1. The indent shows where each one belongs.
A Function Card
A Function is a small piece of Logic that does one job when it’s asked: fire one volley, show one pip. Make one with Add > Function. The Create Function window asks only for its Name, so type the card’s. Its card has PARAMETERS and ACTIONS. There’s no Event. Its Actions hang in one line on the canvas, from Start to End, and they run each time another piece of Logic calls it. This is Show Pip For Gun Level, the first one, from Chapter 2.
Shows the pip while the gun level is at least the pip's level, and hides it otherwise.
$gunLevel >= level- Applies To
Caller- Visible
true
- Applies To
Caller- Visible
false
PARAMETERS are the values the Function is handed. Make them on its Start block, under Parameters, with the + there. The Add Parameter window asks for a Name, a Type and a Default. A Number starts as variable, with 0, so type the card’s name and its Starts at over them.
Caller is the first. Type Caller in its Name, pick Object at the very end of the Type list, and press Add. Each row of the Start block has a small pencil, which opens that Parameter again. Whoever calls the Function hands it an Object there, usually self, and Applies To Caller works on that Object. There’s an Object higher up the Type list too, among the plain values. It holds an Object’s name, the way a Number holds a number. Its Default reads None, so leave it. A Parameter that’s handed a real Object, as Caller is, takes the one at the end.
From Chapter 2, a card may list Required Components under an Object Parameter, as Fire a Volley’s round has. The same pencil opens them, under its Compatibility Mode. Structural, which the card names, is chosen already. Press Add Required Component, and pick the card’s Component Type, such as Transform. The Slot Name fills itself in to match: transform.
From Chapter 4, some Functions hand back an answer, and the card’s RETURN TYPE says what kind, such as Number. Press Logic Settings, the gear in the canvas’s toolbar. The Function card opens with its Return Type list, which starts on Nothing. Pick the card’s. Then the card’s last step, Return, is a block from the Action List. Its Value is the answer.
A call to such a Function has an Action Name, its last box, like any Action that hands back an answer. The caller reads the answer by that name: firstShotWait.value is the answer of the call named firstShotWait.
From Chapter 8, a Parameter can be a Color. Its Default is a HEX box, already at #FFFFFF, white. A call that leaves a Parameter’s box empty hands the Function its Default.
A Data Table Card
A Data Table is a spreadsheet the game reads while it plays, one row for each thing. Make one with Add > Data Table. The Create Data Table window asks only for its Name, so type the card’s and press Create.
Each row of a table is made like a Data Structure, and the card says which, after its name: Data Structure: Gun Patterns Entry. A new table makes that Data Structure itself, named after the table with Entry on the end. You’ll find it under Data Structures in the Resources. Its card comes right before the table’s. Open it and add its fields, each with the card’s default in its Value. Each field is a column of the table.
From Chapter 3, two tables use a Data Structure of their own instead: Enemy Types uses Enemy Stats, and from Chapter 5, Sea Scenery uses Sea Scenery Spacing. Make that Data Structure first, from its card. Then make the table. Pick the Data Structure in the table’s Entry Type list, at its top left. The table also made its own, such as Enemy Types Entry. Nothing uses it, so delete it from the Resources.
Then come the rows. The table shows its columns on the left, and its rows in a grid. Add each row with Add Row, under the grid. Each row has a name in the grid’s Entry column, and a value under each column. Double-click a name to change it. A new row starts with every field’s default, so you’ll type only what differs. The card gives each row by its name, from Row 0. The editor numbers them from 1. So the card’s Row 0, named Level 1 Left, is the first row on your screen.
From Chapter 7, a field can be Boolean, and its column’s cells are small switches that read Off or On. Off is No, and On is Yes.
Under the grid, beside Add Row and Import CSV, are Delete Selected Row and Clear All Rows. Click a cell, and Delete Selected Row deletes that cell’s row. Clear All Rows deletes every row, once a window asks: Clear every row? The columns stay. Add Row adds a row at the end, and so does Import CSV, for each row of a file that the table doesn’t have. So when a Changes card strikes a table’s rows, as the Mission Timeline’s in Chapters 7 and 8, clear them first, then import. In Chapter 9, the one new row comes last, so Import CSV adds it where it belongs.
In Chapter 6 you type the Mission Timeline’s rows yourself. From Chapter 7 it grows to dozens of rows. You won’t type them. Its card gives the table as a file to download. Import CSV is under the grid, beside Add Row. Press it and pick the file. Myth Engine asks first, in a window that counts the rows it will add and change. Press Import CSV again. Make the card’s fields before you import. The card also shows the first few rows, so you can check that yours begins the same way.
A Particle Effect Card
A particle effect is a spray of tiny pictures: a muzzle flash, sparks, a puff of smoke. Make one with Add > Particle. The Create Particle window asks for a Name and a Starter. Type the card’s name. Leave the Starter on Blank Particle, because a particle card lists only what differs from a blank effect. Press Create, and you’ll find the new effect under Effects in the Resources.
Its Properties come in three pages. You change page in the list at the top right of the preview: Emitter, Motion and Appearance. The card groups its lines the same way.
Each line names a section, then a field. Lifecycle > Each Particle Lives (ms) is the Each Particle Lives (ms) field in the Lifecycle section. Open the section if it’s closed. A min and a max go in the two boxes of a range. The start and end are the small captions beside the boxes.
A line that ends in On is a switch. Starting Rotation Random Spin On means the Random Spin switch under Starting Rotation. Turn it on, so it shows blue.
Every effect in Sky Ace bursts, a handful of particles at once, when an Action asks. Burst Count is how many. But when the Burst Particles Action gives a Count of its own, the Action’s Count wins. That Action’s Z Index Offset, 2 on most cards, draws the burst a little in front of the Object it comes from.
None of these effects ever sprays on its own. That’s why their Emit Every (ms) is 0. The reading under that box, thousands of particles a second, is what an effect would pour out if it did. Here it never comes into play.
Multiple Colors is a list. Pick it in Color Source, and the list starts with two rows. Add Color adds another. Click a row’s swatch, the small square of color, and type the card’s code into the HEX box. A # already sits in front of the box, so the six characters after the card’s # are enough. Typed with its #, the code works too.
Changes Cards
From Chapter 2 on, the game changes what you’ve already made. A Changes card shows the whole piece, with the changes marked. That way you can find your place. Lines marked Add, in green, are new: add them. Lines marked Delete, red and struck through, are gone: delete them. A struck step sits right above the new steps that take its place. When a step stays and only one of its values changes, the step keeps its number. That field shows twice. The new value is green, and the old one is struck under it. A new If is green, and so is everything inside it, though its Then panel is drawn paler. The blocks on that panel are new too. One If looks new but isn’t. When only an If’s condition changes, the card strikes the old If and shows it again in green, and the blocks inside it are plain. Keep that If, and change its condition. Deleting it would take its plain blocks along. An Object’s Changes card shows a changed field the same way. Everything else is already there.
The sentence under the name is the Description as it is now. A changed one isn’t marked. The chapter tells you when it changes.
To delete a struck block, right-click it and choose Delete. Deleting an If takes everything inside it along. A struck Variable has a small red trash button at its row’s right end, on its card at the canvas’s left. On a Data Table’s Changes card, a row’s new name is green, with the old one in red below it. Double-click the old name in the Entry column, and type the new one. This one gives the Fighter its guns in Chapter 2.
X 3, Y 3Off30Fighter ArtX 3, Y 3X 0, Y -0.094X 0.656, Y 0.75Collide Only With10.3131.31321.1887.18830MG RoundIf Your Game and a Card Disagree
It will happen. A value lands in the wrong field, or a step goes in the wrong panel. That’s how everyone learns this.
A piece that does nothing at all? Look first for a block with no arrow into it, and join it with Connect to sequence. A block drawn in red, and a number on the Errors bar under the canvas? Open the bar. It says which block, and what it misses. Count the quotes.
Every chapter’s Goal offers that chapter’s finished game as a download. It holds the whole Starter Kit too, as your own project does, so the next chapter can start from it as it is. From Chapter 3 on, it’s a zip. It holds the project and the license of its font, Bebas Neue, so unzip it first, as its button says. Open the project with File > Open Project… and put it beside yours. Look at the piece that misbehaves. Go down it line by line and find where the two part ways. Or start the next chapter from the download. Nothing you built is wasted, because now you know where everything goes.
A Repeat may come folded in the download, with a small arrow at its left end. Click the arrow, and its blocks show.
The download’s canvases hold a few things yours won’t. Green notes, comments, sit beside the blocks, and a Mode may have a name where yours says Mode 1. A Mode Action’s Event list may name an Event in other words, such as Enemy Fire Timer Rings for On the Enemy Fire Timer. It’s the same Event. None of it changes how the game plays.
Chapter 1 starts with an empty sea and one silver Fighter waiting near the bottom.
