<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cecelia Martinez</title>
    <description>The latest articles on DEV Community by Cecelia Martinez (@ceceliacreates).</description>
    <link>https://dev.to/ceceliacreates</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F149628%2F7d1d05dc-987a-4a75-99f7-a96f8a01c99c.png</url>
      <title>DEV Community: Cecelia Martinez</title>
      <link>https://dev.to/ceceliacreates</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ceceliacreates"/>
    <language>en</language>
    <item>
      <title>Five Questions to Ask Before Launching a Developer Community Program</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Wed, 04 Dec 2024 13:37:50 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/five-questions-to-ask-before-launching-a-developer-community-program-17fj</link>
      <guid>https://dev.to/ceceliacreates/five-questions-to-ask-before-launching-a-developer-community-program-17fj</guid>
      <description>&lt;p&gt;Building a developer community isn't just about creating a space—it's about creating the &lt;em&gt;right&lt;/em&gt; space. Before diving in, you need to ask yourself some fundamental questions that will shape your entire community strategy. Whether you are an establish developer brand or looking to get the word out about your brand-new devtool,  consider these critical questions before building a new community program.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do You Want to Grow Your Community by Attracting New Developers or by Engaging with Your Existing Developers?&lt;/li&gt;
&lt;li&gt;Do You Have Non-Developers in Your Community, and If So, Will They Be Included?&lt;/li&gt;
&lt;li&gt;Do You Know What Your Developers Need from a Community?&lt;/li&gt;
&lt;li&gt;What Are the Business Motivations for Investing in Community?&lt;/li&gt;
&lt;li&gt;What Expertise Is Needed to Do the Best First Thing?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Do You Want to Grow Your Community by Attracting New Developers or by Engaging with Your Existing Developers?
&lt;/h2&gt;

&lt;p&gt;First, clarify your primary goal. Are you looking to expand your developer base by attracting new users, or are you focusing on deepening relationships with your existing developers? Each approach requires a different strategy and set of tactics.&lt;/p&gt;

&lt;p&gt;For example, programs designed to bring in new developers may include hackathons and coding challenges that introduce developers to your platform, OSS contribution programs, beginner-level onboarding resources, or partnering with existing meetups and events.&lt;/p&gt;

&lt;p&gt;Meanwhile, programs for an existing community may focus on user groups, peer mentorship networks, dedicated community support channels, or recognition programs for developer achievements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do You Have Non-Developers in Your Community, and If So, Will They Be Included?
&lt;/h2&gt;

&lt;p&gt;Developers rarely work in isolation. Consider your broader community ecosystem. Do you have non-developers who interact with your platform? If so, determine whether they'll be integrated into your community program or require a separate approach. &lt;/p&gt;

&lt;p&gt;When I was Community Lead at Replay, our bug recorder was used by developers, but also customer support teams, QA/testing teams, and product managers.&lt;/p&gt;

&lt;p&gt;Inclusivity can be a powerful community enabler. The goal isn't just to tolerate non-developers but to actively create value for them. This approach transforms your community from a narrow technical forum into a broad ecosystem where different types of tech professionals can learn, collaborate, and grow together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do You Know What Your Developers Need from a Community?
&lt;/h2&gt;

&lt;p&gt;This is crucial: Truly understanding your developers' needs requires deep investigation. Don't rely on assumptions—dig deeper. Your roadmap should emerge from genuine developer insights based on a combination of different research methods.&lt;/p&gt;

&lt;p&gt;First and foremost, talk to your developers! If for some reason your developers aren’t accessible, connect with your Customer Success and Support team for their insights. It’s also important to identify needs that developers aren’t able to communicate. Analyzing support tickets, user sentiment, and product usage data can offer insights here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify key needs like:

&lt;ul&gt;
&lt;li&gt;Product improvements&lt;/li&gt;
&lt;li&gt;Educational resources&lt;/li&gt;
&lt;li&gt;Technical support&lt;/li&gt;
&lt;li&gt;Professional networking opportunities&lt;/li&gt;
&lt;li&gt;Recognition for their contributions&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Understanding what your developers need will dictate which community programs to prioritize. &lt;/p&gt;

&lt;h2&gt;
  
  
  What Are the Business Motivations for Investing in Community?
&lt;/h2&gt;

&lt;p&gt;Every community investment needs a clear purpose. While it may feel good as a company to grow a thriving community, ultimately it’s important that community programs tie back to business goals. The last thing you want is to disappoint your community by starting a program only to discontinue it due to lack of leadership sponsorship.&lt;/p&gt;

&lt;p&gt;Different community programs may align with business goals across the developer journey. Attracting new developers for may support user growth goals, while recognition programs for super users typically align with goals around referrals and expansion. Your business goals may be more product-oriented, focused on gaining critical insights from early users as you establish product-market fit. Or, you may need to alleviate workload from overwhelmed support teams by establishing community forums. &lt;/p&gt;

&lt;p&gt;The most successful communities align their structure, content, and engagement directly with core business objectives. This will ensure the long-term success of your community programs and establish community trust. If you aren’t familiar with business goals at your organization, check out this blog post about Business Jargon for Dev-Rel.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Expertise Is Needed to Do the Best First Thing?
&lt;/h2&gt;

&lt;p&gt;Launching a developer community isn't just about good intentions—it requires specialized skills and strategic thinking. Consider the expertise needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Community management professionals who understand developer workflows and though processes&lt;/li&gt;
&lt;li&gt;Technical experts who can create meaningful content and facilitate discussions&lt;/li&gt;
&lt;li&gt;Data analysts who can measure community impact and engagement&lt;/li&gt;
&lt;li&gt;Cross-functional team members who can bridge technical and business perspectives&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes this means hiring dedicated community leads, sometimes it means training existing team members, and sometimes it involves bringing in external consultants who deeply understand developer relations.&lt;/p&gt;

&lt;p&gt;Community building is both an art and a science, but it’s important to pause and thoughtfully consider these five questions to turn vague aspirations into and effective strategy. The most powerful developer communities aren't accidents—they're carefully crafted to provide genuine value, foster meaningful connections, and create mutual growth opportunities for both the platform and its developers. Start with curiosity, listen intently, and remain committed to creating a space where developers don't just interact, but truly belong.&lt;/p&gt;

</description>
      <category>devrel</category>
      <category>community</category>
    </item>
    <item>
      <title>Learn basic SQL concepts using visual low-code</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Mon, 29 Jul 2024 19:53:41 +0000</pubDate>
      <link>https://dev.to/outsystems/learn-basic-sql-concepts-using-visual-low-code-34kf</link>
      <guid>https://dev.to/outsystems/learn-basic-sql-concepts-using-visual-low-code-34kf</guid>
      <description>&lt;p&gt;SQL concepts are not always the easiest to learn – I know I’ve struggled with crafting queries and defining schemas myself! For some developers, it can be easier to understand SQL concepts visually. This is why I recommend using OutSystems – a visual, low-code platform – to help you learn common SQL concepts.&lt;/p&gt;

&lt;p&gt;If you think that &lt;a href="https://www.outsystems.com/tech-hub/low-code/" rel="noopener noreferrer"&gt;low-code&lt;/a&gt; is only for non-developers, think again! I was surprised to discover just how much engineering knowledge is required to build quality apps in OutSystems. The good news is that OutSystems removes the tedium of &lt;a href="https://www.outsystems.com/tech-hub/app-dev/" rel="noopener noreferrer"&gt;app development&lt;/a&gt; (think framework configuration, remembering syntax quirks, and repetitive boilerplate), so you can focus on making strategic technical decisions to build the right app for your users.&lt;/p&gt;

