SlideShare ist ein Scribd-Unternehmen logo
1 von 17
How to make a game app
(with Flutter)
William & Mary, Spring 2023
Workshop 1: Flutter Basics
How to make a game app
What is Flutter?
● Framework for app and web development
● Code is structured into stateful and
stateless classes
● Apps are composed of widgets
● Language is called Dart
I love the Widget of the Week series!
Getting started
● Navigate to the following link: https://github.com/ceh-
2000/paint_drop.git
● Scroll down to the section called “Prerequisites” and follow
the steps to install a code editor and Flutter.
Flutter Doctor | Path Issues
C:> where flutter dart
Command Prompt ✅ | Powershell 🛑
(1) Search for “env” and select “Edit
environment variables for your
account”
(2) User variables → click entry called
“Path” → Append to the end with “;”:
C:path-to-flutterbin
⚠ Restart terminal after completion!
Creating your first app
● Navigate to the following link:
https://github.com/ceh-2000/paint_drop.git
● Scroll down to the section called “Creating
your first app” and follow the steps to
install a code editor and Flutter.
Your default app should look like this →
Workshop 2: Game design basics
How to make a game app
Question
Suppose I have two phones. One can redraw a star on the screen
every 1 second. The second phone is older and can only redraw a
star on the screen every 2 seconds. We want to make the star look
like it’s moving left to right across the screen. How do we create one
set of logic that works for both phones?
Answer
new_position = old_position + speed * dt
Flame (a Flutter game package) gives us the elapsed time (dt)
between frames to compute where we need to put the heart for the
same movement across different devices.
Workshop 3: User interaction
How to make a game app
Falling stars specifications
● Drop a variable number of spinning
stars from top of screen to bottom
● Stars are draggable horizontally
● Stars cannot be dragged off the screen
● Stars do not rotate when being
dragged
Flame inputs
● Drag Events (play around
with the demo in the docs)
● Gesture Input (mouse and
touch pointers)
● Keyboard Input
● Tap Events
● Other Inputs (supports
Joysticks and Gamepads) https://docs.flame-
engine.org/1.6.0/flame/inputs/drag_events.html#demo
Mixins ● Use mixins to inject code into a
class (to make things draggable)
● Mixin class acts as parent class,
offering the child the desired
functionality
● Key difference between mixins and
inheritance: “child class can still
inherit all the features of the parent
class, but, the semantics about the
child ‘being a kind of’ the parent
need not be necessarily applied”
(mixin on Wikipedia)
Workshop 4: Paint drop game
How to make a game app
App layout and adding sprites
Game logic
● Players drag the paint drops above the correct colored buckets.
● Scoring:
○ Correct paint drop and bucket = +1
○ Incorrect paint drop and bucket = -1
● Possible extensions:
○ Make paint drops fall faster over time
○ Power-ups that automatically move all paint drops to the
correct place or pause paint drops in the air
Workshop 5: App deployment
How to make a game app

Weitere Àhnliche Inhalte

Ähnlich wie How to make a game app.pptx

GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptxGoogleDeveloperStude22
 
Dart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDSCVSSUT
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with DartGDGKuwaitGoogleDevel
 
Mobile app development with Flutter: The Need for Speed!
Mobile app development with Flutter: The Need for Speed!Mobile app development with Flutter: The Need for Speed!
Mobile app development with Flutter: The Need for Speed!Ogundiran Al-ameen
 
Unity3D Programming
Unity3D ProgrammingUnity3D Programming
Unity3D ProgrammingMichael Ivanov
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development divyawani2
 
Flutter - Pixel by Pixel
Flutter - Pixel by PixelFlutter - Pixel by Pixel
Flutter - Pixel by PixelThomas Gazzoni
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Flutter Introduction and Architecture
Flutter Introduction and ArchitectureFlutter Introduction and Architecture
Flutter Introduction and ArchitectureJenish MS
 
flutter-general-report.docx
flutter-general-report.docxflutter-general-report.docx
flutter-general-report.docxKuntalSasmal1
 
Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with FlutterAwok
 
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...Burin Asavesna
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android ProgrammingPeter van der Linden
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React NativeEric Deng
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayLiz Sims
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Doris Chen
 
Adopting Flutter in Native Mobile Applications
Adopting Flutter in Native Mobile ApplicationsAdopting Flutter in Native Mobile Applications
Adopting Flutter in Native Mobile ApplicationsAlexandru Terente
 

Ähnlich wie How to make a game app.pptx (20)

GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptx
 
Dart and Flutter Basics.pptx
Dart and Flutter Basics.pptxDart and Flutter Basics.pptx
Dart and Flutter Basics.pptx
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart
 
Mobile app development with Flutter: The Need for Speed!
Mobile app development with Flutter: The Need for Speed!Mobile app development with Flutter: The Need for Speed!
Mobile app development with Flutter: The Need for Speed!
 
