- Learn
- Build a Game
- Shatterfield
- Making What a Card Shows
Making What a Card Shows
Every piece of Shatterfield 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. 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, and choose what kind in the Add Resource window. Double-click a thing to open it. It opens in a tab of its own. Right-click it for a menu with Rename, Duplicate and Delete.
A card lists only what you set, and anything it leaves out stays the way the editor starts it.
At the top of the editor, Play runs your game in a window of its own. Stop, beside it, closes that window. Save as you go, with File > Save or Ctrl+S.
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. The blocks of Chapter 1’s card come first below, and the ones later cards add wait at the end, for when you meet them.
ART and SOUNDS name the pictures and sounds 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 Ship Sprite and the Thrust sound.
COMMANDS are the game’s controls. Open Game Settings, the button above the Resources, and choose Input Manager. Press Add Command, and give it the card’s name and Input Type in the window that opens. A new Command comes with one empty key row. It reads No Input Assigned. Click it, then press the card’s key, and the row shows that key. For another key, Add Keybinding adds another row. Your Logic will ask whether Fire was pressed, and never care which key that was. Some Commands arrive by themselves, with a Logic Component that comes built in. The chapter tells you when. You only check them.
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, from the top down, even when a GAME SETTINGS block comes after a SCENE block. Where the order matters, the chapter says why.
A SCENE heading names its Scene, and the capitals hide the name’s own spelling. SCENE SPACE is the Scene called Space. A SCENE block with (new) is a new Scene: Add, then Scene. A Scene opens ready for placing things. To reach its own settings, pick the arrow tool above the preview, Select. Then click an empty spot. The Properties on the left show its Background Color. Click its swatch, the small square of color. A picker opens. Type the card’s code into its HEX box, after the # that’s already there.
PLACE THESE lists what to put in the Scene, and where. Open the Scene and pick Place, the button beside the arrow, if it isn’t already on. The Place Scene Content panel is on the left. Your Objects are near its bottom, under Predefined Objects.
Press one there, then click once in the preview, and it lands where you click. Each click places one more, and Ctrl+Z takes back a spare. Then pick Select and click what you placed. Type the card’s X and Y into its World Position, in meters.
An Object with no picture, such as Game Rules, shows nothing there. The Scene Explorer still lists it. That’s the list on the right, with everything you’ve placed. Click it there.
Blocks From Later Chapters
Leave these until a card shows them. From Chapter 3, GLOBAL VARIABLES are values the whole game shares, such as the width of the screen. On a card a Global has a $ in front, as in $areaWidth. 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 areaWidth. Type it without the $, and press Add.
From Chapter 6, a GAME SETTINGS path goes all the way down to Loading Groups, through a section and a fold that starts closed. Chapter 6 walks it, a step at a time. The last name in such a path is the group you make. Add Loading Group makes it, and its list that starts Add Scene, Object or Asset… adds each picture the card names. From Chapter 9, INPUT CONTEXTS group Commands that work together. They’re in the Input Manager too. Chapter 11 brings BACKGROUND blocks and a Background line on its SCENE: the sky’s layers. That chapter shows where they go.
Words on the screen are placed differently. They stay put on the screen, wherever the game’s world moves under them. Their X and Y go into Screen Offset (px), counted in pixels from the spot their Screen Anchor picks. That spot is one of nine, and a click in the preview places the words at the one nearest to it. So click near the spot the Object’s card names. The dots in its Properties show which one it took.
A placement marked hidden starts out of sight, so turn off Visible at Game Start. From Chapter 6, REMOVE THESE PLACEMENTS takes things out of the Scene: select each one and press Delete. CHANGE THESE PLACEMENTS changes what’s already there.
An Object Card and Its Components
An Object is a thing in your game: the Ship, an Asteroid, 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. Words on the screen are a Screen UI Object. Anything else, such as Game Rules and the Life Icons, is an Empty Object, and you attach what its card lists. This is the Ship, from Chapter 1.
X 2.4375, Y 3.0625Circle0.594Collide Only With20Ship SpriteX 2.4375, Y 3.062513.7529013.1251.719The 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. Collider gives it a shape, so it can touch things. Text / UI shows words, and UI Interaction makes it a piece of the screen’s layout. Transform is on every Object from the start. It 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, Tags under Data, and UI Interaction under Core. A Sprite asks for its picture first. Pick the card’s Sprite in the Add Sprite Component window, and press Add Sprite. Some come with the Object. A 2D Object already has its Collider, and a Screen UI Object its UI Interaction.
Select a component in the Attached Components, and its Properties open on the left, below the Object’s own. Those are the card’s lines, in order. Transform > Size under Sprite is the Sprite’s own size, in meters.
A new Collider’s Shape is a Box. Most things in this game make it a Circle, in the Collider’s Shape and Transform section. Its Radius is how far the circle reaches from the middle. No Shape line? Keep the Box. Above them, Collision has three buttons: Solid, Sensor and Off. A Collider that is a Sensor notices what it touches, and doesn’t push it. The Asteroids’ cards say Collision Sensor. With no Collision line, leave it as it starts.
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. In Chapter 1 the Ship’s list is empty. It touches nothing yet, and the Collider says so: Nothing listed: this Collider meets nothing. From Chapter 4, the list names a Tag, as Tagged Asteroid. Under Interactions, press Search to add… A window lists your Objects first, then your Tags, each as Tagged and its name. Pick the card’s.
From Chapter 4, 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. All three Asteroids wear the Tag Asteroid. A card gives it under Tags, as Object Tags Asteroid. 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. So tag the Asteroids before a Collider’s list names Tagged Asteroid.
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. A Text / UI’s Color is a swatch, as a Scene’s is. Here its picker’s HEX box holds eight characters, the last two for how see-through the color is. Type the card’s six. The color comes out solid.
A Screen UI Object’s card starts with Transform lines of its own. A new one is already at Presentation > Space Window / UI and Render Layer UI, with a Bounding Box of 32 by 32, so those lines need nothing typed.
Logic comes last on an Object card, and it isn’t in the toolbox. Switch the list at the top right to Logic. Under Compatible Logic, click each Logic Component the card names. It joins the Attached Logic. Each row there has a small switch near its left end, blue while it’s on. A Logic Component marked (turned off) starts the game switched off. Click its switch, so it turns gray.
From Chapter 5, a Logic Component may keep a Data Structure of its own, such as Ship Shield’s Ship Shield Data. Attaching that Logic adds the Data Structure to the Object too. The card shows it as a Data Structure line, From Logic Ship Shield. It’s already there, so there’s nothing to do.
The lines under Shared 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 Shared Variable the Logic gives this Object has its own rows: a name box, its Type, its Kind and its Value. Under them, a line says where it came from, such as From Logic: Rotate-and-thrust Controls. A card line such as turnSpeed 290 is that Value, so type the card’s number into it.
Those Value boxes keep three decimals, no more. The game you played was made with a few longer numbers, such as 1.71875 for coastDrag. The card gives each one as your box will keep it, 1.719. The difference is far too small to see.
Some Values are Objects. In Chapter 2, the Ship’s card gives shot Shot. That Value is a button that reads None until you press it and pick the Object. From Chapter 4, a Value may be a sound, such as an Asteroid’s breakSound. Pick it the same way. A Yes or No Value is a list, and the card’s Yes is Yes there.
From Chapter 3, a line may change a Variable’s Kind, as in maximumX > Kind Expression. Pick Expression in its Kind list. An Expression box takes the Value’s place. Type the card’s line there, as the card spells it: $areaWidth. An Expression works its value out from something else, here the width of the play area.
A Data Structure Card
A Data Structure is a small form of named fields. An Object carries one filled-in copy, and its Logic reads and changes the fields while the game runs. The Ship carries Ship Shield Data: one field that says whether the Ship is drawn faded right now. Here is its card, from Chapter 5.
Object Data of Logic "Ship Shield" (its state that lasts between Events).
Make one with Add > Data Structure. The Create Data Structure window asks only for its Name, so type the card’s. 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 Boolean is 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 Data Structure whose name ends in Entry, such as Chapter 6’s Asteroid Materials 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.
A Logic Component Card
A Logic Component is a piece of behavior you attach to an Object: how the Ship’s gun fires, 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 Shot a little while after it’s fired.
A Shot disappears lifeSeconds after it is fired.
Any Object- Timer Name
shotLife- Repeat Every (s)
@self.lifeSeconds- Ring Once
Yes
The 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. Type the Description there, if you like. The game never reads it, but you will, months from now.
SHARED VARIABLES are values this Logic keeps on each Object it’s attached to, and each Object can set its own, as the Ship’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.lifeSeconds.
From Chapter 5, DATA STRUCTURES name the Data Structure this Logic keeps on its Object. Make the Data Structure first, from its card. Then press the + on Data Structures, and pick it under Existing Data Structures. Myth gives it a name of its own, and the card’s row shows it: Ship Shield Data self.shipShieldData. The Logic reads every field through that name, as self.shipShieldData.isFaded.
In Chapter 8, COMPONENTS name a component of the Object that this Logic changes, such as self.collider Collider. Press the + on Components, and pick Collider under Component types. The row then reads self.collider.
The rest of the card is its Events, each with its Actions. The passages after the next one are about those.
A Logic Component That Comes Built In
Five of this game’s Logic Components come whole from Myth Engine: Rotate-and-thrust Controls, Wrap Around World, Motion Facing, Random Teleport and Menu Pause Lifecycle. Their card says so. Here’s the one that carries the Ship across the edges, so it comes back on the other side.
An Object that leaves the screen comes back at the opposite edge, drawn across the edge while it passes.
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. Wrap Around World, Motion Facing and Random Teleport are in the Movement group, Rotate-and-thrust Controls under Controls, and Menu Pause 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 their values on the Object card.
Rotate-and-thrust Controls brings one more thing with it. It adds a Command of the same name to the Input Manager, with its keys already bound. Chapter 1’s Set up card lists that Command, so you can check 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 On the Shot Life Timer. That’s the name Myth gives the Event itself, so 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 or a Global Variable. 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. A Timer name is one you make up, so the list can’t hold it. Choose Type a timer name… there, and type the card’s name into the small window that comes next.
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.
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: Mode: Coasting (Starting Mode). A card shows such an Event once for each of its Modes, each time with the same heading and When bar. Two headings alike are one Event with two Modes, and the first such Event is Thrust Feedback’s, in Chapter 1.
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…, and type 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. Every Event in this game stays on One at a time, as it starts, so one Mode answers at a time. The card marks the one it starts with, (Starting Mode), and you pick that one in the block’s Starting Mode list.
Switch Mode changes which Mode answers, while the game runs. Its block picks an Event and a Mode from two lists. The Event list starts on Current Event. Pick the Event the card names, even when it’s the Event the block is in. The list gives each Event by its name. The Object that carries it follows, after a dot. While the Logic Component isn’t on an Object yet, its own name stands there instead. Then the Mode list holds that Event’s Modes. So make the Event and its Modes before the Switch Mode that picks them.
From Chapter 4, a When bar may name an Object for a collision, as Object: tag:Asteroid. Collision Enter asks for nothing in the second window. Its 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. Pick Tagged Asteroid, 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 other, the Object this one touched, and a card’s Applies To other means that one.
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 hit. 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, or its own when the card names none. The card always says which.
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 a little to one side, apart from the line, with no arrow into it. A block like that does nothing when the game runs. So right-click it and choose Connect to sequence. It joins the end of the line, right above End, and an arrow runs to it. Join each Action as you add it.
When an Event has several Modes, each Mode has a line of its own. To add an Action to one of them, right-click that Mode’s block, or a block on its line, and choose Add unattached Action here. A window opens with the Actions in it. Pick one and press OK. Its block lands near that line, and Connect to sequence joins it there.
Fill in the fields the card lists. Each field is a small box or list 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 perBandThisWave is a value this Logic made for itself, or a Function’s Parameter. A $ in front marks a Global Variable, as in $score, and an @ a Shared Variable, as in @self.lifeSeconds. Most boxes read what you type as a small formula. In those, a word needs quotes, so the card gives it with them. Where a card says "EXTRA SHIP", type it with its quotes. Without them the box reads the words 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 formula such as "" + points has its own quotes, inside it.
A few boxes take a name as it is: a Timer Name and a Custom Event. The card gives those bare, as shotLife. Type them bare too. Once you’re done, the block may draw a Timer Name between quote marks, as “shotLife”. That’s only how it shows a name. Leave it.
Some fields are lists, not boxes: Applies To, a sound, a clip, 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 “Thrust”, pick Thrust. A Yes or No list takes the card’s Yes or No. In a Function, the card writes it true or false, but it’s the same list. True is Yes.
A pick in a list takes the place of the whole value, so a sound named in two words, such as Ship Explosion, is one pick.
Later cards sometimes put a new step between old ones. To put a block between two others, click the round handle at the bottom of the block it should follow. Then click the round handle at the top of the new block. To put it first, start from the Mode’s block, which has a bottom handle too. The handles also move a block that’s already joined, while Connect to sequence only adds to the end. The handles join blocks of one panel only. So between two blocks inside an If’s or a Repeat’s panel, add the new block with that block’s own Add inside item first.
A Change Variable reads Set on its block: its Variable, an =, and its Value. The Value replaces what the Variable held. Its Variable box takes the name as the card writes it, $ and @ and all. A card’s Change Variable may have an Operator line. With +=, the Value is added on, and with -=, it’s taken away. Click the = on the block, and a list opens: = · Set, += · Add, -= · Subtract, *= · Multiply and /= · Divide. Pick the card’s, then type its Value. No Operator line on the card? Then the = stays as it is, and the Value goes in exactly as the card writes it.
From Chapter 6, an Event can make a value of its own for one run, with Declare Variable. Its block has a Type list, a Name and a Value. The Type starts at Number. Every one in this game stays there. After that, the card names the value plainly, as waveSpeedUp. When the Event’s Actions finish, it’s gone, and the next run makes it again.
From Chapter 5, Change Component Value changes one field of a Data Structure, the one its Component Value path names. Type the path as the card spells it. The path self.shipShieldData.isFaded is the isFaded field of the Ship Shield Data the Ship carries.
Some Actions have an Applies To line, naming the Object the Action works on. On the block, Applies To is a list after the word on, and it starts on Self, the Object this Logic is attached to. 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 the Logic’s own Object Variables, as @self.banner. In a Function, the list holds its Object Parameters, such as creator.
Create Instance makes a new Object while the game runs. Its Object to Create names what kind. In a Logic Component, it’s one of the Logic’s own Object Variables, as @self.shot. In a Function, it’s one of the Function’s Object Parameters, as asteroid. Its Created As box names what it made, such as newShot, and the Actions after it reach the new Object by that name. Each Action you add after a Create Instance starts with its Applies To on that name. When the card has no Applies To line, pick Self there.
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. Type the card’s name over it, with no quotes. A later Action reads the answer by that name. isGunReady.value is the answer a Check Cooldown Ready gave, true or false.
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, and its fields are the Function’s Parameters, by their names. An Object Parameter’s field is a list. A new call starts it on self, so creator self needs nothing at all. The list also holds the Logic’s own Object Variables, such as @self.asteroid. Pick the card’s there. The other fields are boxes, and you type their values as the card gives them.
If, Else and Repeat
An If runs some Actions only when its condition is true. It’s in the Action List’s Logic group, with Repeat. 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 line with Connect to sequence, like any block.
Its condition is the one box on the If. The card gives it after the word If. Click the box, type it whole as the card spells it, such as edgeRoll.value == 0, and 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 join two tests, as the card does. && means and: both have to be true. || means or: one is enough. Type them into the same box.
To put a block on the True line, right-click the If and choose Add inside Then. A window opens with the Actions in it, and a filter at the top. Pick the Action and press OK. It lands under the If, 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. With one If inside another, right-click the If whose line the card’s step is on.
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 beside 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. Type the card’s count there, such as @self.fragments. Right-click the Repeat and choose Add inside Repeat for each Action in the panel, and join each one the same way.
The step numbers keep counting right through the panels, so step 6 may sit inside an If that began at step 5. The indent shows where each one belongs. 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.
A Function Card
A Function is a small piece of Logic that does one job when it’s asked: put a row of Asteroids along the edges, show one life icon. Make one with Add > Function, and give it the card’s name in the Create Function window. 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.
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, the card’s Starts at. A Parameter that is handed an Object, such as Show Life Icon’s icon, takes the Object at the very end of the Type list. There’s an Object higher up the list too, among the plain values. That one holds an Object’s name, the way a Number holds a number. Pick the one at the end.
Inside a Function, Applies To and Object to Create hold the Function’s Object Parameters, such as icon.
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: Asteroid Materials Entry. A new table makes that Data Structure itself, named after the table with Entry on the end. You’ll find it under Data 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. A Thing Sprite is the Sprite in its Type list, among the kinds that run from A to Z below the plain values. Its default is None.
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. The card counts rows from Row 0, and the editor numbers them from 1. So the card’s Row 0, named Standard, is the first row on your screen. A Sprite cell is a list. Click it, and pick the card’s Sprite.
A Particle Effect Card
A particle effect is a spray of tiny pictures, and this game has two: Impact Sparks and Ship Explosion. Make one with Add > Particle. The Create Particle window asks for a Name and a Starter, and the Starter stays on Blank Particle. You’ll find it 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 x and y, start and end are the small captions beside the boxes.
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, after the # that’s already there.
Glow is a slider. It moves in tenths, and the number beside it shows where it stops, such as 1.3×. The card gives Glow as that number reads. Drag until the two match. Starting Rotation holds one switch, Random Spin, and a card that says Random Spin On wants it switched on.
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. Green lines, marked Add, are new. Add them. Lines marked Delete, red and struck through, are gone: delete them. A block goes with a right-click, then Delete. A struck step sits right above the new steps that take its place. A step removed with nothing new in its place is struck where it stood, and keeps its old number. When a step stays and only one of its values changes, its new value is green, with the old one struck beside it. New steps push the numbers after them along. So an old step may show a bigger number than before.
When an Event’s When bar is struck, with a new one in green above it, the Event changes. If only its Object changes, as Shot Impact’s does in Chapter 8, pick the new one in its Collision Target list. If its kind changes, right-click the Event’s block and choose Change Event…. Pick the new kind, and a window asks Change Event? Press Change Event. Its Modes and their Actions stay. On an Object’s Changes card, a Logic Component may show only (turned off) in green. It stays attached, so click its switch. Everything else is already there. This one gives the Ship its gun in Chapter 2.
X 2.4375, Y 3.0625Circle0.594Collide Only With20Ship SpriteX 2.4375, Y 3.062513.7529013.1251.719ShotIf 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. A Mode that never answers? Look at the Event’s Starting Mode, and at the Switch Modes that should turn it on.
Every chapter’s Goal offers that chapter’s finished game as a download. It’s a zip. Save your own project first. Then unzip the download, as its button says, and open the .mythproj file inside with File > Open Project…. Myth shows one project at a time, so the download takes your project’s place for a while. The OFL.txt beside it is the license of the game’s font. That font has two names. The button gives the typeface’s own, Press Start 2P. In your project and on the cards, it’s the Arcade HUD Font.
Look at the piece that misbehaves. Go down it line by line, and note where it differs from yours. The download’s canvases hold a few things yours won’t. Green notes, comments, sit beside the blocks. A Repeat may come folded, with a small arrow at its left end. Click the arrow, and its blocks show. None of it changes how the game plays.
File > Open Recent brings your own project back, ready to fix, or you can start the next chapter from the download. It carries the whole Starter Kit, the way your own project does, so there’s nothing to install first. Nothing you built is wasted, because now you know where everything goes.
Chapter 1 starts with one Ship on a dark, empty screen.