&lt;p&gt;Under the hood, OutSystems uses SQL. This means that there is a direct relationship between the low-code data concepts in OutSystems and SQL. In this post, we’ll show examples based on a sample events platform application. If you’d like to build along, &lt;a href="https://www.outsystems.com/Platform/Signup/?utm_source=dev-to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=dev-to-2024&amp;amp;utm_term=none&amp;amp;utm_content=personal-environment&amp;amp;utm_campaignteam=community&amp;amp;utm_partner=none" rel="noopener noreferrer"&gt;create a free OutSystems account&lt;/a&gt;, set up a personal environment, and install the development environment, Service Studio. (&lt;a href="https://success.outsystems.com/documentation/11/getting_started/" rel="noopener noreferrer"&gt;Check out the Getting Started guide here.&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Concepts in OutSystems
&lt;/h2&gt;

&lt;p&gt;To better understand SQL concepts, we’ll take a look at the corresponding data concepts in OutSystems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Entities

&lt;ul&gt;
&lt;li&gt;Creating an Entity&lt;/li&gt;
&lt;li&gt;Relationships&lt;/li&gt;
&lt;li&gt;Static Entities&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Bootstrapping Data&lt;/li&gt;

&lt;li&gt;

Displaying Data on Screens

&lt;ul&gt;
&lt;li&gt;Drag-and-Drop&lt;/li&gt;
&lt;li&gt;Queries with Aggregates&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;CRUD Operations&lt;/li&gt;

&lt;li&gt;Next Steps&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Entities
&lt;/h2&gt;

&lt;p&gt;We’ll start with the building block of data in OutSystems: Entities. An entity represents an object that corresponds to a business concept for your app. For example, an e-commerce app may have Products, Orders, and Customers. Each of these could be an entity in OutSystems.&lt;/p&gt;

&lt;p&gt;In SQL, this corresponds to a table. When you visually create an entity in OutSystems, a SQL table is created.&lt;/p&gt;

&lt;p&gt;Each entity has attributes, or properties, that contain additional information about the entity. These correspond to the concept of columns in SQL. Attributes must have a set Data Type, which can either be a primitive type like Text or Integer, or a reference to another entity. Attributes can be set to mandatory if needed.&lt;/p&gt;

&lt;p&gt;The best way to understand entities and relationships is to see them visually represented in OutSystems, so let's create our first entity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating an entity
&lt;/h3&gt;

&lt;p&gt;Everything related to the data of your application is accessible from the “Data” tab in Service Studio. Here you see a folder named “Entities.” Right-click and select “Add entity to Database” to get started. We’ll name our first entity “Event.” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbph9d676ktiomyltebmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbph9d676ktiomyltebmm.png" alt="Creating an entity" width="372" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This creates a new table where we can define our entity attributes. By expanding the arrow next to our new entity, you’ll see a default Id attribute, as well as some built-in CRUD methods. (We’ll get to those later!)&lt;/p&gt;

&lt;p&gt;Now you can right-click the entity and select “Add Entity Attribute.” We’ll add the attributes, or columns, and make sure each attribute has the correct data type. OutSystems infers the data type for you based on the name, but you can adjust that if needed. You can also mark if the attribute should be mandatory.&lt;/p&gt;

&lt;p&gt;Here is our “Event” entity, with attributes for Title, Description, Date, StartTime, and EndTime.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5esi51ue2n074qn9nbux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5esi51ue2n074qn9nbux.png" alt="Event entity attributes" width="372" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the new entity, you can see that the Id attribute has a red icon. This indicates that the Id is the Entity Identifier. This is the same as the concept of a primary key in SQL. The entity attribute or primary key uniquely identifies each record in a table.&lt;/p&gt;

&lt;p&gt;Let’s repeat this process and create a “Venue” entity, with attributes for Name, Address, City, State, ZipCode (all with a text data type) and AllAges (a boolean).&lt;/p&gt;

&lt;h3&gt;
  
  
  Relationships
&lt;/h3&gt;

&lt;p&gt;Every event needs to have a venue. We can demonstrate this relationship by adding an attribute to “Event” that references a specific “VenueId.” This is called a Reference Attribute, and you’ll see that the data type is automatically inferred as “Venue Identifier” by OutSystems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xpf2v6nffhcuyftw3zc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xpf2v6nffhcuyftw3zc.png" alt="Venue id attribute" width="382" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In SQL, this is like adding a foreign key column to a table that references the primary key of another table. In this case, our Event entity is like the child table. The VenueId attribute on the Event entity is like a foreign key that references the primary key of the Venue entity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Static entities
&lt;/h3&gt;

&lt;p&gt;Static entities are read-only and are useful for holding predefined values that will not change. These are like static tables in SQL, and some examples could be role types, categories, or levels of priority. For our event app, each event should have an event type, but we want these to be predefined from the outset as either “meetup” or “workshop.”&lt;/p&gt;

&lt;p&gt;So, we’ll create a static entity. Right click on the entities folder again and select “Add Static Entity to Database.. Name it “EventType,” then right-click the Records folder and add two records, one for each of our event categories. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv2tlirvwwioogn65avk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv2tlirvwwioogn65avk.png" alt="static entity records" width="382" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because static entities are read-only, which means developers can add new records in the future, users will not be able to update it from your app. We can add an entity attribute to “Event” called “EventTypeId” that references our new static entity. This is exactly what we just did for VenueId.&lt;/p&gt;

&lt;p&gt;Now that we have entities defined, we can start adding data to our app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrapping data
&lt;/h2&gt;

&lt;p&gt;OutSystems enables you to manipulate data records in Service Studio. Simply double-click any entity to view, edit, and create new rows. But, the easiest way to set your app up with initial data is using the spreadsheet upload option. OutSystems will automatically map your columns in Excel to the attributes in your entity and add the rows for you.&lt;/p&gt;

&lt;p&gt;I’ve generated some fake venues to populate our Venue entity and get our app started. To upload, right-click on the Venue entity, navigate to “Advanced,” and then “Create Action to Bootstrap Data from Excel.” &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flfb9iq974g2xsrmg2gn8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flfb9iq974g2xsrmg2gn8.png" alt="spreadsheet upload option to bootstrap data" width="635" height="722"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Confirm the mappings, click the green Publish button, and you’ll now be able to see the rows populated by double-clicking on the Venue entity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1f6mtgbp1mi81om7v1q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1f6mtgbp1mi81om7v1q.png" alt="Venue data" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have some data, let’s do something with it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Displaying data on screens
&lt;/h2&gt;

&lt;p&gt;We won’t get into building user interfaces too much in this post. However, I do want to demonstrate the relationship between your data model and the UI, as well as how easy it is to generate a visual representation of your data for your app’s end users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Drag-and-drop
&lt;/h3&gt;

&lt;p&gt;OutSystems can automatically generate screens (as in pages) based on your data model. This has been a game changer for me coming from traditional code, where scaffolding out pages was some of the most tedious parts of building an app from scratch.&lt;/p&gt;

&lt;p&gt;First, navigate to the Interface tab in Service Studio. You’ll see an expanded UI Flows folder with a “MainFlow” inside. Again, we’ll explain more about UI in OutSystems in the future, but for now double-click where it says “MainFlow.” This will update the main window in Service Studio with instructions prompting you to “Drag and drop a screen or entity to create a screen.”&lt;/p&gt;

&lt;p&gt;We’ll do the second option! Click back to the Data tab, click and hold the Venue entity in the list, and drag it onto the screen.&lt;/p&gt;

&lt;p&gt;Double-click on the newly-created Venues screen. In the bottom half of the right sidebar, check the “Anonymous” option under Roles. This will let you view the screen in your browser without logging in to the application. (Note: This is only recommended for sample apps, for security reasons, it’s best to require users to log in for production.)&lt;/p&gt;

&lt;p&gt;Click the green Publish button, and then “Open in browser” once the button changes to blue.&lt;/p&gt;

&lt;p&gt;In the browser, we can see our Venues list populated with the data! OutSystems creates the UI components to display, search, and even paginate data. &lt;/p&gt;

&lt;p&gt;Back in Service Studio, check “Anonymous” under Roles for the VenueDetail screen, just like we did for the Venues screen. Publish again and open in the browser. Now, click on either the “Add Venue” button or the name of any venue in our list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gpylhqqe63fwxmvw217.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gpylhqqe63fwxmvw217.png" alt="Form to add new venue" width="654" height="805"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the UI for editing existing and adding new venues. No more repetitive building of forms over and over! OutSystems even handles built-in form validation based on your data model, enforcing types, and mandatory fields.&lt;/p&gt;

&lt;h3&gt;
  
  
  Queries with aggregates
&lt;/h3&gt;

&lt;p&gt;OutSystems uses what’s called Aggregates to create these screens. Aggregates are optimized SQL queries for fetching data from the database. If you expand the arrow next to the VenueDetail screen in the Interface tab, you’ll see a “GetVenueById” item with a grid icon. This is the aggregate we are using to query for the specific venue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtvtyppsavg0knm8c48m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtvtyppsavg0knm8c48m.png" alt="Get Venue By Id aggregate" width="384" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Double-clicking the aggregate opens a visual query editor. Here, you can explore the query sources, filters, and sorts. You can also set test data to validate the query returns what you expect. I encourage you to adjust some of the different values to better understand the relationship between the query builder and your data.&lt;/p&gt;

&lt;p&gt;In the bottom of the right-sidebar, you can also see the executed SQL query generated by the aggregate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkqbl2vq1mkq9q144zqwc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkqbl2vq1mkq9q144zqwc.png" alt="Executed SQL query" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also get information about the returned query, such as how many items were returned. Let’s update the Venues list screen to display how many venues there are.&lt;/p&gt;

&lt;p&gt;Double-click the Venues screen to open the UI editor. In the left sidebar, you’ll see an option that says “Expression” with an x/y icon. Drag and drop this item right next to the title that says “Venue List” on the screen. This will open the Expression Editor.&lt;/p&gt;

&lt;p&gt;In the Expression Editor, the available data from your application is in a tree format. Expand the “GetVenues” aggregate and select “Count.” Use this &lt;code&gt;GetVenues.Count&lt;/code&gt; value to create an expression that shows the count value between parenthesis using JavaScript expression syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzxvgkn4ouzqn6vuuzax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzxvgkn4ouzqn6vuuzax.png" alt="Expression editor" width="758" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Publish again and you’ll see the count in the browser next to the title. Aggregates are very powerful, and can be used to perform more complex filtering, joins from multiple data sources, and even calculated queries that generate attributes such as sums or groups of data rows.&lt;/p&gt;

&lt;p&gt;Dig deeper into aggregates in &lt;a href="https://success.outsystems.com/documentation/11/reference/outsystems_language/data/handling_data/queries/aggregate/" rel="noopener noreferrer"&gt;the documentation here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  CRUD operations
&lt;/h2&gt;

&lt;p&gt;One other data feature of OutSystems that’s important to mention are the built-in CRUD operations for all entities. You may have noticed these when we first created our Event entity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmxpd5srfiup8ayxg6aq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsmxpd5srfiup8ayxg6aq.png" alt="built-in CRUD operations" width="372" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CRUD (Create, Read/Get, Update, and Delete) operations are standard operations for working with data in an application, and correspond to SQL operations. These are automatically generated by OutSystems and can be used in the business logic of your app. &lt;/p&gt;

&lt;p&gt;When we generated the Venues list and detail screens using our data model, OutSystems also created logic that uses these CRUD operations to add or update new venues to our database. We can trace this flow to see how the data moves across the full stack of our app.&lt;/p&gt;

&lt;p&gt;In the Venue Details screen, the “Save” button on our form has a click handler that runs “SaveDetail.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0q2bdsuk38dd7vwtfad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0q2bdsuk38dd7vwtfad.png" alt="Save Detail Action" width="384" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Digging into this “SaveDetail” Action (you can think of it like a client-side JavaScript function for now), we can see it leverages something called VenueCreateOrUpdate. Again, don’t worry too much about understanding this flow; the important thing to know is that our click handler calls a “function” SaveDetail, which then makes a call to our server using VenueCreateOrUpdate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5wsjbxstqk2wz2rapy9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5wsjbxstqk2wz2rapy9.png" alt="VenueCreateOrUpdate flow" width="450" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, on our server, within the “VenueCreateOrUpdate” action, OutSystems is using the built-in CreateOrUpdateEvent operation to actually write the change to our database. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf2l5ghz05y9m8gmz82w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf2l5ghz05y9m8gmz82w.png" alt="VenueCreateOrUpdate flow" width="452" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having a solid understanding of your data model and how it’s used across the OutSystems app is important to ensuring your app has a strong data foundation early on. You can view the relationships between your data entities at any time in the “Entity Diagrams” section of the Data tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmjyyvbbhhrj1orqimr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmjyyvbbhhrj1orqimr6.png" alt="Entity diagram" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This diagram represents the relationships between the different entities – or tables – in your database, as well as references between tables based on keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;This has been a crash course on learning basic SQL concepts using OutSystems! I encourage you to use the free OutSystems personal environment to create an app and explore these data concepts yourself. You can use &lt;a href="https://docs.google.com/spreadsheets/d/1wgyBxe1fRLjkTjRA7TbjKCxP4z4HdCk1/edit?usp=sharing&amp;amp;ouid=117149667962308628859&amp;amp;rtpof=true&amp;amp;sd=true" rel="noopener noreferrer"&gt;this Excel file with Venue data&lt;/a&gt;, or build something yourself from scratch!&lt;/p&gt;

</description>
      <category>sql</category>
      <category>lowcode</category>
      <category>database</category>
    </item>
    <item>
      <title>Study Notes: GitHub Foundations Certification Exam</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Tue, 16 Jul 2024 02:48:51 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/study-notes-github-foundations-certification-exam-3m2d</link>
      <guid>https://dev.to/ceceliacreates/study-notes-github-foundations-certification-exam-3m2d</guid>
      <description>&lt;p&gt;In February of this year I successfully passed the GitHub Foundations Certificate Exam. I have used GitHub for about five years and am a GitHub Star Alumni, so I felt fairly confident going into the study process. However, there were still some gaps in my knowledge and I wanted to be prepared.&lt;/p&gt;

&lt;p&gt;This post is a collection of links, resources, and my notes from the study process. Hopefully it is helpful to you for your own certification journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Study Approach

&lt;ul&gt;
&lt;li&gt;Exam Guide&lt;/li&gt;
&lt;li&gt;Microsoft GitHub Foundations Course&lt;/li&gt;
&lt;li&gt;Udemy Practice Exams&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Notes

&lt;ul&gt;
&lt;li&gt;Helpful Docs Links&lt;/li&gt;
&lt;li&gt;
Notes from Microsoft Course

&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Git terminology&lt;/li&gt;
&lt;li&gt;Git and GitHub&lt;/li&gt;
&lt;li&gt;Command Line commands&lt;/li&gt;
&lt;li&gt;Introduction to GitHub&lt;/li&gt;
&lt;li&gt;GitHub Flow&lt;/li&gt;
&lt;li&gt;GitHub Collaboration&lt;/li&gt;
&lt;li&gt;GitHub platform management&lt;/li&gt;
&lt;li&gt;Introduction to GitHub’s products&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Notes from Practice Test 1

&lt;ul&gt;
&lt;li&gt;General&lt;/li&gt;
&lt;li&gt;Access&lt;/li&gt;
&lt;li&gt;Codespaces&lt;/li&gt;
&lt;li&gt;Projects&lt;/li&gt;
&lt;li&gt;CodeOwners&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Notes from Practice Test 2&lt;/li&gt;

&lt;li&gt;Notes from Practice Test 3&lt;/li&gt;

&lt;li&gt;Notes from Practice Test 4&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Other Resources&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Study Approach
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Exam Guide
&lt;/h3&gt;

&lt;p&gt;To start, I reviewed the &lt;a href="https://assets.ctfassets.net/wfutmusr1t3h/1kmMx7AwI4qH8yIZgOmQlP/79e6ff1dfdee589d84a24dd763b1eef7/github-foundations-exam-study-guide__1_.pdf" rel="noopener noreferrer"&gt;Exam Guide&lt;/a&gt;. This guide has a detailed breakdown of the topics covered on the exam, as well as the percentage weights of the different domains. This was my strategy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review the topics underneath each domain&lt;/li&gt;
&lt;li&gt;Identify areas where I only had limited knowledge (marked in yellow) or little-to-no knowledge (marked in red)&lt;/li&gt;
&lt;li&gt;Assign a comfort level to each domain (red, yellow, or green) based on assumed knowledge of the topics&lt;/li&gt;
&lt;li&gt;Evaluate domain percentages to understand where to prioritize studying&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helped me to create a plan on what areas to focus on in preparation for the exam. If you’re curious, this was my personal breakdown before I began studying:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Domain 1: Introduction to Git and GitHub&lt;/strong&gt; (22%) (GREEN)

&lt;ul&gt;
&lt;li&gt;GitHub Entities (RED)&lt;/li&gt;
&lt;li&gt;GitHub Desktop (YELLOW)&lt;/li&gt;
&lt;li&gt;GitHub Mobile (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 2: Working with GitHub Repositories&lt;/strong&gt; (8%) (GREEN)

&lt;ul&gt;
&lt;li&gt;CODEOWNERS file (RED)&lt;/li&gt;
&lt;li&gt;Repo templates (YELLOW)&lt;/li&gt;
&lt;li&gt;Repo insights (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 3: Collaboration Features&lt;/strong&gt; (30%) (GREEN)

&lt;ul&gt;
&lt;li&gt;Issue forms (RED)&lt;/li&gt;
&lt;li&gt;CODEOWNERS file (RED)&lt;/li&gt;
&lt;li&gt;Discussions (YELLOW)&lt;/li&gt;
&lt;li&gt;Notifications (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 4: Modern Development&lt;/strong&gt; (13%) (YELLOW)

&lt;ul&gt;
&lt;li&gt;GitHub Codespaces (RED)&lt;/li&gt;
&lt;li&gt;GitHub Copilot (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 5: Project Management&lt;/strong&gt; (7%) (YELLOW)

&lt;ul&gt;
&lt;li&gt;Difference between Projects and Projects classic (RED)&lt;/li&gt;
&lt;li&gt;Configuration options (YELLOW)&lt;/li&gt;
&lt;li&gt;Template repos (YELLOW)&lt;/li&gt;
&lt;li&gt;Project workflows (YELLOW)&lt;/li&gt;
&lt;li&gt;Project insights (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 6: Privacy, Security, and Administration&lt;/strong&gt; (10%) (RED)

&lt;ul&gt;
&lt;li&gt;GitHub Administration (RED)&lt;/li&gt;
&lt;li&gt;Authentication and Security (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Domain 7: Benefits of the GitHub Community&lt;/strong&gt; (10%) (GREEN)

&lt;ul&gt;
&lt;li&gt;InnerSource (YELLOW)&lt;/li&gt;
&lt;li&gt;Everything else (GREEN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Microsoft GitHub Foundations Course
&lt;/h3&gt;

&lt;p&gt;There is a recommended free(!) &lt;a href="https://learn.microsoft.com/en-us/collections/o1njfe825p602p" rel="noopener noreferrer"&gt;Microsoft GitHub Foundations Course&lt;/a&gt;. I did start this course, but felt like a lot of the material covered things I already knew and I grew impatient 😅. However, I recommend it if you are starting fresh or more patient than I am!&lt;/p&gt;

&lt;p&gt;You can check out my notes from the sections of the course I did complete below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Udemy Practice Exams
&lt;/h3&gt;

&lt;p&gt;Instead, I decided to get &lt;a href="https://www.udemy.com/share/10ai5G3@UV57Ximv-JJZ48rTg7NgxR8zuYeLSFHAi5izPqLYv2uw8izs6I6HPCU5clzFfrcD/" rel="noopener noreferrer"&gt;this practice exam bundle on Udemy&lt;/a&gt;. Depending on how you prefer to study, this could be helpful for you. I actually passed the first practice exam, but had EXACTLY a 75%, and wanted to be more confident.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d81lbba54cv2sawsxyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d81lbba54cv2sawsxyg.png" alt="Screenshot of first practice test score breakdown" width="762" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The practice tests not only tell you what questions were correct, but had detailed notes explaining the answers with links to relevant documentation. I hand-wrote notes (transcribed below) for the questions I either got wrong or got correct but had guessed/wasn’t confident in my answer. &lt;/p&gt;

&lt;p&gt;Hand-writing the notes helped to reinforce the information in my brain. I also read through the linked docs and took extra notes to clarify what I thought would be important concepts. By the time I took the fourth practice exam, I scored a 93%. &lt;/p&gt;

&lt;p&gt;I ultimately passed my certification exam with a score of 90%.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhurxv1p024wldkia9gt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhurxv1p024wldkia9gt1.png" alt="screenshot of actual certification exam score report breakdown" width="385" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;p&gt;This section has raw notes from my studies. They are based on my individual learning, and should not be considered a comprehensive study guide because things I already knew are not included. However, they may be helpful for you. &lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Disclaimer: I took my exam in February, so some items may have changed since then! Always refer to the GitHub docs for the most up-to-date information.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Helpful Docs Links
&lt;/h3&gt;

&lt;p&gt;This is a list of links to areas of the GitHub docs I found helpful while studying.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/setting-base-permissions-for-an-organization" rel="noopener noreferrer"&gt;Base Permissions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/copilot" rel="noopener noreferrer"&gt;CoPilot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project" rel="noopener noreferrer"&gt;Automating Projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/using-workflows/about-workflows#workflow-basics" rel="noopener noreferrer"&gt;Workflow Basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/enterprise-server@3.11/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed" rel="noopener noreferrer"&gt;Organization News Feed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/best-practices-for-projects" rel="noopener noreferrer"&gt;Best Practices for Projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/code-security/getting-started/github-security-features" rel="noopener noreferrer"&gt;GitHub Security Features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates" rel="noopener noreferrer"&gt;Issue and pull request templates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/issues/planning-and-tracking-with-projects/viewing-insights-from-your-project/about-insights-for-projects" rel="noopener noreferrer"&gt;Project insights&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Projects vs Projects Classic: 

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects" rel="noopener noreferrer"&gt;Projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards" rel="noopener noreferrer"&gt;Projects Classic&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches" rel="noopener noreferrer"&gt;Branch protection rules&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/best-practices-for-repositories" rel="noopener noreferrer"&gt;Best Practices for Repositories&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="https://docs.github.com/en/sponsors/receiving-sponsorships-through-github-sponsors/about-github-sponsors-for-open-source-contributors" rel="noopener noreferrer"&gt;GitHub Sponsors&lt;/a&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes from Microsoft Course
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Git
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;VCS - version control system&lt;/li&gt;
&lt;li&gt;SCM - software configuration management system&lt;/li&gt;
&lt;li&gt;VSC can exist for not-software, VSC is one component of a SCM&lt;/li&gt;
&lt;li&gt;Git is &lt;em&gt;distributed&lt;/em&gt;, meaning project history is stored locally and remotely

&lt;ul&gt;
&lt;li&gt;This is as opposed to &lt;em&gt;centralized,&lt;/em&gt; where all project history in only stored on centralized server&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Git terminology
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Working tree - set of nested directories and files that contain the project&lt;/li&gt;
&lt;li&gt;Repository - The top-level directory of a working tree where history and metadata is stored

&lt;ul&gt;
&lt;li&gt;Bare repo - isn’t part of a working tree, used for sharing/backup (project.git)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Hash - number produced by hash function that represents the contents of a file, used to determine if a file has been changed&lt;/li&gt;

&lt;li&gt;Object - Git repo contains four types of objects, each identified by a SHA-1 hash.

&lt;ul&gt;
&lt;li&gt;Blob - contains ordinary file&lt;/li&gt;
&lt;li&gt;Tree - represents a directory, contains names, hashes, and permissions&lt;/li&gt;
&lt;li&gt;Commit - represents specific version of the working tree&lt;/li&gt;
&lt;li&gt;Tag - a name attached to a commit&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Commit - either an object (commit) or a verb meaning to make a commit object&lt;/li&gt;

&lt;li&gt;Branch - a named series of linked commits

&lt;ul&gt;
&lt;li&gt;Head - Most recent commit on a branch&lt;/li&gt;
&lt;li&gt;Main/master - default branch of a repo&lt;/li&gt;
&lt;li&gt;Allow developers to work independently and then merge changes into default branch&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Remote - named reference to another Git repo

&lt;ul&gt;
&lt;li&gt;Origin - the default remote for push and pull operations created when repo is initialized&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Git (command) push (subcommand) —hard (option)&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Git and GitHub
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Git is a DVCS (distributed version control system)&lt;/li&gt;
&lt;li&gt;GitHub is a cloud platform that uses Git as its core technology and acts as the remote repository&lt;/li&gt;
&lt;li&gt;Git can also be described as a CLI for managing version history locally&lt;/li&gt;
&lt;li&gt;GitHub can also be described as a place to collaborate on shared repositories with issues and pull requests&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Command Line commands
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;git config

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git config —global user.name “USER_NAME”&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config —list&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;git init&lt;/li&gt;

&lt;li&gt;git status&lt;/li&gt;

&lt;li&gt;git add (staging)&lt;/li&gt;

&lt;li&gt;git commit&lt;/li&gt;

&lt;li&gt;git log&lt;/li&gt;

&lt;li&gt;git help

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git &amp;lt;command&amp;gt; —help&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;git checkout -b branchName&lt;/code&gt; is the best way to create and check out a new branch&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Introduction to GitHub
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;How to create a repository&lt;/li&gt;
&lt;li&gt;How to add a file to your repository

&lt;ul&gt;
&lt;li&gt;Manually in GitHub UI adding file in directory, then typing content, and committing changes directly to a new pull request branch&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Gists

&lt;ul&gt;
&lt;li&gt;simplified way to share code snippets. Every gist is a Git repo so it can be forked and cloned.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Wiki

&lt;ul&gt;
&lt;li&gt;Documentation section included with every GitHub repo&lt;/li&gt;
&lt;li&gt;Used to share long-form content beyond the README&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  GitHub Flow
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Branches&lt;/li&gt;
&lt;li&gt;Commits

&lt;ul&gt;
&lt;li&gt;Every commit has a unique ID and tracks the time and contributor&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;States for a file in a repo:

&lt;ul&gt;
&lt;li&gt;Untracked - Git unaware of its existence&lt;/li&gt;
&lt;li&gt;Tracked - can be one of the following substates:

&lt;ul&gt;
&lt;li&gt;Unmodified&lt;/li&gt;
&lt;li&gt;Modified&lt;/li&gt;
&lt;li&gt;Staged&lt;/li&gt;
&lt;li&gt;Committed&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Pull requests

&lt;ul&gt;
&lt;li&gt;Signals commits from one branch are ready to be merged into another&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub Flow

&lt;ul&gt;
&lt;li&gt;Creating a branch&lt;/li&gt;
&lt;li&gt;Make changes

&lt;ul&gt;
&lt;li&gt;Deploy changes to feature branch to ensure they work in productIon (recommended)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Create a pull request&lt;/li&gt;

&lt;li&gt;Reviewing and implement feedback&lt;/li&gt;

&lt;li&gt;Approve and merge PR into main branch&lt;/li&gt;

&lt;li&gt;Delete branch&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  GitHub Collaboration
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Issues

&lt;ul&gt;
&lt;li&gt;Track ideas, feedback, tasks, or bugs&lt;/li&gt;
&lt;li&gt;Can be created from repo, item in task list, note in project, comment in an issue or PR, specific line of code, URL query&lt;/li&gt;
&lt;li&gt;Only maintainers can assign, add to project board, associate with milestone, or apply a label&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Discussions

&lt;ul&gt;
&lt;li&gt;For conversations accessible to everyone that aren’t related to code&lt;/li&gt;
&lt;li&gt;Enable Discussions in Settings &amp;gt; Features &amp;gt; Discussions&lt;/li&gt;
&lt;li&gt;Any authenticated user with view access can create a discussion in that repo&lt;/li&gt;
&lt;li&gt;There are default categories, and more can be added with an emoji and name pairing&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  GitHub Platform Management
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Subscriptions and notifications&lt;/li&gt;
&lt;li&gt;GitHub Pages

&lt;ul&gt;
&lt;li&gt;Static site hosting service from files in a repo&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Introduction to GitHub’s products
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Personal accounts

&lt;ul&gt;
&lt;li&gt;Every person has a personal account&lt;/li&gt;
&lt;li&gt;Can be GitHub Free or Pro&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Organization accounts

&lt;ul&gt;
&lt;li&gt;Shared accounts for people to collaborate across many projects at once&lt;/li&gt;
&lt;li&gt;Permissions have a tiered approach&lt;/li&gt;
&lt;li&gt;Can’t sign into organization directly&lt;/li&gt;
&lt;li&gt;Personal accounts can be given roles in an organization&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Enterprise accounts

&lt;ul&gt;
&lt;li&gt;Allow admins to centrally manage policies and billing for multiple organizations and enable inner sourcing between orgs&lt;/li&gt;
&lt;li&gt;Must have a handle, like an organization&lt;/li&gt;
&lt;li&gt;Manage and enforce policies for all orgs in enterprise&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub teams

&lt;ul&gt;
&lt;li&gt;group of organization members intended to reflect company structure&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub plans

&lt;ul&gt;
&lt;li&gt;Free for personal and org&lt;/li&gt;
&lt;li&gt;Pro for personal&lt;/li&gt;
&lt;li&gt;Team for organizations&lt;/li&gt;
&lt;li&gt;Enterprise

&lt;ul&gt;
&lt;li&gt;Server (self-hosted)&lt;/li&gt;
&lt;li&gt;Cloud&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;GitHub Mobile

&lt;ul&gt;
&lt;li&gt;first-party client app&lt;/li&gt;
&lt;li&gt;Can’t approve or merge PRs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub Desktop&lt;/li&gt;

&lt;li&gt;GitHub billing is account based, includes subscription and usage-based billing&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes from Practice Test 1
&lt;/h3&gt;

&lt;p&gt;My notes for each subsequent practice test become less detailed, as I learned more with each exam.&lt;/p&gt;

&lt;h4&gt;
  
  
  General
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;cloning = copying ENTIRE repo&lt;/li&gt;
&lt;li&gt;forking = create private copy for personal use&lt;/li&gt;
&lt;li&gt;template repos can have any files or content&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reason:&lt;/code&gt; is a way to filter notification (such as searing for only at-mentions)&lt;/li&gt;
&lt;li&gt;Tabs on a PR: Conversation, Commits, Checks, Files changed&lt;/li&gt;
&lt;li&gt;Can create branch directly from an issue&lt;/li&gt;
&lt;li&gt;Repo insights show traffic, projects, and contributor engagement&lt;/li&gt;
&lt;li&gt;GitHub topics examples: repo purpose, subject area, affinity groups, community, language, etc.

&lt;ul&gt;
&lt;li&gt;labels that create subject-based connections between repos&lt;/li&gt;
&lt;li&gt;Discover similar projects based on topic&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Code scanning available on public repos, private requires GitHub Enterprise Cloud with Advanced Security&lt;/li&gt;

&lt;li&gt;Copilot analyzes current and related files for context&lt;/li&gt;

&lt;li&gt;GitHub limits sizes of files allowed in repos. Enable Git Large File Storage to track large files&lt;/li&gt;

&lt;li&gt;GitHub organizations have a news feed that shows:

&lt;ul&gt;
&lt;li&gt;Open/closed/merged issues and PRs&lt;/li&gt;
&lt;li&gt;creation/deletion of branches&lt;/li&gt;
&lt;li&gt;Created tag or release&lt;/li&gt;
&lt;li&gt;Comments&lt;/li&gt;
&lt;li&gt;New commits pushed&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Access
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;members of an org = create repos and project boards by default&lt;/li&gt;
&lt;li&gt;personal repo permission levels = owners &amp;amp; collaborators&lt;/li&gt;
&lt;li&gt;org owners can require members, collaborators, and billing managers to enable 2FA

&lt;ul&gt;
&lt;li&gt;If 2FA not enabled, they will be removed from org with no grace period&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub Enterprise repo visibility options: private, public, internal&lt;/li&gt;

&lt;li&gt;Organization repo roles:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read&lt;/strong&gt;: Recommended for non-code contributors who want to view or discuss your project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triage&lt;/strong&gt;: Recommended for contributors who need to proactively manage issues, discussions, and pull requests without write access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write&lt;/strong&gt;: Recommended for contributors who actively push to your project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain&lt;/strong&gt;: Recommended for project managers who need to manage the repository without access to sensitive or destructive actions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Admin&lt;/strong&gt;: Recommended for people who need full access to the project, including sensitive and destructive actions like managing security or deleting a repository&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Organization roles:

&lt;ul&gt;
&lt;li&gt;Owners: Organization owners have complete administrative access to your organization.  Should be limited but have at least two.&lt;/li&gt;
&lt;li&gt;Members: The default, non-administrative role for people in an organization is the organization member.&lt;/li&gt;
&lt;li&gt;Moderators: Moderators are organization members who, in addition to their permissions as members, are allowed to block and unblock non-member contributors, set interaction limits, and hide comments in public repositories owned by the organization.&lt;/li&gt;
&lt;li&gt;Billing managers: Billing managers are users who can manage the billing settings for your organization, such as payment information.&lt;/li&gt;
&lt;li&gt;Security managers: Security manager is an organization-level role that organization owners can assign to any team in an organization.

&lt;ul&gt;
&lt;li&gt;In public beta&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub App managers: By default, only organization owners can manage the settings of GitHub App registrations owned by an organization. To allow additional users to manage, an owner can grant them GitHub App manager permissions.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Outside collaborator:&lt;/strong&gt; To keep your organization's data secure while allowing access to repositories, you can add &lt;em&gt;outside collaborators&lt;/em&gt;. An outside collaborator is a person who has access to one or more organization repositories but is not explicitly a member of the organization, such as a consultant or temporary employee.&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Codespaces
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;can have deep link to create a codespace with pre-configured options&lt;/li&gt;
&lt;li&gt;can change display name, shell, machine type, and region&lt;/li&gt;
&lt;li&gt;only supports Linux&lt;/li&gt;
&lt;li&gt;run in GitHub-owned Azure account (but can be billed to your Azure)&lt;/li&gt;
&lt;li&gt;A codespace is a Docker container configured for development run on a GH-managed VM&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Projects
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Github CLI and GraphQL API&lt;/li&gt;
&lt;li&gt;Project insights available for all with write and admin access&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  CodeOwners
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;automatically requested for review on PRs&lt;/li&gt;
&lt;li&gt;Can also be use for requiring approval from code owner before merge&lt;/li&gt;
&lt;li&gt;hover over shield icon on file in GitHub to see code owner&lt;/li&gt;
&lt;li&gt;people with write permission to repo can create or edit &lt;code&gt;CODEOWNERS&lt;/code&gt; file

&lt;ul&gt;
&lt;li&gt;Code owners must also have write permission&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;requires GitHub Pro, Team, or Enterprise to have code owners on a private repo&lt;/li&gt;

&lt;li&gt;defined in a &lt;code&gt;CODEOWNERS&lt;/code&gt; file (no extension) in the &lt;code&gt;.github/&lt;/code&gt; , root, or &lt;code&gt;docs/&lt;/code&gt; directory (GH will search in this order for file)&lt;/li&gt;

&lt;li&gt;Branch-specific based on branch where file is&lt;/li&gt;

&lt;li&gt;syntax is similar to gitignore:
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="err"&gt;*&lt;/span&gt;&lt;span class="s"&gt;.js @js-owner // all files ending in .js have user js-owner as code owner&lt;/span&gt;
&lt;span class="err"&gt;*&lt;/span&gt;&lt;span class="s"&gt;.txt @octo-org/octoteam // team octoteam within octo-org owns all .txt files&lt;/span&gt;
&lt;span class="s"&gt;/docs/ @docsowner // all files in docs directory are owend by user docsowner&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Notes from Practice Test 2
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add issue forms with YAML form definition file in &lt;code&gt;/.github/ISSUE_TEMPLATE&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Form responses converted to markdown and added to body of issue&lt;/li&gt;
&lt;li&gt;Project can be organization or user project&lt;/li&gt;
&lt;li&gt;Branch protection rules prevent accidental or unauthorized changes to a branch&lt;/li&gt;
&lt;li&gt;Two types of project charts: current &amp;amp; historical&lt;/li&gt;
&lt;li&gt;2FA methods: TOTP app on mobile/desktop or text message

&lt;ul&gt;
&lt;li&gt;Security keys can be added as an &lt;strong&gt;alternate&lt;/strong&gt; 2FA method, NOT primary&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Can do web-based code editing in GitHub mobile

&lt;ul&gt;
&lt;li&gt;Cannot do automated testing or CI&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Innersource: build proprietary software using OSS methodologies&lt;/li&gt;

&lt;li&gt;Internal repos let orgs practice innersource

&lt;ul&gt;
&lt;li&gt;Requires GH Enterprise Cloud&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;All enterprise members have read permission to internal repos&lt;/li&gt;

&lt;li&gt;Internal repos are not visible to outside collaborators of other org repos&lt;/li&gt;

&lt;li&gt;Internal is the default setting for all new repos created in an enterprise org&lt;/li&gt;

&lt;li&gt;Up to 10 people can be assigned to an issue or PR

&lt;ul&gt;
&lt;li&gt;limited to 1 for private free repos&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Templates created from existing repositories have same directory structure, branches, and files&lt;/li&gt;

&lt;li&gt;Template can select only default or all branches to copy from original&lt;/li&gt;

&lt;li&gt;Security tab includes:

&lt;ul&gt;
&lt;li&gt;Security policies&lt;/li&gt;
&lt;li&gt;Advisories&lt;/li&gt;
&lt;li&gt;Dependabot alerts&lt;/li&gt;
&lt;li&gt;Code scanning results&lt;/li&gt;
&lt;li&gt;Secret scanning results&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Projects provide more robust integrations vs Projects Classic&lt;/li&gt;

&lt;li&gt;Projects (vs. Projects Classic) designed to integrate with existing tools, such as GraphQL API and GitHub Actions&lt;/li&gt;

&lt;li&gt;Codespaces can use account secrets as environment variables&lt;/li&gt;

&lt;li&gt;Project Layouts: Board, Roadmap, and Table&lt;/li&gt;

&lt;li&gt;&lt;a href="https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository#adding-a-pull-request-template" rel="noopener noreferrer"&gt;Docs for name options for pull request templates&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;PR and issue templates MUST be in the default branch&lt;/li&gt;

&lt;li&gt;Projects, issues, and GitHub Actions can be disabled on a repo&lt;/li&gt;

&lt;li&gt;Milestones provide visual roadmap to track progress on issues &amp;amp; PRs&lt;/li&gt;

&lt;li&gt;Discussions can be pinned&lt;/li&gt;

&lt;li&gt;The automatic retention period of up to 30 days for Codespaces can be reduced to save costs&lt;/li&gt;

&lt;li&gt;Following an organization lets you see activity like new discussions, sponsorships, and repositories&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes from Practice Test 3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Going from public to private:

&lt;ul&gt;
&lt;li&gt;removes a repo from GitHub Archive Program&lt;/li&gt;
&lt;li&gt;unpublishes any published GitHub Pages&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Triage role is for proactively managing issues, discussions, and PRs WITHOUT write access&lt;/li&gt;

&lt;li&gt;Org repo roles:

&lt;ul&gt;
&lt;li&gt;read&lt;/li&gt;
&lt;li&gt;triage&lt;/li&gt;
&lt;li&gt;write&lt;/li&gt;
&lt;li&gt;maintain&lt;/li&gt;
&lt;li&gt;admin&lt;/li&gt;
&lt;li&gt;Security manager role for org in public beta. Give read access to all repos, write for security alerts, can configure code security settings at org and repo level (&lt;a href="https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization" rel="noopener noreferrer"&gt;Docs reference&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Permanent link can be created for a line or range of lines in a version of a file or PR&lt;/li&gt;

&lt;li&gt;On public repos, dependency graph and secret scanning alerts for PARTNERS are always enabled&lt;/li&gt;

&lt;li&gt;Codespaces specific secrets are setup in Settings &amp;gt; Code, planning and automation &amp;gt; Codespaces &amp;gt; New secret. Set name, value, and repos with access.&lt;/li&gt;

&lt;li&gt;GitHub sponsorship requires a GH-sponsor enabled dev or org profile

&lt;ul&gt;
&lt;li&gt;Must contribute to OSS project and live in a supported region&lt;/li&gt;
&lt;li&gt;Up to 10 one-time and 10 monthly tiers&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Can mark an issue as duplicate by typing “Duplicate of” and the issue/PR number in body of new comment

&lt;ul&gt;
&lt;li&gt;Must have write access&lt;/li&gt;
&lt;li&gt;Can be undone if needed&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Max GitHub Project items = 1200

&lt;ul&gt;
&lt;li&gt;Max 10,000 archived&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Notes from Practice Test 4
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Commit vs hash:

&lt;ul&gt;
&lt;li&gt;A commit is a specific and immutable snapshot capturing changes made to files, creating a chronological record in version history&lt;/li&gt;
&lt;li&gt;A hash is a number representing the contents of a file or another object&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;GitHub sponsorships can be paid via Patreon&lt;/li&gt;

&lt;li&gt;Bitcoin is not supported for GH sponsors&lt;/li&gt;

&lt;li&gt;Owners or admins can be allowed to limit repo visibility changes&lt;/li&gt;

&lt;li&gt;Default categories for discussions:

&lt;ul&gt;
&lt;li&gt;Announcements&lt;/li&gt;
&lt;li&gt;General&lt;/li&gt;
&lt;li&gt;Ideas&lt;/li&gt;
&lt;li&gt;Polls&lt;/li&gt;
&lt;li&gt;Q&amp;amp;A&lt;/li&gt;
&lt;li&gt;Show &amp;amp; Tell&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Workflow triggers:

&lt;ul&gt;
&lt;li&gt;Events in repo&lt;/li&gt;
&lt;li&gt;Events outside GH that trigger a &lt;code&gt;repository-dispatch&lt;/code&gt; event&lt;/li&gt;
&lt;li&gt;scheduled time&lt;/li&gt;
&lt;li&gt;manual&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Organizations can have more than one owner&lt;/li&gt;

&lt;li&gt;Owners cannot change their own role, but can change the role of another owner&lt;/li&gt;

&lt;li&gt;Enable Feature preview to gain access to Alpha and Beta features&lt;/li&gt;

&lt;li&gt;Admin permission is required to enable/disable GH discussions&lt;/li&gt;

&lt;li&gt;Security markdown file is for security related communication, such as reporting vulnerabilities&lt;/li&gt;

&lt;li&gt;Project Insights not available on Project Classics&lt;/li&gt;

&lt;li&gt;Saved replies can contain any text, markdown, and emoji reactions&lt;/li&gt;

&lt;li&gt;Maintain role recommended for project managers&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Other Resources
&lt;/h2&gt;

&lt;p&gt;If you're looking for more comprehensive exam prep, check out the following resources from FreeCodeCamp:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=Jdc0i7RcBv8" rel="noopener noreferrer"&gt;Video: GitHub Foundations Certification Course – Pass the exam in 10 hours!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/github-foundations-certified-exam-prep-guide/" rel="noopener noreferrer"&gt;GitHub Foundations Certification – Exam Prep Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy studying, and good luck!!&lt;/p&gt;

</description>
      <category>github</category>
      <category>certification</category>
    </item>
    <item>
      <title>Running a Phaser Game on Mobile Devices</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Sun, 05 May 2024 02:21:18 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/running-a-phaser-game-on-mobile-devices-34l4</link>
      <guid>https://dev.to/ceceliacreates/running-a-phaser-game-on-mobile-devices-34l4</guid>
      <description>&lt;p&gt;We have finally arrived at the final part of the tutorial! We’ve come a long way — from scaffolding a Vue Ionic app, building an entire game with Phaser, and connecting the app and game together for a seamless experience. &lt;/p&gt;

&lt;p&gt;Now it’s time to take this app from web to mobile. Fortunately, Capacitor, which is built into Ionic, makes this easy. Let’s get started!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Your development machine must be set up for iOS and Android development if you want to run the game on a simulator or real device! You can read the &lt;a href="https://capacitorjs.com/docs/getting-started/environment-setup" rel="noopener noreferrer"&gt;Capacitor documentation here&lt;/a&gt; for information on environment setup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Adding iOS and Android Device Support&lt;/li&gt;
&lt;li&gt;Running on a Simulator&lt;/li&gt;
&lt;li&gt;Running on a Real Device&lt;/li&gt;
&lt;li&gt;Persistent High Score Data&lt;/li&gt;
&lt;li&gt;Next Steps&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Adding iOS and Android Device Support
&lt;/h2&gt;

&lt;p&gt;Using the Ionic CLI that we installed in &lt;a href=""&gt;Part 1&lt;/a&gt;, we can run the following commands to add Android and iOS to our project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic capacitor add android
ionic capacitor add ios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, my favorite way to add iOS and Android device support to an Ionic/Capacitor project is using the &lt;a href="https://marketplace.visualstudio.com/items?itemName=ionic.ionic" rel="noopener noreferrer"&gt;Ionic VS Code Extension&lt;/a&gt;. This extension has a number of different features and functionality for working with an Ionic/Capacitor app, regardless of whether you’re using Angular, React, Vue, or vanilla JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkn2kyjonj4kb06ol8hsx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkn2kyjonj4kb06ol8hsx.png" alt="Screenshot of Ionic extension page in VS Code" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you install the extension, you’ll see in the sidebar that it recommends adding Android and iOS to your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiktyc7y2tiam21oa2ppb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiktyc7y2tiam21oa2ppb.png" alt="Screenshot of Ionic Extension sidebar in VS Code" width="288" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can select these options in the sidebar, and the extension will run the CLI commands to add both Android and iOS to the existing project. You’ll now see an &lt;code&gt;android&lt;/code&gt; and &lt;code&gt;ios&lt;/code&gt; folder in the root directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgozz16pghku4ulqd6y53.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgozz16pghku4ulqd6y53.png" alt="Screenshot of new android and ios directories" width="304" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Running on a Simulator
&lt;/h2&gt;

&lt;p&gt;Now, in order to actually build the game for iOS or Android, there are some steps we need to follow.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a web build of our app&lt;/li&gt;
&lt;li&gt;Sync the web build to the native projects with Capacitor&lt;/li&gt;
&lt;li&gt;Create and run the native build for each platform (Android and iOS)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Any time we make a change to our project, we need to re-run these steps so our native app always stays in sync.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://capacitorjs.com/docs/basics/workflow" rel="noopener noreferrer"&gt;Capacitor documentation&lt;/a&gt; runs through the CLI commands and details for these steps, but I prefer to use the VS Code extension.&lt;/p&gt;

&lt;p&gt;You’ll see now in the extension sidebar that new commands have been added.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgp5bjuocib2ysyer1awe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgp5bjuocib2ysyer1awe.png" alt="Screenshot of extension sidebar" width="304" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To run on an iOS simulator, we’ll use the following commands in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Project &amp;gt; Build&lt;/li&gt;
&lt;li&gt;Project &amp;gt; Sync&lt;/li&gt;
&lt;li&gt;Run &amp;gt; iOS&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you select Run &amp;gt; iOS, a menu will appear asking to select a device. These correspond to the simulators available on your computer, provided by XCode.&lt;/p&gt;

&lt;p&gt;Once you select a device, Capacitor will create a native build of the app that can run on an iOS simulator. Then, it will deploy that build and launch the simulator. This can take a few minutes, but you’ll see updates in the bottom bar of VS Code.&lt;/p&gt;

&lt;p&gt;Once the build is ready, the simulator will launch with the app!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznt7baqpdrrsczrsd9wl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fznt7baqpdrrsczrsd9wl.png" alt="Screenshot of app running on iOS simulator" width="491" height="931"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll notice the styling is a bit different — this is thanks to Ionic’s adaptive styling, which automatically updates the components for whichever device is used to run the app. Now, our app has a native look-and-feel you’d expect for an iOS app, as opposed to the web browser version.&lt;/p&gt;

&lt;p&gt;You can click “Start” and play the game, and see your scores saved. This is a real iOS build of our game, running on an iOS simulator. Success!&lt;/p&gt;

&lt;p&gt;You can close the simulator once you’re done to stop the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running on a Real Device
&lt;/h2&gt;

&lt;p&gt;To walk through running the game on a real device, we’ll switch to Android. In the VS Code extension, select “Project &amp;gt; Open in Android Studio”. This will launch the project in Android Studio.&lt;/p&gt;

&lt;p&gt;You’ll notice the option to run on an emulator if you have one installed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felrqku6vr3iaobkd8dtx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Felrqku6vr3iaobkd8dtx.png" alt="Screenshot of Device manager in Android Studio with Pixel emulator options" width="749" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s connect our real Android device to run the app and play our game on device as it was intended.&lt;/p&gt;

&lt;p&gt;First, you’ll need to ensure the device you have is enabled for development. Go to Settings on your Android Device, then “About phone”, and scroll down to the “Build number”. Tap on the Build number 7 times (you’ll see a pop-up message notifying you that you are enabling developer mode).&lt;/p&gt;

&lt;p&gt;Once enabled, you’ll see “Developer options” under Settings &amp;gt; System. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rumpdxxs8kapozjkw4t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rumpdxxs8kapozjkw4t.png" alt="Screenshot of Android device settings showing Developer options" width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have two options to add your device:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;USB debugging&lt;/li&gt;
&lt;li&gt;Wireless debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lawyh2jvx1f7mbvocl1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lawyh2jvx1f7mbvocl1.png" alt="Screenshot of Android device with debugging options" width="800" height="1644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Toggle whichever method you prefer (I selected USB debugging) and accept. Once connected, you’ll see your physical device available in the Device Manager in Android Studio.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldyz4q3furtzfnwx6ife.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldyz4q3furtzfnwx6ife.png" alt="Screenshot of Android Studio with physical device shown in device manager" width="733" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the device and click the green arrow “Play” icon button to run your app.&lt;/p&gt;

&lt;p&gt;Now you can play your game using touch controls on a real device!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/62e1e2b2a589d505df3556adb584e6288b8a5a37" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with changes for this section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Persistent High Score Data
&lt;/h2&gt;

&lt;p&gt;We have one more thing to do.&lt;/p&gt;

&lt;p&gt;Right now, our data storage of the high scores is not persistent. Once our browser or app closes, we lose our history of high scores. For this tutorial, let’s leverage local storage in the browser or on the device.&lt;/p&gt;

&lt;p&gt;Capacitor provides plugins for us to make this easier. We’ll use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://capacitorjs.com/docs/core-apis/web#isnativeplatform" rel="noopener noreferrer"&gt;Capacitor&lt;code&gt;isNativePlatform()&lt;/code&gt; method&lt;/a&gt; to determine which storage method to use.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://capacitorjs.com/docs/apis/preferences" rel="noopener noreferrer"&gt;Capacitor Preferences API&lt;/a&gt;  for light storage of key/value pairs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The Preferences API is only meant for light storage, so we’ll only keep 10 scores at a time. To save more data, use an &lt;a href="https://capacitorjs.com/docs/guides/storage" rel="noopener noreferrer"&gt;actual storage solution or database&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First, we’ll install the Preferences API by running the following command in the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @capacitor/preferences
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You will need to be on Capacitor 6 to install the latest version of the Preferences API.&lt;/p&gt;

&lt;p&gt;Next, let’s update the &lt;code&gt;addGameScore&lt;/code&gt; method inside our &lt;code&gt;App.vue&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addGameScore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scoreString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="nf"&gt;saveGameScores&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scoreString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this change, we are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensuring we only save 10 scores at a time&lt;/li&gt;
&lt;li&gt;Creating a JSON string of our scores array&lt;/li&gt;
&lt;li&gt;Passing the score string to a new function, &lt;code&gt;saveGameScores()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now let’s define &lt;code&gt;saveGameScores()&lt;/code&gt; in the same component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;saveGameScores&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scoreString&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Capacitor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isNativePlatform&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Preferences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;scoreString&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;scoreString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function takes the JSON string of our scores array and saves it to either device storage OR browser local storage, depending on the return value of &lt;code&gt;Capacitor.isNativePlatform()&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Finally, we need to check if there are any scores stored in storage when we launch the app so we can load the scores. We’ll do this in a new &lt;code&gt;loadGameScores()&lt;/code&gt; function, again in the same &lt;code&gt;App.vue&lt;/code&gt; component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;loadGameScores&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;savedScoreString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;

   &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Capacitor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isNativePlatform&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Preferences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="nx"&gt;savedScoreString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;savedScoreString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;savedScoreString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;savedScoreString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="p"&gt;...&lt;/span&gt;

&lt;span class="nf"&gt;loadGameScores&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function again checks which platform the game is on, then loads scores from either device storage or browser local storage. You’ll need to make sure you run &lt;code&gt;loadGameScores()&lt;/code&gt; in the &lt;code&gt;App.vue&lt;/code&gt; component so it runs every time the app launches.&lt;/p&gt;

&lt;p&gt;We can confirm this is working in the browser by checking local storage, where we can see the scores array is being stored as a string. Now if we close the browser and reopen, our score history data is persistent!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fied5vr9zxkr5gl8uages.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fied5vr9zxkr5gl8uages.png" alt="Screenshot of local storage with scores string" width="800" height="711"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also test this on our Android mobile device. Rebuild, sync, and run the app. Play a few games, then close out the app completely by swiping up on the app from the App Overview carousel view.&lt;/p&gt;

&lt;p&gt;Reopen the app, and you’ll see the saved scores load!&lt;/p&gt;

&lt;p&gt;Again, this is not a production solution, but it shows how you can leverage Capacitor to interact with device functionality, no matter what platform your app is running on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Congratulations, we made it! You have built a game using open source web technologies that can run on real native mobile devices. I encourage you to continue building:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add more game functionality or new levels&lt;/li&gt;
&lt;li&gt;Connect to a persistent database for score storage&lt;/li&gt;
&lt;li&gt;Explore new Phaser features like the Phaser CLI and Sandbox&lt;/li&gt;
&lt;li&gt;Make new games!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the way, I’ll be streaming more web and game development on Twitch weekly, so &lt;a href="https://www.twitch.tv/ceceliacreates/" rel="noopener noreferrer"&gt;follow me on Twitch&lt;/a&gt; to get notified when I’m live. See you there!&lt;/p&gt;

</description>
      <category>phaser</category>
      <category>ionic</category>
      <category>mobile</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Working with Scenes and Data in Phaser</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Sun, 05 May 2024 02:10:02 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/working-with-scenes-and-data-in-phaser-2pn4</link>
      <guid>https://dev.to/ceceliacreates/working-with-scenes-and-data-in-phaser-2pn4</guid>
      <description>&lt;p&gt;It’s been a long time since I returned to this Phaser tutorial, and for that I apologize! &lt;a href="https://dev.toOutSystems%20blog%20post"&gt;A job role change&lt;/a&gt; caused this to fall through the cracks, but I wanted to make sure I wrapped things up for those following along.&lt;/p&gt;

&lt;p&gt;As a disclaimer, some things have changed in the months since &lt;a href="https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-building-a-phaser-game-2f74"&gt;Part 2&lt;/a&gt;, including &lt;a href="https://capacitorjs.com/docs/next/updating/6-0" rel="noopener noreferrer"&gt;a major update of Capacitor to version 6&lt;/a&gt;, as well as some cool things happening with the &lt;a href="https://phaser.io/news/2024/04/phaser-create-game" rel="noopener noreferrer"&gt;new Phaser CLI.&lt;/a&gt; I’ll be digging more into these in future posts now that I’m back up and running. However, for the purposes of finishing this series, I’ll stay with the setup started in &lt;a href="https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-part-one-3e0o"&gt;Part 1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, enough time has passed already, so let’s get to it!&lt;/p&gt;

&lt;p&gt;In this post in the series, we’ll create our &lt;code&gt;ScoreScene&lt;/code&gt;  and set up the other views in our Vue app: About and Scores. This will involve using events to access the scores from the Phaser game in the parent Vue app to create a “High Scores” page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Creating the Score Scene&lt;/li&gt;
&lt;li&gt;Switching Scenes&lt;/li&gt;
&lt;li&gt;Passing Data Between Scenes&lt;/li&gt;
&lt;li&gt;Passing Score Data from Phaser to Vue&lt;/li&gt;
&lt;li&gt;What’s Next&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating the Score Scene
&lt;/h2&gt;

&lt;p&gt;This scene will display the player’s final score and display text letting them know they can tap to restart.  We already created a &lt;code&gt;ScoreScene.js&lt;/code&gt; file within our &lt;code&gt;game&lt;/code&gt; directory in Part 2, and this is the file we’ll be using.&lt;/p&gt;

&lt;p&gt;Right now, the file is empty. We’ll start by scaffolding out the basic structure of a Scene file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ScoreScene&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ScoreScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we’ll set some values based on the screen size, like we did in the Play Scene. We’ll set the &lt;code&gt;screenWidth&lt;/code&gt;, &lt;code&gt;screenHeight&lt;/code&gt;, and the horizontal center of the screen with &lt;code&gt;screenCenterX&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This will allow us to display text in the correct location on the screen. We’ll add “Game Over” text to the center like we had in our Play Scene using the &lt;code&gt;gameOverText&lt;/code&gt; variable, as well as some animated text indicating the player should tap to restart with the &lt;code&gt;restartText&lt;/code&gt; variable.&lt;/p&gt;

&lt;p&gt;For the animation, we’ll use a tween that targets the &lt;code&gt;restartText&lt;/code&gt; and repeatedly eases the text to 1.5 times larger and back to its original size on a loop. This will create a pulsing animation effect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// sets game values based on screen size&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="c1"&gt;// adds Game Over text to middle of screen&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameOverText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Game Over&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;32px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// adds Tap to Restart text underneath Game Over text&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;restartText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tap to restart&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;15px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#ffffff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// adds pulsing animation to restart text&lt;/span&gt;

        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tweens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;restartText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Scale it to 150% of its original size&lt;/span&gt;
            &lt;span class="na"&gt;scaleY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Duration of one pulse&lt;/span&gt;
            &lt;span class="na"&gt;ease&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Sine.easeInOut&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Smooth easing&lt;/span&gt;
            &lt;span class="na"&gt;yoyo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Reverse the tween on completion, creating the "pulse" effect&lt;/span&gt;
            &lt;span class="na"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="c1"&gt;// Repeat forever&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ve created our scene, but it’s not connected to the rest of our game. Next, we’ll learn how to switch between our Play Scene and Score Scene in Phaser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/654a4ef667e78147816c2a7706c19a090e0f88e7" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching Scenes
&lt;/h2&gt;

&lt;p&gt;Phaser has a Scene Manager that contains built-in methods for managing the scenes in your game, including starting, stopping, switching, sleeping, and more. You can view the documentation here to see a full list of the available methods. For our game, we want to do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stop the Play Scene when the game is over, and start the Score Scene&lt;/li&gt;
&lt;li&gt;Stop the Score Scene when the player taps to restart, and start the Play Scene&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First, let’s update our Play Scene. Right now, the logic to restart the game is inside the overlap we declared for when our player hits a bomb (which ends the game). It looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Adds overlap between player and bombs&lt;/span&gt;

  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;overlap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;createStarLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;createBombLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameOverText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Game Over&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;32px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerup&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of displaying the “Game Over” text and directly restarting in the same Scene, we’ll instead stop the Play Scene and start the Score Scene. Your overlap should now look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;overlap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// Destroys bomb that triggered overlap&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Stops game object generation, pauses physics, and resets score to zero&lt;/span&gt;
    &lt;span class="nx"&gt;createStarLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;createBombLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// stops Play Scene and starts Score Scene&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ScoreScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, our &lt;code&gt;game.js&lt;/code&gt; file does not currently import the &lt;code&gt;ScoreScene&lt;/code&gt;, so Phaser does not know about it. Update your &lt;code&gt;game.js&lt;/code&gt; with an import statement for &lt;code&gt;ScoreScene&lt;/code&gt;, and change the &lt;code&gt;scene&lt;/code&gt; property in the &lt;code&gt;launch&lt;/code&gt; function and pass an array with both scenes instead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;PlayScene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./PlayScene.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ScoreScene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ScoreScene.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RESIZE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;autoCenter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CENTER_BOTH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;game&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#201726&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;arcade&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;PlayScene&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScoreScene&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you save your changes and run the game, when your player is hit by a bomb, the scene will change to the Score scene! Let’s add similar logic to the Score scene to start a new game.&lt;/p&gt;

&lt;p&gt;Put the following code inside the &lt;code&gt;create()&lt;/code&gt; block in &lt;code&gt;ScoreScene&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Add pointerdown handler to restart game&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerdown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ScoreScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can now seamlessly switch between scenes to end and start a new game!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/33e4629567040ed78fcac3ed0b269d01b1ae5297" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with changes for this section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing Data Between Scenes
&lt;/h2&gt;

&lt;p&gt;Right now, our Score Scene isn’t very exciting. Let’s make it more fun by displaying the final score, along with a rank for that score to let the player know how they did. To do this, we’ll need to pass the score from the &lt;code&gt;PlayScene&lt;/code&gt; to the &lt;code&gt;ScoreScene&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In Phaser, we can pass an object as the second parameter to the &lt;code&gt;start()&lt;/code&gt; method to pass data to the new scene. Update the &lt;code&gt;start&lt;/code&gt; method in the overlap of the &lt;code&gt;PlayScene&lt;/code&gt; to add the score data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You’ll also need to REMOVE the line that reset the score to zero, otherwise you’ll just pass zero every time! Because we are now stopping the scene, the score will automatically be reset to zero when a new &lt;code&gt;PlayScene&lt;/code&gt; is started again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="c1"&gt;// stops Play Scene and starts Score Scene&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ScoreScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make use of this data being passed to the &lt;code&gt;ScoreScene&lt;/code&gt;, we’ll use an &lt;code&gt;init()&lt;/code&gt; block in &lt;code&gt;ScoreScene&lt;/code&gt; to capture and assign the score data.&lt;/p&gt;

&lt;p&gt;Add the following block to your &lt;code&gt;ScoreScene&lt;/code&gt; class, above the &lt;code&gt;create()&lt;/code&gt; block:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalScore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This takes the &lt;code&gt;score&lt;/code&gt; passed to the &lt;code&gt;start()&lt;/code&gt; method and assigns it to a new variable in the scope of our new scene, &lt;code&gt;this.finalScore&lt;/code&gt;. We can now use this to display text with the score in the scene.&lt;/p&gt;

&lt;p&gt;Let’s also calculate a rank based on the score and display that on the screen. Here is the scale I used, but feel free to have fun with yours!&lt;/p&gt;

&lt;p&gt;The following should all be within the &lt;code&gt;create()&lt;/code&gt; block on the &lt;code&gt;ScoreScene&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// calculates rank based on score&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scoreRank&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalScore&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;A: Prime Protocol!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalScore&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;B: Efficient Engine&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalScore&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;C: Routine Maintenance&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;F: Gears Jammed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// adds final score text to screen&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scoreText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Score: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;finalScore&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;20px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// adds score rank text to screen&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rankText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rank &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scoreRank&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;20px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#ffffff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, our Score scene is a lot more interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvdipoz6fko687fvyve6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvdipoz6fko687fvyve6.png" alt="Screenshot of score scene" width="646" height="1426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use this method of passing data via the &lt;code&gt;start()&lt;/code&gt; method and retrieving it in the &lt;code&gt;init()&lt;/code&gt; block to transfer data between your scenes as needed. This is helpful if you are not using global state for your game, or only need to pass some data that does not need to be stored in global state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/6eb4aa882bd8af3606799253367e764ce9093a72" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with changes for this section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passing Score Data from Phaser to Vue
&lt;/h2&gt;

&lt;p&gt;So now we know how to pass data between scenes within Phaser, but what about getting the data out of our game and back to our Vue app? Let’s tackle that in this section.&lt;/p&gt;

&lt;p&gt;First, let’s update our Phaser game to emit the score data. We can do this using a JavaScript &lt;code&gt;CustomEvent&lt;/code&gt; constructor, which you can read more about &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When the game ends, we’ll create a custom event containing the score data from our game, and dispatch it to the window. Because Phaser is based on JavaScript, we can use JavaScript constructors like &lt;code&gt;CustomEvent()&lt;/code&gt; right within our game code. &lt;/p&gt;

&lt;p&gt;Add the custom event within the overlap for your bombs and player, in the same place where the rest of our game over logic is handled. Make sure it’s declared before you stop the scene. Your code should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;overlap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="c1"&gt;// Destroys bomb that triggered overlap&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Stops game object generation, pauses physics, and resets score to zero&lt;/span&gt;
    &lt;span class="nx"&gt;createStarLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;createBombLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// When the game ends, dispatch the event with the score and rating&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gameEndEvent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CustomEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gameEnded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dispatchEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gameEndEvent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// stops Play Scene and starts Score Scene&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ScoreScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are now emitting an event called &lt;code&gt;gameEnded&lt;/code&gt; that contains the score data. The next step is to update our Vue app to handle this event.&lt;/p&gt;

&lt;p&gt;We are going to accomplish two tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add functionality within our &lt;code&gt;PhaserContainer.vue&lt;/code&gt; to handle the event emitted by Phaser&lt;/li&gt;
&lt;li&gt;Use Provide/Inject in Vue to update and display a list of scores&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First, add the following code to the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag in &lt;code&gt;PhaserContainer.vue&lt;/code&gt; , after the &lt;code&gt;handleClickStart()&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// adds score when event emitted from Phaser&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleGameEnded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;customEvent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;CustomEvent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;addGameScore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// adds event listener for gameEnded event&lt;/span&gt;
&lt;span class="nf"&gt;onMounted&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gameEnded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleGameEnded&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// removes event listener for gameEnded event&lt;/span&gt;
&lt;span class="nf"&gt;onUnmounted&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gameEnded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleGameEnded&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll need to add &lt;code&gt;onMounted&lt;/code&gt; and &lt;code&gt;onUnmounted&lt;/code&gt; to your Vue import statement as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;onMounted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onUnmounted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll notice there is a &lt;code&gt;addGameScore()&lt;/code&gt; function being called within the “gameEnded” event handler. This will be part of our Provide/Inject in Vue. Let’s move to the &lt;code&gt;App.vue&lt;/code&gt; component to add this.&lt;/p&gt;

&lt;p&gt;Within the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;provide&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gameScores&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;([])&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;addGameScore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;provide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;addGameScore&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simply creates an array &lt;code&gt;ref&lt;/code&gt; to store our scores, and defines a method to add new scores to the ref. We then provide both the &lt;code&gt;gameScores&lt;/code&gt; ref and the &lt;code&gt;addGameScore&lt;/code&gt; method to our app. &lt;/p&gt;

&lt;p&gt;Let’s also create a &lt;code&gt;types.ts&lt;/code&gt; file in the &lt;code&gt;src&lt;/code&gt; directory, and export an interface for our Provider.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;GameScoresProvider&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;gameScores&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="nl"&gt;addGameScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Back in our &lt;code&gt;PhaserContainer.vue&lt;/code&gt;, we can now inject the &lt;code&gt;addGameScore&lt;/code&gt; method. Make sure to add &lt;code&gt;inject&lt;/code&gt;to your Vue import statement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;GameScoresProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// injects addGameScore method&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;addGameScore&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;inject&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;GameScoresProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, in our &lt;code&gt;ScoresPage.vue&lt;/code&gt; view, we’ll display the list of scores. Update the template in your file to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;toolbar&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Scores&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-title&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-toolbar&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-header&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h3&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;show&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;!gameScores.length&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;No&lt;/span&gt; &lt;span class="nx"&gt;scores&lt;/span&gt; &lt;span class="nx"&gt;yet&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h3&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;(score, index) in gameScores&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;index&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-label&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-item&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-list&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-content&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-page&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And update the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IonPage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonHeader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonToolbar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonContent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonList&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonItem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonLabel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ionic/vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;inject&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;GameScoresProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/types&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// injects gameScores array ref&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;gameScores&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;inject&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;GameScoresProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gameScores&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, as we play our game, we’ll see the list of scores update in the Scores tab!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6sprsc2wuc6u38d2vop.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb6sprsc2wuc6u38d2vop.png" alt="Screenshot of Scores tab" width="646" height="1426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a final step, add some text to your &lt;code&gt;AboutPage.vue&lt;/code&gt;. It can be whatever you want!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/f34760b534a70e14a7606e2091dd042820ebedf4" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next
&lt;/h2&gt;

&lt;p&gt;We now have ourselves a game app that launches your game, navigates between scenes within Phaser, and displays a list of your scores within the app. The next (and final) step is to add support for iOS and Android so you can play the game as intended — on a mobile device!&lt;/p&gt;

&lt;p&gt;Let's go!&lt;/p&gt;

</description>
      <category>phaser</category>
      <category>ionic</category>
      <category>vue</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>How I became low-code certified with OutSystems</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Thu, 25 Apr 2024 17:22:18 +0000</pubDate>
      <link>https://dev.to/outsystems/how-i-became-low-code-certified-with-outsystems-nbj</link>
      <guid>https://dev.to/outsystems/how-i-became-low-code-certified-with-outsystems-nbj</guid>
      <description>&lt;p&gt;This month, I followed in the footsteps of many other &lt;a href="https://outsystems.com" rel="noopener noreferrer"&gt;OutSystems&lt;/a&gt; developers and completed the exam to become a certified Associate Reactive Developer. This exam focuses on the fundamentals of OutSystems reactive web and mobile application development, and is for developers new to the OutSystems platform.&lt;/p&gt;

&lt;p&gt;However, just because it is for new OutSystems developers, does not mean it’s an easy exam. Even with my traditional development experience, I had to study to be successful. Even though OutSystems is a low-code platform, it requires understanding of data structures and relationships, building component-based user interfaces, constructing business logic and control flows, and understanding events and application lifecycle management.&lt;/p&gt;

&lt;p&gt;Here are some of my takeaways from preparing for the exam, and tips to help you prepare for and pass your own certification journey.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I completed the OutSystems 11 certification, however, many of these same lessons apply to the Associate Developer ODC exam as well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
Understanding the Exam

&lt;ul&gt;
&lt;li&gt;Exam Topic Breakdown&lt;/li&gt;
&lt;li&gt;Question Format&lt;/li&gt;
&lt;li&gt;Applied Knowledge&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Learning the Material

&lt;ul&gt;
&lt;li&gt;Developer School&lt;/li&gt;
&lt;li&gt;Online Training&lt;/li&gt;
&lt;li&gt;Hands-on Learning&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Preparing for the Exam

&lt;ul&gt;
&lt;li&gt;Question Practice&lt;/li&gt;
&lt;li&gt;What to Expect&lt;/li&gt;
&lt;li&gt;Test Tips&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Continuing Your Journey&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding the exam
&lt;/h2&gt;

&lt;p&gt;The first step in knowing what you’re getting yourself into! Even if you’ve taken certification exams before, each once will have its specific format and approaches to testing your knowledge of the material. Start by understanding what the exam will entail so you can best prepare.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exam Topic Breakdown
&lt;/h3&gt;

&lt;p&gt;The Exam Details on &lt;a href="https://www.outsystems.com/certifications/" rel="noopener noreferrer"&gt;the certification page&lt;/a&gt; includes a PDF entitled “Detail Sheet”, which contains important information about the exam. The exam consists of 50 questions, and a 70% score (35 correctly answered questions) is required to pass.&lt;/p&gt;

&lt;p&gt;Pay close attention to the Exam Topics breakdown chart in this document. I referred to it often, as it contains what percentage of questions are asked about certain topics. I used this to develop my study plan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbooqba27xnjesusqia2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzbooqba27xnjesusqia2.png" alt="Screenshot of exam breakdown chart" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My strategy was to start with the topics that had the highest percentage of questions on the exam. These include Screen Widgets (16%), Aggregates (12%), Logic Flows &amp;amp; Exception Handling (10%), and so on. After my initial completion of the Developer School and Training (more on that later), I went back through the topics and ensured I had a strong understanding of the highest percentage topics before moving on to the next one. This meant I was spending my study time efficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Question Format
&lt;/h3&gt;

&lt;p&gt;It’s also important to know what to expect from the question format. This is where the sample exam, also included in the Exam Details, is helpful.&lt;/p&gt;

&lt;p&gt;All questions on the exam are multiple choice, with four options and only a single correct answer. Many times, two or more of the options will seem very similar, or like they could both be correct. It is important to read the question and options very carefully to identify which answer is the right one.&lt;/p&gt;

&lt;p&gt;Many questions will ask “Which of the following is &lt;strong&gt;correct&lt;/strong&gt;?” or “Which of the following is the &lt;strong&gt;best&lt;/strong&gt; way to do something?”, and these can be tricky. Sometimes an option will be correct, but it is not the &lt;strong&gt;best&lt;/strong&gt; answer. Take your time and make sure you understand what the question is asking.&lt;/p&gt;

&lt;h3&gt;
  
  
  Applied Knowledge
&lt;/h3&gt;

&lt;p&gt;The questions on the exam are focused on applied knowledge. This means that you will not see questions like, “What is an entity?” or “What are the three types of joins in an aggregate?” Instead, you will be presented with scenarios, and must apply what you learned about entities and joins to find a solution. You may be asked what is the expected output for a screenshot of an aggregate, or asked how to change a given logic flow to produce a different result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe731klq6gpia0r2hgc3n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe731klq6gpia0r2hgc3n.png" alt="Example question from the exam showing an aggregate" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is why memorizing terms from the training is not enough. You will need to fully understand the concepts of OutSystems and get hands-on practice with building reactive web and mobile applications to be successful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning the material
&lt;/h2&gt;

&lt;p&gt;Fortunately, OutSystems provides you with all the resources you need to learn the material for the Associate Reactive Developer certification exam. Whether you prefer live training or online training, OutSystems has options for you. To complete the training, make sure to &lt;a href="https://www.outsystems.com/Platform/Signup/?utm_source=dev-to&amp;amp;utm_medium=referral&amp;amp;utm_campaign=dev-to-2024&amp;amp;utm_term=none&amp;amp;utm_content=personal-environment&amp;amp;utm_campaignteam=community&amp;amp;utm_partner=none" rel="noopener noreferrer"&gt;sign up for a free Personal Environment&lt;/a&gt; to explore the platform, complete exercises, and build applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Developer School
&lt;/h3&gt;

&lt;p&gt;I attended an OutSystems Developer School to prepare for the exam. This free program from OutSystems is for those with previous development experience who want to learn OutSystems quickly and take the Associate Reactive Developer exam. It is a great option if you already have development experience and are committed to spending 35+ hours on live, remote training.&lt;/p&gt;

&lt;p&gt;The training takes place over two weeks, and includes live instruction, a chance to ask questions of an OutSystems expert, additional exercises, and hands-on project work. It also includes a certificate voucher to take the exam for free as long as you meet the participation requirements. The voucher must be used within 30 days so you should be prepared to dedicate time to studying immediately after the school completes.&lt;/p&gt;

&lt;p&gt;There are sessions every quarter in three regions. You can &lt;a href="https://www.outsystems.com/developer_school/" rel="noopener noreferrer"&gt;apply online here&lt;/a&gt; for an upcoming session.&lt;/p&gt;

&lt;h3&gt;
  
  
  Online Training
&lt;/h3&gt;

&lt;p&gt;Everything covered in the exam is in the free online training under the &lt;a href="https://www.outsystems.com/learn/paths/18/becoming-a-reactive-web-developer/" rel="noopener noreferrer"&gt;“Becoming a Web Developer” Guided Path&lt;/a&gt;. I actually completed the training in addition to the Developer School to reinforce my learning and to complete the additional quizzes and exercises included in the online training.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2fdll5fnmxzwiaxjuh2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2fdll5fnmxzwiaxjuh2.png" alt="Screenshot of " width="734" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I highly recommend completing the training even if you do attend a Developer School. The more you expose yourself to the material and gain hands-on experience with Service Studio and the OutSystems platform, the more you will understand how to actually apply the knowledge in a way that is needed to answer the exam questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hands-on Learning
&lt;/h3&gt;

&lt;p&gt;Speaking of hands-on learning, from my experience, only completing the exercises in the online training is not enough to truly cement the concepts in your brain. Especially if you only follow the how-to instructions. I highly recommend spending time in Service Studio building out applications on your own so that you can explore the platform and learn how to solve problems on your own.&lt;/p&gt;

&lt;p&gt;Decide on an application you’d like to build, and work through the concepts you are learning in the training. Start by adding some data entities and creating relationships between them. Then create some screens using widgets, and display data with aggregates. Add form validation and use Client and Server actions to update data in your database. Create a block to reuse in your application, and leverage an event with a handler. Slowly add features to your application based on what you are learning at that time. This will build the experience you need to recall the information when you’re nervous during the exam.&lt;/p&gt;

&lt;p&gt;For my study, I actually built a flashcard application to help me study. I wrote practice questions based on what I was learning, and then built an app in OutSystems to display the questions and answers, and keep track of my score. This helped to reinforce all the concepts I was learning and give me hands-on practice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frorxw75jsf2lqjaf9tzg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frorxw75jsf2lqjaf9tzg.png" alt="Screenshot of flashcard study app built with OutSystems" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing for the exam
&lt;/h2&gt;

&lt;p&gt;As you get closer to the date of your exam, there are some tactical approaches to help you best prepare. &lt;/p&gt;

&lt;h3&gt;
  
  
  Question Practice
&lt;/h3&gt;

&lt;p&gt;You’ll definitely want to get some practice answering questions in the same format as the exam. This is a little difficult because the sample exam included in the Exam Details only has 20 questions. However, I was able to pass the exam without using paid practice tests from other sites by creating my own practice questions.&lt;/p&gt;

&lt;p&gt;Now that I have actually taken the exam, I realize that the practice questions I wrote did not quite match up with the difficulty of the real exam. However, by going through the process of writing questions, I forced my brain to think about the material in different ways, and how I would apply that knowledge in a test format. This helped me get additional practice answering test questions, even if they were not exactly the same as what ended up being on the exam.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to Expect
&lt;/h3&gt;

&lt;p&gt;If you are taking the exam via an online proctor, read the instructions &lt;strong&gt;very carefully&lt;/strong&gt;, as there are strict security measures you must follow. You must have a dedicated space to take the exam where nobody will enter (including any pets!) You will also be expected to show your desk and the room on camera, turn out your pockets, and more. Do not take these requirements lightly – they can and will stop your exam for any suspected violations.&lt;/p&gt;

&lt;p&gt;Keep in mind that once you start the exam, you will not be able to leave the camera or take a break until you are finished. You also cannot have any water or food, so make sure you are ready before starting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The exam experience may be different if you complete it at a testing center. Read the instructions when you schedule!&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Tips
&lt;/h3&gt;

&lt;p&gt;Once the exam begins, there is a tutorial that shows you how to use the exam platform. I recommend using the strikeout and flag features to your advantage during the test.&lt;/p&gt;

&lt;p&gt;The strikeout feature lets you mark answer options that you think are incorrect. This does not actually prevent you from selecting it as an answer, it is just a visual cue to help you narrow down the available choices. I recommend using this to strike out the answer options that you know right away are wrong. This can help you focus on reading the questions carefully.&lt;/p&gt;

&lt;p&gt;You can also flag questions that you’d like to return to before submitting the exam. This is helpful in two ways. First, you can mark questions that you aren’t confident in your answer, and then come back to review. This can be helpful in the beginning of the exam when you’re nervous, or, you may see something in a different question that jogs your memory about a topic covered in a previous question.&lt;/p&gt;

&lt;p&gt;I also used the flag feature to help me keep track of my potential score. I marked the questions where I wasn’t confident in my answer. As I progressed through, I periodically calculated how many of the questions I had flagged vs. how many questions I had answered. I knew I needed a 70% to pass, and this helped me gauge how I was performing against that benchmark.&lt;/p&gt;

&lt;p&gt;Overall, &lt;strong&gt;take your time&lt;/strong&gt;. Read each question and the options carefully, review all the information on screen shots, and go back to previous questions if needed. You have two hours for the exam, so use it wisely, and good luck!&lt;/p&gt;

&lt;h2&gt;
  
  
  Continuing your journey
&lt;/h2&gt;

&lt;p&gt;Once you’ve passed the exam, you are a certified Associate Reactive Developer! It’s a great achievement that marks the start of your low-code journey with OutSystems, but it’s just the beginning. A good next step is to focus on specializations in Front-end, Mobile, or Web, or pursue the Associate Tech Lead certification. Whatever path you choose, OutSystems has training resources and a strong community of developers to help support you.&lt;/p&gt;

</description>
      <category>lowcode</category>
      <category>certification</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>The DevRel Guide to Business Jargon</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Mon, 25 Mar 2024 16:04:27 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/the-devrel-guide-to-business-jargon-2042</link>
      <guid>https://dev.to/ceceliacreates/the-devrel-guide-to-business-jargon-2042</guid>
      <description>&lt;p&gt;&lt;em&gt;Thank you so much to &lt;a href="https://twitter.com/SylwiaVargas" rel="noopener noreferrer"&gt;@SylwiaVargas&lt;/a&gt; and &lt;a href="https://twitter.com/MelanieCrissey" rel="noopener noreferrer"&gt;@MelanieCrissey&lt;/a&gt; for their help with this guide!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Recently I participated in a LinkedIn Live Audio event about “&lt;a href="https://share.descript.com/view/XOQ0T3jLyHY" rel="noopener noreferrer"&gt;Tech Conference Speaking: Impact and Measures&lt;/a&gt;”.  &lt;/p&gt;

&lt;p&gt;During the discussion, a point came up that not all developer relations professionals are working within marketing, or necessarily interact with some business and marketing “jargon”. However, it can be helpful to “speak the language” of teams like marketing or sales to have more productive cross-functional conversations and make sure your goals and priorities are aligned with these teams.&lt;/p&gt;

&lt;p&gt;I’m pretty comfortable (maybe too comfortable 😅) with marketing and business jargon, due to my MBA in Marketing and experience working with marketing, sales, and customer success teams. Understanding these metrics can help you better understand what the overall business goals are for your company. This means you can better ensure your DevRel activities are contributing to these goals, AND help you communicate HOW they contribute.&lt;/p&gt;

&lt;p&gt;So if you’re working in (or interested in) DevRel and only know TOFU as a food or ARR as something a pirate would say, here is a semi-comprehensive guide on some of the business and marketing terms you may come across.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TAM (Total Addressable Market)&lt;/li&gt;
&lt;li&gt;Ideal Customer Profile/Personas&lt;/li&gt;
&lt;li&gt;DAU/MAU (Daily/Monthly Active Users)&lt;/li&gt;
&lt;li&gt;TOFU/BOFU (Top/Bottom of Funnel)&lt;/li&gt;
&lt;li&gt;ARR (Annual Recurring Revenue)&lt;/li&gt;
&lt;li&gt;New Logos&lt;/li&gt;
&lt;li&gt;Pipeline/Opportunity&lt;/li&gt;
&lt;li&gt;Conversion Rate&lt;/li&gt;
&lt;li&gt;CAC (Cost to Acquire a Customer)&lt;/li&gt;
&lt;li&gt;CLV (Customer Lifetime Value)&lt;/li&gt;
&lt;li&gt;Churn&lt;/li&gt;
&lt;li&gt;NDR (Net Dollar Retention)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TAM (Total Addressable Market)
&lt;/h3&gt;

&lt;p&gt;This metric, measured in dollars, represents the total potential opportunity for your company if every single potential customer that could get value from your product purchased it.&lt;/p&gt;

&lt;p&gt;This is used to demonstrate the potential value of the company overall, and is more a metric that’s helpful for investors. It can be helpful to understand though if you are tasked with supporting how much of your total addressable market you’re able to actually attain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ideal Customer Profile/Personas
&lt;/h3&gt;

&lt;p&gt;Let’s start with personas. Personas are fictional descriptions of potential users, specifically PEOPLE users, of your product. A persona could be defined using demographic information like job role, seniority level, and technology used, but also includes traits, behavior, and motivations. Personas should be specific (“web developer” is not a persona on its own) and you shouldn’t have too many that you are targeting.&lt;/p&gt;

&lt;p&gt;Understanding which personas your product and marketing teams are targeting can be helpful to designing resources and experiences that align with the expectations of the real people represented by the fictional personas. If your product team is building a tool designed for engineering leaders that prefer control and customization for complex use cases, but you only have opinionated getting-started tutorials for fun use cases, then you likely have a misalignment on personas.&lt;/p&gt;

&lt;p&gt;Ideal Customer Profile refers to the qualities that make up the type of purchaser most likely to benefit from your product (and therefore pay money for it). It is usually a company, but if your product is also used by individuals it could be a solo dev or entrepreneur. &lt;/p&gt;

&lt;p&gt;ICP as a company is primarily relevant for products designed for businesses, which most developer tools are. While personas are based on demographics and human traits, ICPs are based on firmographics, things like company size, industry, organizational structure, and annual revenue. Knowing your ICP can be helpful when planning events and content as a DevRel team. Based on your ICP, you may target events that are more likely to have attendees that work at startups vs enterprises, for example.&lt;/p&gt;

&lt;h3&gt;
  
  
  DAU/MAU (Daily/Monthly Active Users)
&lt;/h3&gt;

&lt;p&gt;If your company is focused on user growth and consistent usage of the product, you may need to track Daily or Monthly Active Users. This is the number of users that interacted with your product in a given time frame.&lt;/p&gt;

&lt;p&gt;This is important if users get more value (or spend more money) based on how often they use your product. If your product is an analytics dashboard and you have 100,000 users, but only 5 active users checking the dashboard on a given day (5 DAUs), that could definitely be a problem.&lt;/p&gt;

&lt;p&gt;However, if your product is an SDK that is integrated once per project, it wouldn’t make sense to track this metric, as developers don’t need to interact with your SDK on a daily or even monthly basis to get value. &lt;/p&gt;

&lt;p&gt;DAU/MAU metrics can signal a growing, active community for your product. You will often see social media or mobile app products use DAU/MAU metrics. For example, &lt;a href="https://x.com/NateSilver538/status/1771614960981799090?s=20" rel="noopener noreferrer"&gt;this tweet&lt;/a&gt; about DAUs for various social media sites:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzih23jwjpp2mp949n2kr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzih23jwjpp2mp949n2kr.png" alt="Screenshot from Twitter user NateSilver538: " width="535" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  TOFU/BOFU (Top/Bottom of Funnel)
&lt;/h3&gt;

&lt;p&gt;Both these terms are related to the concept of the “sales funnel”, or also called the "marketing funnel". The sales funnel is a metaphorical journey that potential customers move through.&lt;/p&gt;

&lt;p&gt;Some sales funnels end when the customer makes a purchase, however I prefer funnels that also include stages for ensuring customers stick around (loyalty) and even refer others to your product (advocacy).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5hmv105hlack90wb6de.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5hmv105hlack90wb6de.png" alt="Marketing funnel with awareness, interest, desire, action, loyalty, advocacy steps" width="800" height="923"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s described as a funnel to represent that there are much more potential customers at the beginning of the process (the wide open Top of the Funnel), but then prospects drop off during the journey, and you end up with much fewer actual paying customers (the narrow spout at the Bottom of the Funnel).&lt;/p&gt;

&lt;p&gt;Imagine you start with 100 developers that have just found out about your product for the first time. This is the VERY top of the funnel. 20 drop off because they don’t have a need for it. Then another 30 drop off because their project isn’t a good fit. The remaining 50 are further in the funnel, and are evaluating the product. They dig around the pricing page, try out your “hello world”, maybe get a demo from sales. Another 30 drop off here for various reasons, but 20 convert to paying customers. Sweet! Unfortunately, 10 cancel their account within the first year. So you have 10 left at the bottom of the funnel.&lt;/p&gt;

&lt;p&gt;Now the company needs to keep these 10 as customers and encourage them to increase their spend with more users or other upgrades. You may even encourage these customers to refer others through ambassador or partner programs.&lt;/p&gt;

&lt;p&gt;This is the bottom of the funnel. The idea is that you need to fill the funnel as much as possible at the top to get the number you need at the bottom, because you’ll lose most along the way.&lt;/p&gt;

&lt;p&gt;You may also see "MOFU", or "middle of funnel". This can be helpful if you have a longer, more complex funnel and want to specify steps in the middle of that process vs. just top and bottom.&lt;/p&gt;

&lt;p&gt;To recap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TOFU&lt;/strong&gt;: Activities where the goal is to attract many potential customers to the beginning of the sales process. These are awareness-driving activities to reach developers who have never heard of your product before.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MOFU/BOFU&lt;/strong&gt;: Activities that are designed to encourage free users to convert to paying customers, OR to get existing customers to expand their current usage. These could be things like tutorials for advanced use cases or supporting your community of developers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ARR (Annual Recurring Revenue)
&lt;/h3&gt;

&lt;p&gt;This is a term used by SaaS (or other XaaS) companies, otherwise known as companies that have a subscription model for their software or infrastructure product. It is the amount of money expected to come in during the year from subscriptions. Broken down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Revenue&lt;/strong&gt;: money coming in&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recurring&lt;/strong&gt;: money coming in that is repeated, not a one-time purchase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Annual&lt;/strong&gt;: Repeated money coming in over the course of a year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For most companies past seed stage, ARR is going to be the most important metric that all other goals roll up into. &lt;/p&gt;

&lt;p&gt;You may see some variations, including “new ARR”, which refers to ARR only from new accounts in a given time frame, or “total ARR”, which includes new and existing customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  New Logos
&lt;/h3&gt;

&lt;p&gt;This isn’t necessarily a metric, but a phrase you may see. It refers to the number of new customers brought on, but specifically business customers (hence the term “logo”, because companies have logos). This could be a vanity metric, but often will be used to legitimize the product, especially if the logos are well-known, reputable companies.&lt;/p&gt;

&lt;p&gt;Sometimes, your sales team may negotiate to use the business customer’s logo on your website. Other times there may be a reference like “trusted by thousands of companies” or “used by Fortune 100 companies” in your marketing. Internally, it could be used by sales teams to signal growth, or there could be a goal to sign 50 new logos in a year, for example. &lt;/p&gt;

&lt;h3&gt;
  
  
  Pipeline/Opportunity
&lt;/h3&gt;

&lt;p&gt;These terms are typically used by managed sales teams to represent the potential incoming sales amount measured as a dollar value. By managed sales, I mean typically larger enterprise deals that are moved along through the sales process by an account executive. &lt;/p&gt;

&lt;p&gt;An opportunity is calculated based on the expected dollar amount of the sale (opportunity size) adjusted by the probability the deal will actually close. Typically the probability increases the further along the sales process.&lt;/p&gt;

&lt;p&gt;The pipeline refers to the total sum of all the probability-adjusted opportunities currently active and waiting to close.&lt;/p&gt;

&lt;p&gt;Sometimes, DevRel activities can be attributed to specific opportunities. For example, if you give a demo at a conference booth or create a piece of content that results in a sales lead. Some DevRel teams may track influenced opportunities or even total influenced pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conversion Rate
&lt;/h3&gt;

&lt;p&gt;This is the percentage of free users that convert to a paid account. This can be helpful to understanding a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does your product provide value users feel is worth paying for?&lt;/li&gt;
&lt;li&gt;Are you bringing the right users into your pipeline?&lt;/li&gt;
&lt;li&gt;Are there blockers (technical, pricing, marketing) that keep your users from upgrading to paid?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if you are able to attract 1000 free users, but only 1 ends up paying you, that represents a conversion rate of 0.1%. A low conversion rate can be a sign of trouble with your product or developer journey, or that you may be targeting the wrong personas.&lt;/p&gt;

&lt;h3&gt;
  
  
  CAC (Cost to Aquire a Customer)
&lt;/h3&gt;

&lt;p&gt;This is the amount a company spends to bring on a new customer. It is typically calculated by taking the total spend on customer acquisition (sales, marketing) and dividing by the number of customers acquired. So if you spend $100k and acquire 100 customers, you are spending $1000 to acquire a single customer. The amount spent on DevRel activities rolls up into the CAC. The goal is to keep this number as low as possible, but definitely lower than the customer lifetime value, which we'll cover in a moment. This metric may become important to you as a DevRel professional if it’s too high. You may have a harder time justifying budget spend or may need to explore alternative solutions for bringing on customers that cost less. &lt;/p&gt;

&lt;h3&gt;
  
  
  CLV (Customer Lifetime Value)
&lt;/h3&gt;

&lt;p&gt;This is the amount of money spent by a customer over their lifetime as a customer. Let’s say you bring on a customer and they have the following spend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Year 1: self-serve individual plan, $120 ARR&lt;/li&gt;
&lt;li&gt;Year 2: upgrade to self-serve team plan, $600 ARR&lt;/li&gt;
&lt;li&gt;Year 3: upgrade to enterprise plan, $5k ARR&lt;/li&gt;
&lt;li&gt;Year 4: expand plan and adds more users, $8k ARR&lt;/li&gt;
&lt;li&gt;Year 5: customer churns, $0 ARR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CLV is $13,720. So if you spent $1k to acquire this customer, you wouldn’t see a return on your investment until year 3, but overall would more than out-earn the CAC. This is why preventing churn is so important, because if a customer churns too early, it severely limits the CLV and overall return on investment to acquire that customer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Churn
&lt;/h3&gt;

&lt;p&gt;Churn is another word for cancellations, represented as a percentage rate. Meaning, what percentage of customers who subscribe end up canceling their account? Preventing churn is typically a key focus for Customer Success teams, but preventing churn should be the responsibility of all teams that interact with users, including DevRel. If churn is high, it’s important to understand why, and how a cross-functional team like DevRel could help.&lt;/p&gt;

&lt;p&gt;Are there insufficient resources for users to be successful with the product? Does the product not work as expected? Is feedback from users getting back to the product team to make improvements? Does the user community need more support?&lt;/p&gt;

&lt;p&gt;It’s more expensive to bring on a new customer than to retain an existing one. So if you are great at bringing in users but have high churn, your CAC will be too high and CLV too low, making it much more difficult to achieve profitability for the business.&lt;/p&gt;

&lt;h3&gt;
  
  
  NDR (Net Dollar Retention)
&lt;/h3&gt;

&lt;p&gt;One more metric that is related to CLV and churn is Net Dollar Retention. This term refers to how much of each dollar you bring in is retained over time. It is a percentage and can be impacted negatively by churn or downgrades and impacted positively by upgrades or other expansions.&lt;/p&gt;

&lt;p&gt;For example, if you bring in $100k in base ARR in one year but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$20k is lost through churn/downgrades&lt;/li&gt;
&lt;li&gt;$15k is brought in through upgrades/expansions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You have retained $95k of the $100k, resulting in a 95% NDR. &lt;/p&gt;

&lt;p&gt;As you can imagine, a positive NDR is ideal, and if not, then as close to 100% as possible. Again, this metric is typically important to Customer Success teams, but could be related to activities related to DevRel, such as community engagement. &lt;/p&gt;

&lt;h3&gt;
  
  
  Recap
&lt;/h3&gt;

&lt;p&gt;This list addresses some of the most common terms you’ll hear across the developer journey, as well as across different functions in your organization. It is by no means comprehensive, but should give you a good initial grasp on the business vocabulary and concepts you’ll encounter in DevRel when collaborating with other teams. Every company approaches DevRel differently, so you may end up focusing on some metrics more than others. I’d recommend setting up meetings with team members in Marketing, Sales, and Customer Success to better understand what metrics are important to them, and get a sense of how your goals as DevRel can work complementary to their efforts.&lt;/p&gt;

&lt;p&gt;Did I miss any terms? Any of these that should be retired? Let me know in the comments!&lt;/p&gt;

</description>
      <category>devrel</category>
      <category>marketing</category>
      <category>business</category>
    </item>
    <item>
      <title>What is your speaker mission statement?</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Tue, 12 Mar 2024 21:25:51 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/what-is-your-speaker-mission-statement-55fm</link>
      <guid>https://dev.to/ceceliacreates/what-is-your-speaker-mission-statement-55fm</guid>
      <description>&lt;p&gt;How many of you have a speaker mission statement? Whether you are a regular speaker due to the nature of your job (looking at you, DevRel folks) or if you only speak occasionally, I recommend spending some crafting a mission statement for why and how you speak to audiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a speaker mission statement?
&lt;/h2&gt;

&lt;p&gt;About two years ago I came up with this idea, and it has helped me considerably with my approach to developer education. My mission statement is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Everyone who attends my talk will walk away with something actionable they can use right away to make their work easier.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It could be something technical like how to speed up mobile builds with caching, something more strategic like how to decide which testing approach to use or even a better understanding of the pros and cons of a larger concept like implementing automation. I always check my talk submission against my mission statement and make sure it passes the test before sending.&lt;/p&gt;

&lt;p&gt;Yours could be something like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everyone who attends my talk will have fun while learning something new&lt;/li&gt;
&lt;li&gt;Everyone who attends my talk will see first-hand live coding to gain deeper knowledge of how a tool or concept works&lt;/li&gt;
&lt;li&gt;Everyone who attends my talk will hear thought-provoking insights to improve how they lead a team&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why a speaker mission statement is important
&lt;/h2&gt;

&lt;p&gt;If you have a speaker mission statement, suddenly the process of writing abstracts becomes less overwhelming. It gives you clarity into what your goal should be, and over time it will also help you develop a specific style and niche as a speaker. This is true even if the topics you speak on vary wildly.&lt;/p&gt;

&lt;p&gt;For example, I’ve talked about automated testing, open source, debugging, Vue, React, cross-platform mobile development, CI/CD, GitHub, tech careers — but with every talk, people can expect to walk away with something actionable that will make their developer experience better (hopefully 😅).&lt;/p&gt;

&lt;p&gt;It also ensures that you get joy out of speaking, because it means the work that you are doing aligns with your values. Your speaker mission should reflect what you believe is important about why we get up on stage (or on webcam) and share knowledge. By giving talks that is in service of that mission, you are more energized and motivated by your work, which can help ease the risk of burnout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Crafting your own speaker mission statement
&lt;/h2&gt;

&lt;p&gt;If you aren’t sure where to start, consider these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are some of the best talks you’ve seen? What made them special or valuable to you?&lt;/li&gt;
&lt;li&gt;What kind of impact do you want to have on your audience? Do you want to inspire, educate, entertain, or provoke discussion?&lt;/li&gt;
&lt;li&gt;What do you uniquely bring to the table that you believe is important to share?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your answers to these questions will help solidify your speaker mission statement. Remember, it doesn't have to be perfect right away. You can always revise it as you grow and evolve as a speaker.&lt;/p&gt;

&lt;p&gt;What would you include in your speaker mission statement? Share in the comments below!&lt;/p&gt;

</description>
      <category>speaking</category>
      <category>devrel</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Hello from Team OutSystems!</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Mon, 22 Jan 2024 17:43:38 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/hello-from-team-outsystems-3941</link>
      <guid>https://dev.to/ceceliacreates/hello-from-team-outsystems-3941</guid>
      <description>&lt;p&gt;As you may remember, &lt;a href="https://ionic.io/" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt;, the company where I’ve worked as a Developer Advocate for the past year and a half, was &lt;a href="https://ionic.io/blog/ionic-outsystems-the-future-of-enterprise-app-development" rel="noopener noreferrer"&gt;acquired in late 2022 by OutSystems&lt;/a&gt;. As part of that acquisition, I’m excited to announce that I transitioned to a Lead Developer Advocate position on the OutSystems side of the house this past November. In my new role, I will continue doing what I love – making it easier for developers to build quality apps with a great user and developer experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  About OutSystems
&lt;/h2&gt;

&lt;p&gt;If you’re not familiar with OutSystems, don’t feel bad! I’ll admit I hadn’t heard of the platform at the time of the acquisition. This is a little surprising, considering they have been around since 2001, have more than 700k community members, and thousands of active customers in 87 countries. They are definitively the leader in the low-code industry, and it’s been great getting to know more of the team over the past few months.&lt;/p&gt;

&lt;p&gt;The OutSystems platform isn’t what you may picture when you think of low-code. Yes, there are drag-and-drop UI elements, but it’s more of a full-stack visual app dev framework built on top of React, .NET, and SQL (or a back end of your choice). It requires you to understand software architecture concepts, and the apps being built with OutSystems can be incredibly complex and used at massive scale.&lt;/p&gt;

&lt;p&gt;With my testing and DevOps background, I’m particularly interested in LifeTime – the infrastructure management and app delivery part of the platform. I’ll definitely be talking more in the future about how OutSystems is leveraging AI to improve DevOps processes and app considerations like performance, monitoring, scalability and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  What About Appflow?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ionic.io/appflow" rel="noopener noreferrer"&gt;Appflow&lt;/a&gt;, the mobile CI/CD platform built by Ionic, has been my focus during my time at the company and I’m incredibly proud of what the team has &lt;a href="https://dev.to/ceceliacreates/in-review-my-first-year-at-ionic-3ej"&gt;accomplished in 2023&lt;/a&gt;. We introduced Appflow to React Native, Android, and iOS developers, introduced additional features to our free plan to let developers start building faster, and continued to improve the mobile app delivery experience for thousands of users. &lt;/p&gt;

&lt;p&gt;You can expect more exciting things from the Ionic Developer Relations team, including new resources around &lt;a href="https://ionic.io/superapp-sdk" rel="noopener noreferrer"&gt;building and deploying superapps&lt;/a&gt; using Ionic technologies like Appflow and Portals. I’m looking forward to continuing to collaborate with the Ionic team to share how you can leverage OutSystems with your existing traditional developer toolkit as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  But… Low-Code?
&lt;/h2&gt;

&lt;p&gt;To address the elephant in the room, low-code tools definitely have a bad reputation. Among other things, I’ve heard they’re not meant for “real” apps, they require less skill from developers, and it’s impossible to build quality, performant apps with low-code tools.&lt;/p&gt;

&lt;p&gt;Well, that sounds a lot like what people say about cross-platform developer tools like Ionic. 😉&lt;/p&gt;

&lt;p&gt;If you’ve read my blog posts or seen any of my conference talks, you know that I always advocate for using the right tools for the job at hand. I am honest about limitations and tradeoffs of different approaches, and am guilty of frequently saying “it depends”. My goal is always to help the developer find the right solution and then get up and running fast so they can get the most out of whatever tool is best for them.&lt;/p&gt;

&lt;p&gt;I’ll continue to do that as an OutSystems Lead Developer Advocate. I’ve been learning more about the platform’s capabilities, and for enterprise developers that want to build serious apps at scale, iterate quickly, and abstract away the more tedious parts of software development, OutSystems is a clear choice. &lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;This year, I’m looking forward to getting to know more of the OutSystems community, including our &lt;a href="https://www.outsystems.com/community/advocacy-programs/mvps/" rel="noopener noreferrer"&gt;MVPs&lt;/a&gt; and &lt;a href="https://www.outsystems.com/community/advocacy-programs/champions/" rel="noopener noreferrer"&gt;Champions&lt;/a&gt;, and the contributors to our open source component library, Forge.&lt;/p&gt;

&lt;p&gt;OutSystems has a massive, engaged community of developers and I’m excited to understand how I can best help them use the platform and continue to advance in their careers. One program I’m particularly excited about is using my experience as a speaker to help other speakers in the community develop and grow.&lt;/p&gt;

&lt;p&gt;I’ll also be reaching out to developers like me – developers that are fluent with other languages but brand new to the OutSystems platform. Every day, developers previously using Java, C#, and JavaScript, start using OutSystems and need to get familiar with the platform as quickly as possible. My goal is to talk to software developers and DevOps engineers, get their perspective on the platform, and build resources for their unique development needs.&lt;/p&gt;

&lt;p&gt;I’m also continuing my volunteer work with Women Who Code Mobile and Out in Tech, and am grateful to OutSystems for their support of my efforts to build inclusive developer communities.&lt;/p&gt;

&lt;p&gt;Ultimately, not much has changed. I’ll continue to work with developer communities, help them find the best tools for their needs, and build resources for them to succeed. &lt;/p&gt;

&lt;p&gt;Here’s to a great 2024!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Game with Phaser</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Fri, 15 Sep 2023 21:49:23 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-building-a-phaser-game-2f74</link>
      <guid>https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-building-a-phaser-game-2f74</guid>
      <description>&lt;p&gt;Welcome to Part Two of this four-part series on building a mobile game using open source technologies. We'll be using Phaser, along with &lt;a href="https://ionicframework.com/" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt;, &lt;a href="https://capacitorjs.com/" rel="noopener noreferrer"&gt;Capacitor&lt;/a&gt;, and &lt;a href="https://v3.vuejs.org/" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❓&lt;strong&gt;Are you interested in a video walkthrough version of this blog post?&lt;/strong&gt; Let me know in the comments! If there's enough interest I can put one together.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;a href="https://github.com/ceceliacreates/phaser-tutorial" rel="noopener noreferrer"&gt;source code for this tutorial is here&lt;/a&gt;, and I'll reference specific commits throughout so you can see the specific changes for each section.&lt;/p&gt;

&lt;p&gt;This post is heavily influenced by the &lt;a href="https://phaser.io/tutorials/making-your-first-phaser-3-game/part1" rel="noopener noreferrer"&gt;tutorial from the official Phaser docs&lt;/a&gt; (we'll even use the assets they provide as well). I recommend going through the tutorial if you want to learn more about Phaser concepts. We'll keep it pretty high level here for brevity.&lt;/p&gt;

&lt;p&gt;In this post, we'll actually walk through making the Phaser game! It's a big section and there are a lot of new concepts to learn, so let's jump right in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Creating Scenes&lt;/li&gt;
&lt;li&gt;
Adding Game Objects

&lt;ul&gt;
&lt;li&gt;Detour: Adjusting Game Window&lt;/li&gt;
&lt;li&gt;Preloading Assets&lt;/li&gt;
&lt;li&gt;Displaying Images&lt;/li&gt;
&lt;li&gt;Animating Game Objects&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Responding to Player Input

&lt;ul&gt;
&lt;li&gt;Setting Player Physics&lt;/li&gt;
&lt;li&gt;Adding Event Handlers&lt;/li&gt;
&lt;li&gt;Handling movement in update method&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Dynamically Generating Game Objects&lt;/li&gt;

&lt;li&gt;

Adding Collision &amp;amp; Overlap Handlers

&lt;ul&gt;
&lt;li&gt;Adding Colliders&lt;/li&gt;
&lt;li&gt;Adding Overlaps&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;What's Next&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating Scenes
&lt;/h2&gt;

&lt;p&gt;We talked about scenes briefly last week. Scenes are a core concept in Phaser and other game dev frameworks. You can think of Scenes like Views in a web app, but with some additional flexibility. Your player will navigate between Scenes, and sometimes multiple Scenes can run simultaneously.&lt;/p&gt;

&lt;p&gt;Right now we have a single MainScene in our app.&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;game&lt;/code&gt; directory, create a &lt;code&gt;PlayScene.js&lt;/code&gt; and &lt;code&gt;ScoreScene.js&lt;/code&gt; file. We'll work with the &lt;code&gt;PlayScene.js&lt;/code&gt; file first, as this will contain the majority of our game.&lt;/p&gt;

&lt;p&gt;Add the following code to your Play scene:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PlayScene&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;24px Courier&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#ffffff&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;    
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, in your &lt;code&gt;game.js&lt;/code&gt; file, remove the &lt;code&gt;MainScene&lt;/code&gt; class we defined in the last blog post. We'll need to update our import statement and config to include the new &lt;code&gt;PlayScene&lt;/code&gt; instead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/game.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;PlayScene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./PlayScene.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RESIZE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;autoCenter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CENTER_BOTH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;game&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#201726&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;arcade&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PlayScene&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's not much, but now we have separate files for our scenes, which will make it easier to work with them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/571e34a43f8895b251f53ceaa433745264585027" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Adding Game Objects
&lt;/h2&gt;

&lt;p&gt;When working with Phaser, almost everything we interact with is a Game Object. Game Objects can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have Physics applied&lt;/li&gt;
&lt;li&gt;Be images, text, sprites, etc.&lt;/li&gt;
&lt;li&gt;Be Static or Dynamic&lt;/li&gt;
&lt;li&gt;Be categorized into Groups&lt;/li&gt;
&lt;li&gt;And much, much more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For our game, we'll be working with the following objects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/player.png" rel="noopener noreferrer"&gt;player&lt;/a&gt; sprite that moves left and right with animation&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/platform.png" rel="noopener noreferrer"&gt;platform&lt;/a&gt; static object that our player walks on&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/leftarrow.png" rel="noopener noreferrer"&gt;Left&lt;/a&gt; and &lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/rightarrow.png" rel="noopener noreferrer"&gt;right&lt;/a&gt; arrows for input to move our player&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/star.png" rel="noopener noreferrer"&gt;star&lt;/a&gt; object that falls from the top of the screen and increases the score on collision with the player&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://github.com/ceceliacreates/phaser-tutorial/blob/main/public/assets/bomb.png" rel="noopener noreferrer"&gt;bomb&lt;/a&gt; object that falls from the top of the screen and ends the game on collision with the player&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Within the &lt;code&gt;public&lt;/code&gt; directory in the root of your project, create a new &lt;code&gt;assets&lt;/code&gt; folder. Save the above linked images in this folder with the following file names:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;player.png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;platform.png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;leftarrow.png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rightarrow.png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;star.png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bomb.png&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Detour: Adjusting Game Window
&lt;/h3&gt;

&lt;p&gt;Before we move onto adding Game Objects, we need to make a small fix to our app that I discovered while writing. Right now, we have a collapsible header on iPhone. This could affect our game window size. Update the Play, About, and Scores pages in your &lt;code&gt;/src/views&lt;/code&gt; directory to &lt;strong&gt;remove&lt;/strong&gt; &lt;code&gt;:fullscreen=true&lt;/code&gt; from the &lt;code&gt;&amp;lt;ion-content&amp;gt;&lt;/code&gt; component, and remove the entire &lt;code&gt;&amp;lt;ion-header&amp;gt;&lt;/code&gt; component and children that is inside &lt;code&gt;&amp;lt;ion-content&amp;gt;&lt;/code&gt;. Your updated Page template should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/views/PlayPage.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;toolbar&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Play&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-title&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-toolbar&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-header&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;PhaserContainer&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-content&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-page&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can move on! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/312b2d0d74d7e22d1dd48d61e40c9159854286a9" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Preloading Assets
&lt;/h3&gt;

&lt;p&gt;Right now, inside our &lt;code&gt;PlayScene&lt;/code&gt; class, we have a &lt;code&gt;constructor&lt;/code&gt; and a &lt;code&gt;create ()&lt;/code&gt; method. There are two other lifecycle methods provided by Phaser: &lt;code&gt;preload ()&lt;/code&gt; and &lt;code&gt;update ()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;preload ()&lt;/code&gt; method is used to preload assets that will be used in our game.&lt;/p&gt;

&lt;p&gt;Update your &lt;code&gt;PlayScene.js&lt;/code&gt; file to preload the assets we just saved. Go ahead and also remove the text in the &lt;code&gt;create ()&lt;/code&gt; method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PlayScene&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PlayScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;preload &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;star&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/star.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bomb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/bomb.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;platform&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/platform.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leftArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/leftarrow.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rightArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/rightarrow.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;spritesheet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assets/player.png&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;frameWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;frameHeight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;   
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The star, bomb, platform, and arrow images are added with &lt;code&gt;this.load.image()&lt;/code&gt;, where we pass a unique key and the path for the image file. &lt;/p&gt;

&lt;p&gt;The player is loaded using what's called a sprite sheet. A sprite sheet contains multiple poses of our player in the same image. This is helpful for animating our player. We use &lt;code&gt;this.load.spritesheet()&lt;/code&gt;, again passing a key and path, but also setting the &lt;code&gt;frameWidth&lt;/code&gt; and &lt;code&gt;frameHeight&lt;/code&gt; of each individual pose (or "frame") in our image.&lt;/p&gt;

&lt;h3&gt;
  
  
  Displaying Images
&lt;/h3&gt;

&lt;p&gt;Our asset are preloaded, but nothing is showing on the screen! We need to create game objects using our image assets.&lt;/p&gt;

&lt;p&gt;Phaser uses pixels for all positioning and scaling. Many examples simply provide hard-coded values, which can work fine on browsers in a desktop device, but not for mobile.&lt;/p&gt;

&lt;p&gt;Because of this, we need to do some math to make our displayed images responsive to the user's device screen.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; I'd recommend playing around with these values based on the device screen. In &lt;a href="https://github.com/ceceliacreates/ionitron-game/blob/main/src/game/scenes/PlayScene.js#L79" rel="noopener noreferrer"&gt;a more complex example here&lt;/a&gt;, I am scaling everything and adding logic checks rather than hard-coding values. However, for simplicity, I'm hard-coding for an iPhone 12 Pro in this tutorial.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Phaser provides &lt;code&gt;this.scale.width&lt;/code&gt; and &lt;code&gt;this.scale.height&lt;/code&gt; that returns the current screen width and height values. We can use these to calculate the center of our screen and where we should place objects.&lt;/p&gt;

&lt;p&gt;If we think about our game layout, we'll need to calculate the height of a game play area, as well as the height of a controls area. This will help us determine where on the Y axis we need to place our platform, player, and arrow controls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj61azzxnnjnk7gghd6av.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj61azzxnnjnk7gghd6av.png" alt="Mockup of game with designated areas" width="615" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; We need to calculate the game size &lt;strong&gt;within&lt;/strong&gt; our &lt;code&gt;create ()&lt;/code&gt; method and not in our &lt;code&gt;gameState&lt;/code&gt; because the game needs to be initiated first to access the screen size values.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add the following code to your &lt;code&gt;create ()&lt;/code&gt; method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// sets game values based on screen size&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;controlsAreaHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;controlsAreaHeight&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// adds the player, platform, and controls&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;staticImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;platform&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;refreshBody&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sprite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;leftArrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leftArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setInteractive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rightArrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rightArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setInteractive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the first section, we've calculated the center of the screen. We've also set a &lt;code&gt;controlsAreaHeight&lt;/code&gt; to take up about 20% of the bottom of the screen, and the &lt;code&gt;gameAreaHeight&lt;/code&gt; to be the difference.&lt;/p&gt;

&lt;p&gt;To create a game object, we'll use the relevant &lt;code&gt;add&lt;/code&gt; method, passing an X coordinate, Y coordinate, and image key.&lt;/p&gt;

&lt;p&gt;Let's break these down individually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;staticImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;platform&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;refreshBody&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We've added the platform as a static image, which gives it physics properties so other game objects can interact with the platform. One thing to note here is &lt;code&gt;setOrigin()&lt;/code&gt;. By default Phaser positions images based on the &lt;strong&gt;center&lt;/strong&gt; of the image. By changing the origin to &lt;code&gt;(0, 0)&lt;/code&gt;, I am telling Phaser to position starting from the bottom left corner instead. Whenever we change the position or scale of a static body, we need to tell Phaser to adjust for this change. That is what &lt;code&gt;refreshBody()&lt;/code&gt; is doing here.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sprite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the player, I'm adding a sprite. For the Y coordinate, I'm doing some math and placing the player at the &lt;code&gt;gameAreaHeight&lt;/code&gt;, but &lt;strong&gt;subtracting half the player height&lt;/strong&gt;. This is because, again, Phaser positions from the &lt;strong&gt;center&lt;/strong&gt; of the image. This results in the player standing nicely on top of the platform. &lt;/p&gt;

&lt;p&gt;If I wanted to, I could use &lt;code&gt;setOrigin()&lt;/code&gt; to position from the bottom instead, but I wanted to demonstrate how you would position an item by default in Phaser as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;leftArrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leftArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setInteractive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rightArrow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rightArrow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;setInteractive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the arrows, I'm sticking with &lt;code&gt;setOrigin(0, 0)&lt;/code&gt; because it's easier for me to position based on the lower left corner with the math I'm doing. I'm positioning the arrows 40 pixels (half the size of the arrows) below the &lt;code&gt;gameAreaHeight&lt;/code&gt;, the left arrow 10% of the way from the left and the right arrow 70% of the way from the left of the screen edge.&lt;/p&gt;

&lt;p&gt;I'm using &lt;code&gt;setInteractive()&lt;/code&gt; so that we can assign touch/click handlers to the arrows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Animating Game Objects
&lt;/h3&gt;

&lt;p&gt;If you save what we have so far, you see our player standing on the platform and facing the left. This is because Phaser is using the first frame of our spritesheet by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnu6ditc6jr1dxs3bchdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnu6ditc6jr1dxs3bchdr.png" alt="Screenshot of app so far" width="494" height="922"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's set up some animations so when our character moves, we can leverage all the poses in the spritesheet. This code comes mostly from &lt;a href="https://phaser.io/tutorials/making-your-first-phaser-3-game/part5" rel="noopener noreferrer"&gt;the official Phaser tutorial&lt;/a&gt;, so I won't dig into too much. I did add a logic check so it doesn't create a new animation if one already exists when the game restarts.&lt;/p&gt;

&lt;p&gt;But you can see we are defining an animation key, providing an image key, stating what frames to loop through, and establishing a loop for each animation. The "turn" animation is the player simply facing forward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//game/PlayScene.js&lt;/span&gt;

&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
     &lt;span class="c1"&gt;// adds animations for player&lt;/span&gt;
     &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;left&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateFrameNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
          &lt;span class="na"&gt;frameRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;turn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;turn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateFrameNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
          &lt;span class="na"&gt;frameRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our player is still facing left because we'll leverage these animations once our player starts moving in the next section.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/cbcf862523ef5f261dd42e4dadc37851dcc481cf" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Responding to Player Input
&lt;/h2&gt;

&lt;p&gt;In order for our player to animate, he needs to move! Let's add some event handlers for our arrow buttons next.&lt;/p&gt;

&lt;p&gt;First, we need to make sure our player is ready for the physics of moving and interacting with our game world.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting Player Physics
&lt;/h3&gt;

&lt;p&gt;Add the following code inside your &lt;code&gt;create ()&lt;/code&gt; method, underneath the animations we just added.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;

&lt;span class="c1"&gt;// sets player physics&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setGravityY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setCollideWorldBounds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// adds collider between player and platforms&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For gravity, we could set a default game-level gravity. However, we want our player to move differently than our stars and bombs, so we're setting it on the object directly instead. &lt;code&gt;setColliderWorldBounds()&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; means our player cannot go off screen, and adding a collider between the player and platform means the player will stay on top of the platform as he moves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Event Handlers
&lt;/h3&gt;

&lt;p&gt;Now we'll add event handlers for &lt;code&gt;pointerdown&lt;/code&gt; and &lt;code&gt;pointerup&lt;/code&gt; events. These will translate to touch events once we're on a mobile device.&lt;/p&gt;

&lt;p&gt;Still in our &lt;code&gt;create ()&lt;/code&gt; method, add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;

&lt;span class="c1"&gt;// event handlers for arrow input&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveRight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;leftArrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerdown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;leftArrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerup&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveLeft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rightArrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerdown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveRight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rightArrow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerup&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveRight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are using two variables, &lt;code&gt;moveLeft&lt;/code&gt; and &lt;code&gt;moveRight&lt;/code&gt;, to track whether our player is in motion based on what arrows are being pressed.&lt;/p&gt;

&lt;p&gt;However, we are not actually telling the player to move yet. Where do we do that? In our &lt;code&gt;update ()&lt;/code&gt; method.&lt;/p&gt;

&lt;h3&gt;
  
  
  Handling movement in update method
&lt;/h3&gt;

&lt;p&gt;So far we have primarily been working in our &lt;code&gt;create ()&lt;/code&gt; method, which is executed when the game is initialized. &lt;/p&gt;

&lt;p&gt;In comparison, the &lt;code&gt;update ()&lt;/code&gt; method runs every frame of the game. This is where we can control actions that need to &lt;em&gt;update&lt;/em&gt; once the game has already started.&lt;/p&gt;

&lt;p&gt;Inside our &lt;code&gt;update ()&lt;/code&gt; method, add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;

&lt;span class="nf"&gt;update &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveLeft&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveRight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setVelocityX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveRight&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;moveLeft&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setVelocityX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;    
     &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setVelocityX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;anims&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;turn&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, when &lt;code&gt;moveLeft&lt;/code&gt; is set to true by the &lt;code&gt;pointerdown&lt;/code&gt; event handler, we set the player velocity to move left, and play the &lt;code&gt;left&lt;/code&gt; animation. We handle the &lt;code&gt;moveRight&lt;/code&gt; boolean change the same way.&lt;/p&gt;

&lt;p&gt;By default, our player is not moving in either direction, with the &lt;code&gt;turn&lt;/code&gt; animation playing, which results in the player facing forward.&lt;/p&gt;

&lt;p&gt;If you save now, you can try it out for yourself!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/06fca36d02182f918cd6e92e2ccccf1680bfc947" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Dynamically Generating Game Objects
&lt;/h2&gt;

&lt;p&gt;Our player can now move in the game world, but it's pretty boring. Let's give him something to do by generating stars for him to collect and bombs for him to avoid.&lt;/p&gt;

&lt;p&gt;Add the following code to the end of your &lt;code&gt;create ()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="c1"&gt;// Adds generated stars&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;group&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;gravityY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createStar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;star&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;star&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createStarLoop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEvent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="c1"&gt;// random number between 1 and 1.2 seconds&lt;/span&gt;
  &lt;span class="na"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1200&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;createStar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;callbackScope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break down what's happening in each block.&lt;/p&gt;

&lt;p&gt;First, we are creating a physics group called &lt;code&gt;stars&lt;/code&gt;. This is helpful when we have a category of game objects and want the same physics applied to each individual game object in that group. In this case, we are applying a &lt;code&gt;gravityY&lt;/code&gt; of 300.&lt;/p&gt;

&lt;p&gt;Next, we are writing a function called &lt;code&gt;createStar&lt;/code&gt; that creates a new &lt;code&gt;star&lt;/code&gt; object within our &lt;code&gt;stars&lt;/code&gt; group, placing it at a random X coordinate and the 0 Y coordinate (top of the screen) using the key for our star image.&lt;/p&gt;

&lt;p&gt;Finally, we are using &lt;code&gt;this.time.addEvent&lt;/code&gt; provided by Phaser to create a loop. This Phaser method works like &lt;code&gt;setTimeout&lt;/code&gt;, in that you provide a delay in MS and a callback function. We are also referencing our &lt;code&gt;this&lt;/code&gt; object for the &lt;code&gt;callbackScope&lt;/code&gt; and setting &lt;code&gt;loop&lt;/code&gt; to true so it repeats.&lt;/p&gt;

&lt;p&gt;Once you save and refresh, you'll see stars falling from the sky at random X positions and at random intervals between 1 and 1.2 seconds.&lt;/p&gt;

&lt;p&gt;We'll repeat the process for our bombs. However, we want our bombs to drop much faster but also appear less frequently.&lt;/p&gt;

&lt;p&gt;Add the following code to &lt;code&gt;create ()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="c1"&gt;// Adds generated bombs&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;group&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;gravityY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createBomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenWidth&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bomb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setScale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;refreshBody&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createBombLoop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEvent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="c1"&gt;// random number between 4.5 and 5 seconds&lt;/span&gt;
  &lt;span class="na"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;4500&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;4500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;createBomb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;callbackScope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have bombs that drop every 4.5-5 seconds at a high speed. I also scaled up the bombs with &lt;code&gt;setScale(2).refreshBody()&lt;/code&gt; to double the original image size so they are easier to see as they fall.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjkp46m521pcvtcz7xtn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjkp46m521pcvtcz7xtn.png" alt="Screenshot of stars and bombs falling" width="489" height="911"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should now see stars and bombs falling down on your player!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/7c7f8fd3c16c4af335849b18f65df54204d5e58e" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Adding Collision &amp;amp; Overlap Handlers
&lt;/h2&gt;

&lt;p&gt;We are almost done! All we have to do now is handle what happens when our player interacts with the stars and bombs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Colliders
&lt;/h2&gt;

&lt;p&gt;You may remember that we added a collider earlier between the player and platform.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When we add a collider in Phaser without a callback, the default behavior is for the two objects to simply block or push against each other upon collision, without passing through each other.&lt;/p&gt;

&lt;p&gt;We can set a collider with a callback function to complete additional steps when two items collide.&lt;/p&gt;

&lt;p&gt;For example, our stars and bombs should not go past the platform. Let's add a collider for these and destroy the star or bomb when it collides with the platform.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="c1"&gt;// Adds colliders between stars and bombs with platform&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;star&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;star&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;star&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bomb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code will trigger the callback function whenever the two objects collide, determine which object is the object we went to destroy, then call the Phaser-provided &lt;code&gt;destroy()&lt;/code&gt; method on that object. Our stars and bombs should now disappear when they collide with the platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Overlaps
&lt;/h3&gt;

&lt;p&gt;Finally, we need to add overlap handlers that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;increase the game score when our player overlaps with a star&lt;/li&gt;
&lt;li&gt;ends the game when the player overlaps with a bomb&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An overlap is different than a collider in that it only &lt;em&gt;checks&lt;/em&gt; if two objects overlap, rather than &lt;em&gt;preventing&lt;/em&gt; them from colliding. We'll use overlap for the interactions between our player with stars and bombs.&lt;/p&gt;

&lt;p&gt;Add the following, again to your &lt;code&gt;create ()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;

&lt;span class="c1"&gt;// Adds overlap between player and stars&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scoreText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameAreaHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Score: 0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;16px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#000&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;overlap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;star&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;star&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scoreText&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Score: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the first block, we are creating a starting score of 0 and displaying that text on the screen over the platform. This should look familiar to how we created other game objects, passing an X and Y value and then the text to &lt;code&gt;this.add.text()&lt;/code&gt;. We can also set CSS values in an object passed to the fourth parameter.&lt;/p&gt;

&lt;p&gt;Then, we are creating an overlap between the player and the stars group with a callback function that does four things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks which overlap object is the star&lt;/li&gt;
&lt;li&gt;Destroys the star&lt;/li&gt;
&lt;li&gt;Increases the score by 10 points&lt;/li&gt;
&lt;li&gt;Resets the score text with &lt;code&gt;this.scoreText.setText()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We need to pass the additional &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;this&lt;/code&gt; parameters to &lt;code&gt;this.physics.add.overlap()&lt;/code&gt; so that we have access to our &lt;code&gt;this&lt;/code&gt; object inside the callback function.&lt;/p&gt;

&lt;p&gt;We can repeat this for our bombs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/PlayScene.js&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="c1"&gt;// Adds overlap between player and bombs&lt;/span&gt;

&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;overlap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;player&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bombs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bomb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;player&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;object1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;bomb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;createStarLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;createBombLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gameOverText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenCenterX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;screenHeight&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Game Over&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;32px&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pointerup&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is similar to our star overlap in that we are checking which object is the bomb, then destroying it. However, after that, we have functionality that handles the end of the game.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;createStarLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;createBombLoop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pause&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These lines essentially stop our game world by destroy the loops that create new stars and bombs, as well as pausing all the physics taking place in the game. &lt;/p&gt;

&lt;p&gt;Then, we add "Game Over" text to the middle of the screen.&lt;/p&gt;

&lt;p&gt;Finally, we are adding a &lt;code&gt;pointerup&lt;/code&gt; event handler that lets the user restart the game. This resets the score to 0 and restarts the game on click/tap. It's important that this event handler is &lt;strong&gt;inside&lt;/strong&gt; your overlap callback so it only fires after the player interacts with a bomb.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n86thjq3x3ugbxv5i3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0n86thjq3x3ugbxv5i3v.png" alt="Screenshot of Game Over screen" width="489" height="911"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations, you now have a game!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/635f073b073838f2761bc05de94021bbd49ba06d" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Next week, we'll create our Score scene, talk about transitioning scenes, as well as how to interact between our Phaser game and the Ionic Vue app by exporting scores.&lt;/p&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

</description>
      <category>ionic</category>
      <category>vue</category>
      <category>game</category>
    </item>
    <item>
      <title>Creating an Ionic Vue + Phaser App</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Fri, 08 Sep 2023 17:41:36 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-part-one-3e0o</link>
      <guid>https://dev.to/ceceliacreates/building-a-mobile-game-with-phaser-and-ionic-vue-part-one-3e0o</guid>
      <description>&lt;p&gt;I love playing video games, especially console and mobile games. I learned about &lt;a href="https://phaser.io/" rel="noopener noreferrer"&gt;Phaser&lt;/a&gt; (an open source framework for building games with JavaScript) last year and have wanted to try out game development using the skills I already have as a web developer.&lt;/p&gt;

&lt;p&gt;Turns out, it's easier than I expected! Thanks to Phaser, along with &lt;a href="https://ionicframework.com/" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt;, &lt;a href="https://capacitorjs.com/" rel="noopener noreferrer"&gt;Capacitor&lt;/a&gt;, and &lt;a href="https://v3.vuejs.org/" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;, I was able to get &lt;a href="https://github.com/ceceliacreates/ionitron-game" rel="noopener noreferrer"&gt;a mobile game&lt;/a&gt; up and running on an iOS device working only a few hours here and there over two weeks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpppgucl74366qgv87no5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpppgucl74366qgv87no5.png" alt="Ionitron game screenshot" width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Blog Series Overview
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;❓&lt;strong&gt;Are you interested in a video walkthrough version of this blog post?&lt;/strong&gt; Let me know in the comments! If there's enough interest I can put one together.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This blog series will walk through how to use Phaser, Ionic Vue, and Capacitor to build a mobile game of your own and run it on an actual mobile device. &lt;/p&gt;

&lt;p&gt;For this series, we'll make a simplified version of the Ionitron game linked above to illustrate the concepts you'll need to learn to make your own game.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/ceceliacreates/phaser-tutorial" rel="noopener noreferrer"&gt;source code for this tutorial is here&lt;/a&gt;, and I'll reference specific commits throughout so you can see the specific changes for each section.&lt;/p&gt;

&lt;h3&gt;
  
  
  What We're Building
&lt;/h3&gt;

&lt;p&gt;This is a Vue mobile app built with Ionic Framework components that houses a Phaser game. We'll also use Capacitor to compile the app to native IOS and Android so it can run on mobile devices.&lt;/p&gt;

&lt;p&gt;The app has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Play tab that launches the Phaser game for play&lt;/li&gt;
&lt;li&gt;An About tab that describes the game&lt;/li&gt;
&lt;li&gt;A Scores tab that shows your score history for the game&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Creating a new Ionic Vue app

&lt;ul&gt;
&lt;li&gt;Setting up the Ionic CLI&lt;/li&gt;
&lt;li&gt;Starting a new app&lt;/li&gt;
&lt;li&gt;Customizing Tabs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Adding Phaser to the app

&lt;ul&gt;
&lt;li&gt;Phaser Installation&lt;/li&gt;
&lt;li&gt;Creating a Phaser game component&lt;/li&gt;
&lt;li&gt;Creating Phaser launch function&lt;/li&gt;
&lt;li&gt;Creating our first Phaser Scene&lt;/li&gt;
&lt;li&gt;Putting it all together&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;What's Next&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating a new Ionic Vue app
&lt;/h2&gt;

&lt;p&gt;First we'll create a new Ionic Vue app using the Tabs starter template.&lt;/p&gt;

&lt;p&gt;I'll use the &lt;a href="https://ionicframework.com/docs/intro/cli" rel="noopener noreferrer"&gt;Ionic CLI&lt;/a&gt; for this, but you can also use the &lt;a href="https://ionicframework.com/docs/intro/vscode-extension" rel="noopener noreferrer"&gt;Ionic VS Code Extension&lt;/a&gt; if you prefer.&lt;/p&gt;

&lt;p&gt;Install the Ionic CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @ionic/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the following to create a new app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic start phaserGame tabs &lt;span class="nt"&gt;--type&lt;/span&gt; vue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, &lt;code&gt;cd&lt;/code&gt; into the directory and run &lt;code&gt;ionic serve&lt;/code&gt; to start the dev server and open the web version of our app in a browser. Switch your browser to mobile view using DevTools as you're working to see how the app will look on mobile.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftl1uvyy20h9jzfjh8cjr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftl1uvyy20h9jzfjh8cjr.png" alt="Screenshot of tabs starter app" width="522" height="949"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We now have an Ionic Vue app with three tabs on the bottom for navigation.&lt;/p&gt;

&lt;p&gt;Change the tab names to "Play", "About", and "Scores", and update the router and file names to correspond with the new names. Feel free to update the icons as well.&lt;/p&gt;

&lt;p&gt;You'll need to change the following files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src/router/index.ts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;All the files in &lt;code&gt;src/views&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/e909da30857c811695fceb2ed850e9df446f2e53" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Adding Phaser to the app
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Phaser Installation
&lt;/h3&gt;

&lt;p&gt;Phaser has an NPM package we can install into our project.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;npm install phaser&lt;/code&gt;. This will add the dependency to your &lt;code&gt;package.json&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"dependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"phaser"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^3.60.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/c6192d56b075a86e86ff6dfd75c1cfe548cea221" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Creating a Phaser game component
&lt;/h3&gt;

&lt;p&gt;Let's create a component that will manage launching our Phaser game.&lt;/p&gt;

&lt;p&gt;Create a &lt;code&gt;PhaserContainer.vue&lt;/code&gt; file inside &lt;code&gt;src/components&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This component will contain the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A button to start the game&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;div&lt;/code&gt; that will be the parent for the Phaser game&lt;/li&gt;
&lt;li&gt;A click handler for the button that hides the button and runs a Phaser launch command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add the following &lt;code&gt;template&lt;/code&gt; to your &lt;code&gt;PhaserContainer&lt;/code&gt; component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/PhaserContainer.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;game&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;showButton&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;click&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;handleClickStart&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Start&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The id of "game" on the &lt;code&gt;div&lt;/code&gt; will be passed to Phaser so it knows what HTML element is the parent for our game.&lt;/p&gt;

&lt;p&gt;Now add the following &lt;code&gt;script&lt;/code&gt; to your component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/PhaserContainer.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IonButton&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ionic/vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// binds to the v-if on our button to toggle visibility&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;showButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Creates the new Phaser Game instance&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// We'll fill this in later&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleClickStart&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// hides launch button&lt;/span&gt;
  &lt;span class="nx"&gt;showButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Runs the launch function&lt;/span&gt;
  &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We'll also add some styling to make our button in the middle of the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/PhaserContainer.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="nx"&gt;scoped&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="nx"&gt;game&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;justify&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/style&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now our &lt;code&gt;PhaserContainer&lt;/code&gt; component is ready! We just need to add it to our &lt;code&gt;PlayPage&lt;/code&gt; view.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/views/PlayPage.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;toolbar&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Play&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-title&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-toolbar&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-header&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;fullscreen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;true&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt; &lt;span class="nx"&gt;collapse&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;condense&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;toolbar&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;large&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Play&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-title&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-toolbar&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-header&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;PhaserContainer&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-content&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ion-page&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IonPage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonHeader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonToolbar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;IonContent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ionic/vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;PhaserContainer&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/components/PhaserContainer.vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/ca9586ff011bf008c13bf1ba0bf15c936cc5d439" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Creating Phaser launch function
&lt;/h3&gt;

&lt;p&gt;Our &lt;code&gt;PhaserContainer&lt;/code&gt; component is working, but nothing happens when we click "Start" because we still need to write our &lt;code&gt;launch()&lt;/code&gt; function. Let's do that next!&lt;/p&gt;

&lt;p&gt;Our &lt;code&gt;launch()&lt;/code&gt; function returns a new &lt;code&gt;Phaser.Game&lt;/code&gt; object with the configuration for our game, as well as the scene(s) for the game.&lt;/p&gt;

&lt;p&gt;To keep our component clean and enforce separation of concerns, let's move our &lt;code&gt;launch()&lt;/code&gt; function to a separate file.&lt;/p&gt;

&lt;p&gt;Create a new &lt;code&gt;game&lt;/code&gt; directory within &lt;code&gt;src&lt;/code&gt; with a new &lt;code&gt;game.js&lt;/code&gt; file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: While Phaser does have some TypeScript support, I ran into several issues when trying to use Phaser with TS. For simplicity, we'll use JS for our Phaser game code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Within this file, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/game.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RESIZE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;autoCenter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CENTER_BOTH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;devicePixelRatio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;game&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#201726&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;physics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;arcade&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MainScene&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are several things happening here, so let's break them down.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We are returning a Phaser &lt;code&gt;Game&lt;/code&gt; object that contains a configuration object.&lt;/li&gt;
&lt;li&gt;The type of &lt;code&gt;AUTO&lt;/code&gt; means that Phaser will detect if it should use WebGL or Canvas to render the game&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://rexrainbow.github.io/phaser3-rex-notes/docs/site/scalemanager/" rel="noopener noreferrer"&gt;scale property&lt;/a&gt; handles our sizing and display. The &lt;code&gt;Scale.RESIZE&lt;/code&gt; mode means the game will resize to fit the parent window. If you want your game to always have the same aspect ratio, use &lt;code&gt;Scale.FIT&lt;/code&gt; instead.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Scale.CENTER_BOTH&lt;/code&gt; means the game is centered both vertically and horizontally within the parent&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;window.innerWidth * window.devicePixelRatio&lt;/code&gt; and the corresponding height values will make the game dynamic to the window, and ensure quality rendering on high-DPI (retina) displays&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;parent&lt;/code&gt; value is the id of our parent &lt;code&gt;div&lt;/code&gt; HTML element&lt;/li&gt;
&lt;li&gt;We're setting a &lt;code&gt;backgroundColor&lt;/code&gt; for the game, this is optional&lt;/li&gt;
&lt;li&gt;We're setting a &lt;a href="https://photonstorm.github.io/phaser3-docs/Phaser.Physics.html" rel="noopener noreferrer"&gt;Physics engine type&lt;/a&gt; of &lt;code&gt;arcade&lt;/code&gt;. This is suitable for simple games and is more performant for mobile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last property is &lt;code&gt;scene&lt;/code&gt;, and this defines the scenes in our game.&lt;/p&gt;

&lt;p&gt;Scenes are a core concept in Phaser and other game dev frameworks. You can think of Scenes like Views in a web app, but with some additional flexibility. Your player will navigate between Scenes, and sometimes multiple Scenes can run simultaneously.&lt;/p&gt;

&lt;p&gt;We'll explore more about Scenes later in this series. For now, we'll start with a single Main Scene to start the game.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/22922670ab4572035b807d5ab2b3c9f1ab1610fe" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Creating our first Phaser Scene
&lt;/h3&gt;

&lt;p&gt;We've passed a value of &lt;code&gt;MainScene&lt;/code&gt; to our &lt;code&gt;scene&lt;/code&gt; property for our game, so let's create that next.&lt;/p&gt;

&lt;p&gt;In the same &lt;code&gt;game.js&lt;/code&gt; file, update your Phaser import statement to include &lt;code&gt;Scene&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/game.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;AUTO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Scene&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phaser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, add the following code, again in the same file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/game/game.js&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MainScene&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Scene&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;constructor &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MainScene&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;create &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello Phaser!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;24px Courier&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#ffffff&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Scenes in Phaser are classes that extend the &lt;a href="https://photonstorm.github.io/phaser3-docs/Phaser.Scene.html" rel="noopener noreferrer"&gt;Phaser Scene class&lt;/a&gt;. The key 'MainScene' is how we'll reference this scene in our game.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;create()&lt;/code&gt; block is one of the Phaser lifecycle methods. We'll learn more about other lifecycle methods in later posts in this series.&lt;/p&gt;

&lt;p&gt;For now, know that we are using the &lt;code&gt;create()&lt;/code&gt; block to add some initial text to our game. The first two parameters &lt;code&gt;100, 100&lt;/code&gt; refers to the x and y coordinates of the text.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/6dc0f966ffb5726ab687fee12c612e1ffa3d4f79" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Putting it all together
&lt;/h3&gt;

&lt;p&gt;The last thing we need to do is update our &lt;code&gt;PhaserContainer&lt;/code&gt; component to use our new launch function and Phaser scene.&lt;/p&gt;

&lt;p&gt;Update the &lt;code&gt;script&lt;/code&gt; tag to import the &lt;code&gt;launch()&lt;/code&gt; function, and remove the the function declaration within the component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/components/PhaserContainer.vue&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;IonButton&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ionic/vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;launch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@/game/game.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// binds to the v-if on our button to toggle visibility&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;showButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handleClickStart&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// hides launch button&lt;/span&gt;
  &lt;span class="nx"&gt;showButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Runs the launch function&lt;/span&gt;
  &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we when we click 'Start', our Phaser game launches!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmoxlcow7d42ht2eqlv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmoxlcow7d42ht2eqlv1.png" alt="Screenshot of app in browser with " width="522" height="792"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ceceliacreates/phaser-tutorial/commit/0ecb4cd1319951f1572e89956100d357ff25e7db" rel="noopener noreferrer"&gt;Here is the git commit&lt;/a&gt; with the changes for this section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;In the next post in this series, we'll make our game more interesting and learn more about Phaser concepts like Scenes, Game Objects, Physics, Assets, and more.&lt;/p&gt;

&lt;p&gt;Stay tuned!&lt;/p&gt;

</description>
      <category>phaser</category>
      <category>ionic</category>
      <category>vue</category>
      <category>game</category>
    </item>
    <item>
      <title>In Review: My First Year at Ionic</title>
      <dc:creator>Cecelia Martinez</dc:creator>
      <pubDate>Tue, 05 Sep 2023 14:01:54 +0000</pubDate>
      <link>https://dev.to/ceceliacreates/in-review-my-first-year-at-ionic-3ej</link>
      <guid>https://dev.to/ceceliacreates/in-review-my-first-year-at-ionic-3ej</guid>
      <description>&lt;p&gt;On August 29, 2022 I started my first day as a Developer Advocate for Ionic. The very next day I flew out to Salt Lake City to meet my team for ng-Conf, and it's been a whirlwind ever since! 🌪️&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba27dgmkfn3b83fr8zu1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba27dgmkfn3b83fr8zu1.jpeg" alt="Me on stage at Chain React" width="800" height="1197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Speaking on stage at Chain React! Photo credit: &lt;a href="https://twitter.com/tazsingh" rel="noopener noreferrer"&gt;Taz Singh&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I have been a fan of Ionic since 2019, when I first discovered the framework after searching for an alternative to React Native. I spoke at the first Ioniconf in 2020, and met members of the team virtually and in-person over the years. Joining the team felt like a long time coming, and getting to help developers be successful with open source tools I already know and love was a dream come true.&lt;/p&gt;

&lt;p&gt;To celebrate my first year, I wanted to document everything I accomplished. It was a BUSY year, full of events, learning, and trying new things.&lt;/p&gt;

&lt;p&gt;A few highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I spoke at 20 (!) conferences and wrote 16 posts for the Ionic blog&lt;/li&gt;
&lt;li&gt;I learned more than I thought possible about mobile deployments&lt;/li&gt;
&lt;li&gt;I got involved with the amazing Women Who Code Mobile community&lt;/li&gt;
&lt;li&gt;I gave my first talk in Spanish&lt;/li&gt;
&lt;li&gt;I got better at being uncomfortable and trying new things&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conference Talks
&lt;/h2&gt;

&lt;p&gt;I spoke at 20 conferences this year, sometimes doing double duty at a sponsor booth as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlights&lt;/strong&gt;: Getting to speak at Strange Loop was an honor, especially with the conference ending in 2023. There were several of my favorite events like Refactr.TECH, Connect Tech, and VueConf. I attended my first DevOpsDays event, and gave my first React Native talk at Chain React! ⚛️&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refactr.TECH 2022&lt;/li&gt;
&lt;li&gt;Strange Loop 2022&lt;/li&gt;
&lt;li&gt;All Things Open 2022&lt;/li&gt;
&lt;li&gt;Connect Tech 2022&lt;/li&gt;
&lt;li&gt;Mobile DevOps Summit 2022&lt;/li&gt;
&lt;li&gt;Nuxt Nation 2022&lt;/li&gt;
&lt;li&gt;CodeMash 2023&lt;/li&gt;
&lt;li&gt;The DEVOPS Conference 2023&lt;/li&gt;
&lt;li&gt;DevNexus 2023&lt;/li&gt;
&lt;li&gt;DevOps Days Raleigh 2023&lt;/li&gt;
&lt;li&gt;DeveloperWeek Europe 2023&lt;/li&gt;
&lt;li&gt;Chain React 2023&lt;/li&gt;
&lt;li&gt;JS Nation 2023&lt;/li&gt;
&lt;li&gt;Women Who Code Dev Summit - Mobile &amp;amp; Web 2023&lt;/li&gt;
&lt;li&gt;VueConf 2023&lt;/li&gt;
&lt;li&gt;RenderATL 2023&lt;/li&gt;
&lt;li&gt;Ng-Conf 2023&lt;/li&gt;
&lt;li&gt;KCDC 2023&lt;/li&gt;
&lt;li&gt;THAT Conf Wisconsin 2023&lt;/li&gt;
&lt;li&gt;Beer City Code 2023&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also spoke at the &lt;a href="https://www.meetup.com/modernwebatl/events/291027087/" rel="noopener noreferrer"&gt;Modern Web ATL meetup&lt;/a&gt; in March! So excited that local meetups are back.&lt;/p&gt;

&lt;p&gt;Check out this &lt;a href="https://www.youtube.com/playlist?list=PL_FpyqXB68ET0m2rQgQtnz9QsSOeg5cJL" rel="noopener noreferrer"&gt;YouTube playlist&lt;/a&gt; with recordings of some of my conference talks!&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Conference Activities
&lt;/h2&gt;

&lt;p&gt;I was also involved in other events, either as a sponsor, on the program committee, or as an MC.&lt;/p&gt;

&lt;p&gt;React Rally was the first sponsored event where I was the lead on site. We also hosted an Ionic Utah meetup at the conference. It was a lot of work but so much fun to own the entire process and introduce our newer team members to sponsor booth life. 😅&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx47crj4dzglvyk8osvjg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx47crj4dzglvyk8osvjg.jpeg" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Developer Advocate Logan Brade at the sponsor booth at React Rally!&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ng-Conf 2022 (Sponsor)&lt;/li&gt;
&lt;li&gt;TestJS Summit 2022 (MC, Program Committee)&lt;/li&gt;
&lt;li&gt;DevOps World 2022 (Virtual Sponsor Booth)&lt;/li&gt;
&lt;li&gt;Modern Frontends Live 2022 (Sponsor)&lt;/li&gt;
&lt;li&gt;GraphQL Galaxy 2022 (MC)&lt;/li&gt;
&lt;li&gt;TechLead Conf 2023 (MC)&lt;/li&gt;
&lt;li&gt;Deep Dish Swift 2023 (Sponsor)&lt;/li&gt;
&lt;li&gt;JS Nation 2023 (Program Committee)&lt;/li&gt;
&lt;li&gt;React Summit 2023 (Sponsored Workshop &amp;amp; Lightning Talk)&lt;/li&gt;
&lt;li&gt;React Rally 2023 (Sponsor)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Webinars
&lt;/h2&gt;

&lt;p&gt;I was busy with Ionic virtual events as well!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spoke at &lt;a href="https://ionic.io/events/micro-frontends-summit-2023" rel="noopener noreferrer"&gt;Micro Frontends Summit 2023&lt;/a&gt;, a four-week series with amazing speakers on all things micro frontends&lt;/li&gt;
&lt;li&gt;Hosted three webinars:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ionic.io/resources/webinars/streamlined-mobile-deployments-with-appflow" rel="noopener noreferrer"&gt;Streamlined mobile app deployments with Appflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/resources/webinars/deploying-mobile-apps-to-test-devices" rel="noopener noreferrer"&gt;Deploying mobile apps to test devices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/resources/webinars/ship-mobile-app-updates-instantly-with-appflow" rel="noopener noreferrer"&gt;Ship mobile app updates instantly with Appflow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Participated in the &lt;a href="https://ionic.io/events/ionic-show-0323" rel="noopener noreferrer"&gt;Q1&lt;/a&gt; and &lt;a href="https://ionic.io/events/ionic-show-0723" rel="noopener noreferrer"&gt;Q3&lt;/a&gt; Ionic Shows&lt;/li&gt;

&lt;li&gt;Gave my first talk in Spanish for the &lt;a href="https://www.youtube.com/watch?v=5ENQT6VAlCg" rel="noopener noreferrer"&gt;launch of the Ionic Madrid meetup&lt;/a&gt; 🇪🇸&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Blog Posts
&lt;/h2&gt;

&lt;p&gt;I wrote 16 posts for the Ionic blog in my first year! I started out with Appflow product updates, but over time created more technical tutorials and perspective pieces. ✏️&lt;/p&gt;

&lt;p&gt;Some required me to build out complex demo projects and learn new concepts, such as automated mobile testing or building mobile deployment pipelines. Others required research into complex topics like SOC-2 certification and app security.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/major-update-to-appflow-design-system" rel="noopener noreferrer"&gt;Major Update to Appflow Design System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/update-your-target-android-api-level-by-november-1" rel="noopener noreferrer"&gt;Update Your Target Android API Level by November 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/appflow-now-for-react-native" rel="noopener noreferrer"&gt;Appflow Now for React Native&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/ios-schemes-android-variants-in-appflow" rel="noopener noreferrer"&gt;iOS Schemes &amp;amp; Android Variants in Appflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/appflow-live-update-api-demo" rel="noopener noreferrer"&gt;Appflow Live Update API Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/support-added-for-live-update-native-versioning-in-ionic-cloud-cli" rel="noopener noreferrer"&gt;Support Added for Live Update Native Versioning in Ionic Cloud CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/appflow-traditional-native-ios-android" rel="noopener noreferrer"&gt;Appflow Traditional Native iOS &amp;amp; Android&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/rerun-cloud-builds-in-ci-cd-with-appflow" rel="noopener noreferrer"&gt;Rerun Cloud Builds in CI/CD with Appflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/addressing-cloud-security-concerns-with-a-self-hosted-strategy" rel="noopener noreferrer"&gt;Addressing Cloud Security Concerns with a Self-Hosted Strategy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/appflow-adds-github-enterprise-support" rel="noopener noreferrer"&gt;Appflow Adds GitHub Enterprise Support&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/deploying-mobile-apps-to-test-devices" rel="noopener noreferrer"&gt;Deploying Mobile Apps to Test Devices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/managing-build-environments-in-appflow" rel="noopener noreferrer"&gt;Managing Build Environments in Appflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/automatically-deploy-to-google-play-store-with-github-actions-and-the-ionic-cloud-cli" rel="noopener noreferrer"&gt;Automatically Deploy to Google Play Store with GitHub Actions and the Ionic Cloud CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/mobile-development-trends-from-chain-react" rel="noopener noreferrer"&gt;Mobile Development Trends from Chain React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/build-and-deploy-mobile-apps-with-nuxt-ionic" rel="noopener noreferrer"&gt;Build and Deploy Mobile Apps with Nuxt &amp;amp; Ionic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ionic.io/blog/why-every-cloud-provider-should-be-soc-2-certified" rel="noopener noreferrer"&gt;Why Every Cloud Provider Should Be SOC 2 Certified&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Projects
&lt;/h2&gt;

&lt;p&gt;I am the first Developer Advocate at Ionic focused specifically on Appflow, our mobile CI/CD platform. Appflow added support in late 2022 for other platforms, including React Native and traditional iOS/Android native apps.&lt;/p&gt;

&lt;p&gt;Because of this, I was responsible for a lot of "firsts", including deciding how we would reach developers in these new markets, as well as the sponsor booth strategy for events sponsored under the Appflow brand. It was a crash course in developing a new DevRel strategy! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s4zsueg8mjanuknuv2c.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8s4zsueg8mjanuknuv2c.jpeg" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;New booth design assets for Appflow-sponsored events!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Fortunately, Ionic has been around for 10 years and has a lot of built-in knowledge for engaging with developer communities and a great team I could work with on these projects.&lt;/p&gt;

&lt;p&gt;These are some of the specific projects I worked on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auditing and updating our docs&lt;/li&gt;
&lt;li&gt;Introducing a more robust free tier for new users&lt;/li&gt;
&lt;li&gt;Appflow sponsored events strategy and materials&lt;/li&gt;
&lt;li&gt;Working with Product team on new platform support and new user experience, including participating in user interviews and technical validation for new features&lt;/li&gt;
&lt;li&gt;Took over Appflow Twitter/X account for promotion of events, updates, and content, and experimenting with short videos&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I was also on the team that introduced an Ionic Pride community and Pride month kickoff event! This project was personal to me and it was so special to get to be involved. 🌈&lt;/p&gt;

&lt;h2&gt;
  
  
  Community
&lt;/h2&gt;

&lt;p&gt;I continued my volunteer work as the Atlanta Chapter Head for &lt;a href="https://outintech.com/" rel="noopener noreferrer"&gt;Out in Tech&lt;/a&gt;, which supports the LGBTQIA+ community in tech. We had more events in 2023 than ever, and increased the size of our leadership team. We are growing slowly but steadily and it's been amazing to see the community flourish.&lt;/p&gt;

&lt;p&gt;I have previously volunteered with Women Who Code Front End, but this year I transitioned to the &lt;a href="https://www.womenwhocode.com/network/mobile/" rel="noopener noreferrer"&gt;Women Who Code Mobile&lt;/a&gt; track given my new role. It has been so great to get to know the amazing women in this community! &lt;/p&gt;

&lt;p&gt;I got to meet some of the members at Deep Dish Swift, including &lt;a href="https://twitter.com/sunfishgurl" rel="noopener noreferrer"&gt;Vui Nguyen&lt;/a&gt;, who gave a great talk at the conference. She is now the Leadership Fellow for Women Who Code Mobile and I look forward to doing more work with them this year!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqjnw8840rpegpjnuya7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqjnw8840rpegpjnuya7.jpeg" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Women Who Code Mobile representing at Deep Dish Swift! Photo credit: &lt;a href="https://twitter.com/sunfishgurl/status/1652855892365443072/photo/1" rel="noopener noreferrer"&gt;@sunfishgirl on Twitter&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I am also starting to get involved with the AtlantaJS Meetup group, so stay tuned for updates there 👀&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Overall, I could not be more proud of the effort and achievements I've experienced in my first year at Ionic. &lt;/p&gt;

&lt;p&gt;I am so grateful for the support of everyone at Ionic and the wider community. I've had a LOT of questions along the way and have learned so much only because people were generous with their knowledge.&lt;/p&gt;

&lt;p&gt;Looking ahead, I'm planning to expand my focus from mobile deployments to the entire app development life cycle. I'm excited to dig more into Capacitor and &lt;a href="https://ionic.io/portals" rel="noopener noreferrer"&gt;Portals&lt;/a&gt; (the superapp SDK from Ionic), as well as some of the more advanced challenges and use cases facing cross-platform developers.&lt;/p&gt;

&lt;p&gt;I'm also excited to spend more time in code, and working on larger-scale technical projects to improve our developer resources. &lt;/p&gt;

&lt;p&gt;There's also &lt;a href="https://www.outsystems.com/" rel="noopener noreferrer"&gt;OutSystems&lt;/a&gt;! Ionic was acquired last year by OutSystems, the #1 Low-Code Platform. I have met some folks there and attended an OutSystems User Group meetup in Atlanta, and I'm curious to learn more about their tools and team.&lt;/p&gt;

&lt;p&gt;Here's to another year (and hopefully many more!) with Ionic. 🥳&lt;/p&gt;

</description>
      <category>devrel</category>
      <category>career</category>
    </item>
  </channel>
</rss>
