Computer Engineering
By Sethmi Kachchakaduge, Kevin Adams, Kimi Hirano
Overview
● Intro
● Project Description
o Building the platform
o Example Code
o Flappy Fly Code
● Analysis
o Challenges
o What we learned
Intro to Computer Engineering
● Combines fields of electrical engineering and
computer science to develop computer
hardware and software
● More focus on digital systems
● Programming
Project Description
● Created “Flappy Fly”
o Version of Flappy Bird
o Swift
● Programmed code
o Xcode
● SpriteBuilder
o Built in parts
o Location control
Building the platform
● Spritebuilder
o Background
o Ground
o Obstacles
o Hero
o Nodes
o Physics
Computer Engineering (Programming Language: Swift)
Coding Basics
● Basic Comparators (==, >, <, >=, <=)
● Basic Operators (=, +=, -=, *=, /=, %=)
● Variables
● Logic
o if and else
o True and False
Example
• Var flappyFly = 6
• flappyFly > 7 ‘false’
• flappyFly < 7 ‘true’
• If (flappyFly>4){
• ‘flappyFly+=1’
• }
• Else {
• “flappyFly does nothing”
• }
Control Flow
● For loops
● For in loops
● While loops
● Do while loops
Flappy Fly Code
● Variable Ex
o var_gameOver = false
● Function Ex
○ func spawnNewObstacle() {
var prevObstaclePos = _firstObstaclePosition
if _obstacles.count > 0 {
prevObstaclePos = _obstacles.last!.position.x
}
● For loop Ex
o for ground in _grounds {
// get the world position of the ground
let groundWorldPosition = _physicsNode.convertToWorldSpace(ground.position
// get the screen position of the ground
let groundScreenPosition = self.convertToNodeSpace(groundWorldPosition)
// if the left corner is one complete width off the screen, move it to the right
Computer Engineering (Programming Language: Swift)
Final Game
Challenges
● Inserting code in proper location
● Understanding the code
● Correctly following building process
What we learned?
● Different syntax
● Order matters
● Patience
● Simplified code
Thank You

More Related Content

PPTX
C++20 features
DOCX
C++ programming example
PPTX
SharePoint Saturday Belgium 2014 - Production debugging of SharePoint applica...
PPTX
Java parallel programming made simple
PDF
PDF
I don’t care if you have 360 Intra directional predictors
DOCX
Code for program to draw a circle using mid point circle algorithm in c
DOCX
C++20 features
C++ programming example
SharePoint Saturday Belgium 2014 - Production debugging of SharePoint applica...
Java parallel programming made simple
I don’t care if you have 360 Intra directional predictors
Code for program to draw a circle using mid point circle algorithm in c

What's hot (18)

PDF
1 c introduction
PPTX
2019 session 5 describe different basic programming codes and languages
PDF
iOS for Android Developers (with Swift)
PDF
175035 cse lab-05
PDF
Nella mente di un alchimista
PDF
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
PDF
The present and the future of functional programming in c++
PDF
Categories for the Working C++ Programmer
PDF
Functional programming-advantages
PPTX
CSC – 184 Programming C
PDF
Monadic parsers in C++
DOCX
Practical no 1
PPTX
Program Verification / Automated Theorem Proving
PDF
CPP Quiz
PPT
Enginering Example
PPTX
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
1 c introduction
2019 session 5 describe different basic programming codes and languages
iOS for Android Developers (with Swift)
175035 cse lab-05
Nella mente di un alchimista
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
The present and the future of functional programming in c++
Categories for the Working C++ Programmer
Functional programming-advantages
CSC – 184 Programming C
Monadic parsers in C++
Practical no 1
Program Verification / Automated Theorem Proving
CPP Quiz
Enginering Example
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
Ad

Viewers also liked (20)

PPTX
Computer programming
PPT
Computer Science Engineering
PPTX
01 computer programming
PDF
Gate computer-science-engineering-&-information-technology
PPTX
Seminario 6
PDF
Apple MacBook Air vs ASUS ZENBOOK
PPT
Lecture#2 Computer languages computer system and Programming EC-105
PPT
Program Logic Formulation - Ohio State University
PPT
Tension(multimedia
PPTX
Basics of computer engineering and Networking
PPTX
Presensia marsh
PDF
Computer Engineering Workshop
PPT
C++ for beginners
PPT
Lecture 19 matlab_script&function_files06
PPTX
Information about computer engineering
PPTX
Apt programming
DOC
Lab 5 array
PDF
Use of computer programming in animal diet formulation
PPSX
DISE - Programming Concepts
PPS
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Computer programming
Computer Science Engineering
01 computer programming
Gate computer-science-engineering-&-information-technology
Seminario 6
Apple MacBook Air vs ASUS ZENBOOK
Lecture#2 Computer languages computer system and Programming EC-105
Program Logic Formulation - Ohio State University
Tension(multimedia
Basics of computer engineering and Networking
Presensia marsh
Computer Engineering Workshop
C++ for beginners
Lecture 19 matlab_script&function_files06
Information about computer engineering
Apt programming
Lab 5 array
Use of computer programming in animal diet formulation
DISE - Programming Concepts
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Ad

Similar to Computer Engineering (Programming Language: Swift) (20)

PDF
不深不淺,帶你認識 LLVM (Found LLVM in your life)
PDF
Critical software developement
PDF
Code metrics in PHP
PDF
More about PHP
PDF
lec7-program-verification.pdf
PDF
Intro to Arduino Programming.pdf
PDF
Go. why it goes v2
PDF
Andrii Soldatenko "Competitive programming using Python"
PDF
Design Patterns in Modern C++
PDF
How to build Kick Ass Games in the Cloud
PDF
A Python Tutorial
PDF
Mender.io | Develop embedded applications faster | Comparing C and Golang
PPTX
CG-Orientation ppt.pptx
PDF
Discover GraphQL with Python, Graphene and Odoo
PDF
Open source report writing tools for IBM i Vienna 2012
PDF
Front-end God Mode with Reagent and Figwheel
PDF
Engineer Engineering Software
PDF
ooc - OSDC 2010 - Amos Wenger
PDF
Exploring Raspberry Pi
PPT
Lec15a1-Object-Oriented Development.ppt
不深不淺,帶你認識 LLVM (Found LLVM in your life)
Critical software developement
Code metrics in PHP
More about PHP
lec7-program-verification.pdf
Intro to Arduino Programming.pdf
Go. why it goes v2
Andrii Soldatenko "Competitive programming using Python"
Design Patterns in Modern C++
How to build Kick Ass Games in the Cloud
A Python Tutorial
Mender.io | Develop embedded applications faster | Comparing C and Golang
CG-Orientation ppt.pptx
Discover GraphQL with Python, Graphene and Odoo
Open source report writing tools for IBM i Vienna 2012
Front-end God Mode with Reagent and Figwheel
Engineer Engineering Software
ooc - OSDC 2010 - Amos Wenger
Exploring Raspberry Pi
Lec15a1-Object-Oriented Development.ppt

Recently uploaded (20)

PDF
Computer System Architecture 3rd Edition-M Morris Mano.pdf
PPTX
Petroleum Refining & Petrochemicals.pptx
PDF
Applications of Equal_Area_Criterion.pdf
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PPTX
mechattonicsand iotwith sensor and actuator
PPTX
Amdahl’s law is explained in the above power point presentations
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
PDF
First part_B-Image Processing - 1 of 2).pdf
PPTX
Building constraction Conveyance of water.pptx
PPTX
Measurement Uncertainty and Measurement System analysis
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Soil Improvement Techniques Note - Rabbi
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
Software Engineering and software moduleing
PDF
Unit1 - AIML Chapter 1 concept and ethics
Computer System Architecture 3rd Edition-M Morris Mano.pdf
Petroleum Refining & Petrochemicals.pptx
Applications of Equal_Area_Criterion.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
MLpara ingenieira CIVIL, meca Y AMBIENTAL
mechattonicsand iotwith sensor and actuator
Amdahl’s law is explained in the above power point presentations
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
August -2025_Top10 Read_Articles_ijait.pdf
Chapter 2 -Technology and Enginerring Materials + Composites.pptx
First part_B-Image Processing - 1 of 2).pdf
Building constraction Conveyance of water.pptx
Measurement Uncertainty and Measurement System analysis
Exploratory_Data_Analysis_Fundamentals.pdf
Soil Improvement Techniques Note - Rabbi
Management Information system : MIS-e-Business Systems.pptx
Abrasive, erosive and cavitation wear.pdf
Software Engineering and software moduleing
Unit1 - AIML Chapter 1 concept and ethics

Computer Engineering (Programming Language: Swift)

  • 1. Computer Engineering By Sethmi Kachchakaduge, Kevin Adams, Kimi Hirano
  • 2. Overview ● Intro ● Project Description o Building the platform o Example Code o Flappy Fly Code ● Analysis o Challenges o What we learned
  • 3. Intro to Computer Engineering ● Combines fields of electrical engineering and computer science to develop computer hardware and software ● More focus on digital systems ● Programming
  • 4. Project Description ● Created “Flappy Fly” o Version of Flappy Bird o Swift ● Programmed code o Xcode ● SpriteBuilder o Built in parts o Location control
  • 5. Building the platform ● Spritebuilder o Background o Ground o Obstacles o Hero o Nodes o Physics
  • 7. Coding Basics ● Basic Comparators (==, >, <, >=, <=) ● Basic Operators (=, +=, -=, *=, /=, %=) ● Variables ● Logic o if and else o True and False
  • 8. Example • Var flappyFly = 6 • flappyFly > 7 ‘false’ • flappyFly < 7 ‘true’ • If (flappyFly>4){ • ‘flappyFly+=1’ • } • Else { • “flappyFly does nothing” • }
  • 9. Control Flow ● For loops ● For in loops ● While loops ● Do while loops
  • 10. Flappy Fly Code ● Variable Ex o var_gameOver = false ● Function Ex ○ func spawnNewObstacle() { var prevObstaclePos = _firstObstaclePosition if _obstacles.count > 0 { prevObstaclePos = _obstacles.last!.position.x } ● For loop Ex o for ground in _grounds { // get the world position of the ground let groundWorldPosition = _physicsNode.convertToWorldSpace(ground.position // get the screen position of the ground let groundScreenPosition = self.convertToNodeSpace(groundWorldPosition) // if the left corner is one complete width off the screen, move it to the right
  • 13. Challenges ● Inserting code in proper location ● Understanding the code ● Correctly following building process
  • 14. What we learned? ● Different syntax ● Order matters ● Patience ● Simplified code

Editor's Notes

  • #6: Node = Manipulatable select box