Choose flutter
Choose flutterChoose flutter
Choose flutter
 
Unity3D Programming
Unity3D ProgrammingUnity3D Programming
Unity3D Programming
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development
 
Flutter - Pixel by Pixel
Flutter - Pixel by PixelFlutter - Pixel by Pixel
Flutter - Pixel by Pixel
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Flutter Introduction and Architecture
Flutter Introduction and ArchitectureFlutter Introduction and Architecture
Flutter Introduction and Architecture
 
flutter-general-report.docx
flutter-general-report.docxflutter-general-report.docx
flutter-general-report.docx
 
Mobile development with Flutter
Mobile development with FlutterMobile development with Flutter
Mobile development with Flutter
 
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
 
Mobile Application Development class 001
Mobile Application Development class 001Mobile Application Development class 001
Mobile Application Development class 001
 
Flutter Leap of Faith
Flutter Leap of FaithFlutter Leap of Faith
Flutter Leap of Faith
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
 
Java Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage EssayJava Is A Programming Dialect And Registering Stage Essay
Java Is A Programming Dialect And Registering Stage Essay
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
Adopting Flutter in Native Mobile Applications
Adopting Flutter in Native Mobile ApplicationsAdopting Flutter in Native Mobile Applications
Adopting Flutter in Native Mobile Applications
 

KĂŒrzlich hochgeladen

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 

KĂŒrzlich hochgeladen (20)

VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 

How to make a game app.pptx

  • 1. How to make a game app (with Flutter) William & Mary, Spring 2023
  • 2. Workshop 1: Flutter Basics How to make a game app
  • 3. What is Flutter? ● Framework for app and web development ● Code is structured into stateful and stateless classes ● Apps are composed of widgets ● Language is called Dart I love the Widget of the Week series!
  • 4. Getting started ● Navigate to the following link: https://github.com/ceh- 2000/paint_drop.git ● Scroll down to the section called “Prerequisites” and follow the steps to install a code editor and Flutter.
  • 5. Flutter Doctor | Path Issues C:> where flutter dart Command Prompt ✅ | Powershell 🛑 (1) Search for “env” and select “Edit environment variables for your account” (2) User variables → click entry called “Path” → Append to the end with “;”: C:path-to-flutterbin ⚠ Restart terminal after completion!
  • 6. Creating your first app ● Navigate to the following link: https://github.com/ceh-2000/paint_drop.git ● Scroll down to the section called “Creating your first app” and follow the steps to install a code editor and Flutter. Your default app should look like this →
  • 7. Workshop 2: Game design basics How to make a game app
  • 8. Question Suppose I have two phones. One can redraw a star on the screen every 1 second. The second phone is older and can only redraw a star on the screen every 2 seconds. We want to make the star look like it’s moving left to right across the screen. How do we create one set of logic that works for both phones?
  • 9. Answer new_position = old_position + speed * dt Flame (a Flutter game package) gives us the elapsed time (dt) between frames to compute where we need to put the heart for the same movement across different devices.
  • 10. Workshop 3: User interaction How to make a game app
  • 11. Falling stars specifications ● Drop a variable number of spinning stars from top of screen to bottom ● Stars are draggable horizontally ● Stars cannot be dragged off the screen ● Stars do not rotate when being dragged
  • 12. Flame inputs ● Drag Events (play around with the demo in the docs) ● Gesture Input (mouse and touch pointers) ● Keyboard Input ● Tap Events ● Other Inputs (supports Joysticks and Gamepads) https://docs.flame- engine.org/1.6.0/flame/inputs/drag_events.html#demo
  • 13. Mixins ● Use mixins to inject code into a class (to make things draggable) ● Mixin class acts as parent class, offering the child the desired functionality ● Key difference between mixins and inheritance: “child class can still inherit all the features of the parent class, but, the semantics about the child ‘being a kind of’ the parent need not be necessarily applied” (mixin on Wikipedia)
  • 14. Workshop 4: Paint drop game How to make a game app
  • 15. App layout and adding sprites
  • 16. Game logic ● Players drag the paint drops above the correct colored buckets. ● Scoring: ○ Correct paint drop and bucket = +1 ○ Incorrect paint drop and bucket = -1 ● Possible extensions: ○ Make paint drops fall faster over time ○ Power-ups that automatically move all paint drops to the correct place or pause paint drops in the air
  • 17. Workshop 5: App deployment How to make a game app

Hinweis der Redaktion

  1. https://docs.flame-engine.org/1.6.0/flame/inputs/inputs.html
  2. https://en.wikipedia.org/wiki/Mixin#:~:text=Mixins%20are%20a%20language%20concept,class%2C%20containing%20the%20desired%20functionality.