SlideShare a Scribd company logo
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
Ad

Recommended

C++20 features
C++20 features
LogeekNightUkraine
 
C++ programming example
C++ programming example
HelpWithAssignment.com
 
SharePoint Saturday Belgium 2014 - Production debugging of SharePoint applica...
SharePoint Saturday Belgium 2014 - Production debugging of SharePoint applica...
BIWUG
 
Java parallel programming made simple
Java parallel programming made simple
Ateji Px
 
C exam
C exam
mohamed salem
 
I don’t care if you have 360 Intra directional predictors
I don’t care if you have 360 Intra directional predictors
Luc Trudeau
 
Code for program to draw a circle using mid point circle algorithm in c
Code for program to draw a circle using mid point circle algorithm in c
Ossa2015
 
Numbers
Numbers
Deepak Mohanty
 
1 c introduction
1 c introduction
suresh rathod
 
2019 session 5 describe different basic programming codes and languages
2019 session 5 describe different basic programming codes and languages
Osama Ghandour Geris
 
iOS for Android Developers (with Swift)
iOS for Android Developers (with Swift)
David Truxall
 
175035 cse lab-05
175035 cse lab-05
Mahbubay Rabbani Mim
 
Nella mente di un alchimista
Nella mente di un alchimista
Nicola Fiorillo
 
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
Uwe Korn
 
The present and the future of functional programming in c++
The present and the future of functional programming in c++
Alexander Granin
 
Categories for the Working C++ Programmer
Categories for the Working C++ Programmer
Platonov Sergey
 
Functional programming-advantages
Functional programming-advantages
Sergei Winitzki
 
CSC – 184 Programming C
CSC – 184 Programming C
ABIR A HAPZU
 
Monadic parsers in C++
Monadic parsers in C++
Alexander Granin
 
Practical no 1
Practical no 1
Kshitija Dalvi
 
Program Verification / Automated Theorem Proving
Program Verification / Automated Theorem Proving
lokeshwer2
 
Prefix Postfix
Prefix Postfix
Kulachi Hansraj Model School Ashok Vihar
 
CPP Quiz
CPP Quiz
Felix Morgner
 
APTECH
APTECH
Devender Jindolia
 
Enginering Example
Enginering Example
GaryDeanCo
 
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
corehard_by
 
Computer programming
Computer programming
Sujay Raj
 
Computer Science Engineering
Computer Science Engineering
ITM University, Raipur
 
01 computer programming
01 computer programming
manish aryal
 
Gate computer-science-engineering-&-information-technology
Gate computer-science-engineering-&-information-technology
pankaj011
 

More Related Content

What's hot (18)

1 c introduction
1 c introduction
suresh rathod
 
2019 session 5 describe different basic programming codes and languages
2019 session 5 describe different basic programming codes and languages
Osama Ghandour Geris
 
iOS for Android Developers (with Swift)
iOS for Android Developers (with Swift)
David Truxall
 
175035 cse lab-05
175035 cse lab-05
Mahbubay Rabbani Mim
 
Nella mente di un alchimista
Nella mente di un alchimista
Nicola Fiorillo
 
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
Uwe Korn
 
The present and the future of functional programming in c++
The present and the future of functional programming in c++
Alexander Granin
 
Categories for the Working C++ Programmer
Categories for the Working C++ Programmer
Platonov Sergey
 
Functional programming-advantages
Functional programming-advantages
Sergei Winitzki
 
CSC – 184 Programming C
CSC – 184 Programming C
ABIR A HAPZU
 
Monadic parsers in C++
Monadic parsers in C++
Alexander Granin
 
Practical no 1
Practical no 1
Kshitija Dalvi
 
Program Verification / Automated Theorem Proving
Program Verification / Automated Theorem Proving
lokeshwer2
 
Prefix Postfix
Prefix Postfix
Kulachi Hansraj Model School Ashok Vihar
 
CPP Quiz
CPP Quiz
Felix Morgner
 
APTECH
APTECH
Devender Jindolia
 
Enginering Example
Enginering Example
GaryDeanCo
 
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
corehard_by
 
2019 session 5 describe different basic programming codes and languages
2019 session 5 describe different basic programming codes and languages
Osama Ghandour Geris
 
iOS for Android Developers (with Swift)
iOS for Android Developers (with Swift)
David Truxall
 
Nella mente di un alchimista
Nella mente di un alchimista
Nicola Fiorillo
 
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
PyData Amsterdam 2018 – Building customer-visible data science dashboards wit...
Uwe Korn
 
The present and the future of functional programming in c++
The present and the future of functional programming in c++
Alexander Granin
 
Categories for the Working C++ Programmer
Categories for the Working C++ Programmer
Platonov Sergey
 
Functional programming-advantages
Functional programming-advantages
Sergei Winitzki
 
CSC – 184 Programming C
CSC – 184 Programming C
ABIR A HAPZU
 
Program Verification / Automated Theorem Proving
Program Verification / Automated Theorem Proving
lokeshwer2
 
Enginering Example
Enginering Example
GaryDeanCo
 
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
C++ Corehard Autumn 2018. Обучаем на Python, применяем на C++ - Павел Филонов
corehard_by
 

Viewers also liked (20)

Computer programming
Computer programming
Sujay Raj
 
Computer Science Engineering
Computer Science Engineering
ITM University, Raipur
 
01 computer programming
01 computer programming
manish aryal
 
Gate computer-science-engineering-&-information-technology
Gate computer-science-engineering-&-information-technology
pankaj011
 
Seminario 6
Seminario 6
AnaRomLop
 
Apple MacBook Air vs ASUS ZENBOOK
Apple MacBook Air vs ASUS ZENBOOK
JJ Wu
 
Lecture#2 Computer languages computer system and Programming EC-105
Lecture#2 Computer languages computer system and Programming EC-105
NUST Stuff
 
Program Logic Formulation - Ohio State University
Program Logic Formulation - Ohio State University
Reggie Niccolo Santos
 
Tension(multimedia
Tension(multimedia
Juanca Vergel
 
Basics of computer engineering and Networking
Basics of computer engineering and Networking
Pankil Agrawal
 
Presensia marsh
Presensia marsh
vrushali patil
 
Computer Engineering Workshop
Computer Engineering Workshop
Cesar Martinez
 
C++ for beginners
C++ for beginners
Salahaddin University-Erbil
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06
Aman kazmi
 
Information about computer engineering
Information about computer engineering
gargee123
 
Apt programming
Apt programming
Vemulapalli Das
 
Lab 5 array
Lab 5 array
mkazree
 
Use of computer programming in animal diet formulation
Use of computer programming in animal diet formulation
Milling and Grain magazine
 
DISE - Programming Concepts
DISE - Programming Concepts
Rasan Samarasinghe
 
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Mazhar93
 
Computer programming
Computer programming
Sujay Raj
 
01 computer programming
01 computer programming
manish aryal
 
Gate computer-science-engineering-&-information-technology
Gate computer-science-engineering-&-information-technology
pankaj011
 
Apple MacBook Air vs ASUS ZENBOOK
Apple MacBook Air vs ASUS ZENBOOK
JJ Wu
 
Lecture#2 Computer languages computer system and Programming EC-105
Lecture#2 Computer languages computer system and Programming EC-105
NUST Stuff
 
Program Logic Formulation - Ohio State University
Program Logic Formulation - Ohio State University
Reggie Niccolo Santos
 
Basics of computer engineering and Networking
Basics of computer engineering and Networking
Pankil Agrawal
 
Computer Engineering Workshop
Computer Engineering Workshop
Cesar Martinez
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06
Aman kazmi
 
Information about computer engineering
Information about computer engineering
gargee123
 
Lab 5 array
Lab 5 array
mkazree
 
Use of computer programming in animal diet formulation
Use of computer programming in animal diet formulation
Milling and Grain magazine
 
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Design and Fabrication of Unmanned Aerial Vehicle PIEAS University Islamabad...
Mazhar93
 
Ad

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

Computer Science for Kids: A Storytelling Approach
Computer Science for Kids: A Storytelling Approach
Jen Looper
 
My summary for cs001x computer science for beginners
My summary for cs001x computer science for beginners
Ibrahim Omar
 
DS CP PPT.pptx
DS CP PPT.pptx
PrasannaBhalerao3
 
C10ComputerEngg.pptx
C10ComputerEngg.pptx
vijayapraba1
 
DS MINI PPT.pptx nothing just beee porches
DS MINI PPT.pptx nothing just beee porches
BrazilAccount1
 
Introduction to computing science and prograaming_1.pdf
Introduction to computing science and prograaming_1.pdf
WardhanaHalimKusuma
 
C++ progrmming language
C++ progrmming language
Md Delwar Saeed
 
Csci101 lect00 introduction
Csci101 lect00 introduction
Elsayed Hemayed
 
Introduction To Computing 1st Edition David A Joyner
Introduction To Computing 1st Edition David A Joyner
laveenchrek
 
Introduction to Software Engineering Lecture 0
Introduction to Software Engineering Lecture 0
Mohamed Essam
 
Embedded systems programming.ppt
Embedded systems programming.ppt
nasir khan
 
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1
Jay Coskey
 
Electrónica digital: Logicsim
Electrónica digital: Logicsim
SANTIAGO PABLO ALBERTO
 
lecture1.ppt
lecture1.ppt
DanielePremarini
 
Code Club Assembly Presentation
Code Club Assembly Presentation
Arosha Bandara
 
Savitch ch 01
Savitch ch 01
Terry Yoast
 
Savitch ch 01
Savitch ch 01
Terry Yoast
 
6th Grade Intro to Algorithms & Programming.pptx
6th Grade Intro to Algorithms & Programming.pptx
Melanie Wood
 
20240108@CPE-303-Computer Engineering.pptx
20240108@CPE-303-Computer Engineering.pptx
AhmedWasiu
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORY
butest
 
Computer Science for Kids: A Storytelling Approach
Computer Science for Kids: A Storytelling Approach
Jen Looper
 
My summary for cs001x computer science for beginners
My summary for cs001x computer science for beginners
Ibrahim Omar
 
C10ComputerEngg.pptx
C10ComputerEngg.pptx
vijayapraba1
 
DS MINI PPT.pptx nothing just beee porches
DS MINI PPT.pptx nothing just beee porches
BrazilAccount1
 
Introduction to computing science and prograaming_1.pdf
Introduction to computing science and prograaming_1.pdf
WardhanaHalimKusuma
 
Csci101 lect00 introduction
Csci101 lect00 introduction
Elsayed Hemayed
 
Introduction To Computing 1st Edition David A Joyner
Introduction To Computing 1st Edition David A Joyner
laveenchrek
 
Introduction to Software Engineering Lecture 0
Introduction to Software Engineering Lecture 0
Mohamed Essam
 
Embedded systems programming.ppt
Embedded systems programming.ppt
nasir khan
 
Intro to Python (High School) Unit #1
Intro to Python (High School) Unit #1
Jay Coskey
 
Code Club Assembly Presentation
Code Club Assembly Presentation
Arosha Bandara
 
6th Grade Intro to Algorithms & Programming.pptx
6th Grade Intro to Algorithms & Programming.pptx
Melanie Wood
 
20240108@CPE-303-Computer Engineering.pptx
20240108@CPE-303-Computer Engineering.pptx
AhmedWasiu
 
PPT slides - MACHINE PERCEPTION LABORATORY
PPT slides - MACHINE PERCEPTION LABORATORY
butest
 
Ad

Recently uploaded (20)

IntroSlides-June-GDG-Cloud-Munich community [email protected]
IntroSlides-June-GDG-Cloud-Munich community [email protected]
Luiz Carneiro
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
The basics of hydrogenation of co2 reaction
The basics of hydrogenation of co2 reaction
kumarrahul230759
 
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
 
grade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quiz
norfapangolima
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
 
Great power lithium iron phosphate cells
Great power lithium iron phosphate cells
salmankhan835951
 
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
SharinAbGhani1
 
David Boutry - Mentors Junior Developers
David Boutry - Mentors Junior Developers
David Boutry
 
3. What is the principles of Teamwork_Module_V1.0.ppt
3. What is the principles of Teamwork_Module_V1.0.ppt
engaash9
 
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
Taqyea
 
Engineering Mechanics Introduction and its Application
Engineering Mechanics Introduction and its Application
Sakthivel M
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
ijab2
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
4th International Conference on Computer Science and Information Technology (...
4th International Conference on Computer Science and Information Technology (...
ijait
 
NALCO Green Anode Plant,Compositions of CPC,Pitch
NALCO Green Anode Plant,Compositions of CPC,Pitch
arpitprachi123
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
ravicivil
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
The basics of hydrogenation of co2 reaction
The basics of hydrogenation of co2 reaction
kumarrahul230759
 
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
 
grade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quiz
norfapangolima
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
 
Great power lithium iron phosphate cells
Great power lithium iron phosphate cells
salmankhan835951
 
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
SharinAbGhani1
 
David Boutry - Mentors Junior Developers
David Boutry - Mentors Junior Developers
David Boutry
 
3. What is the principles of Teamwork_Module_V1.0.ppt
3. What is the principles of Teamwork_Module_V1.0.ppt
engaash9
 
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
Taqyea
 
Engineering Mechanics Introduction and its Application
Engineering Mechanics Introduction and its Application
Sakthivel M
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
ijab2
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
362 Alec Data Center Solutions-Slysium Data Center-AUH-Glands & Lugs, Simplex...
djiceramil
 
4th International Conference on Computer Science and Information Technology (...
4th International Conference on Computer Science and Information Technology (...
ijait
 
NALCO Green Anode Plant,Compositions of CPC,Pitch
NALCO Green Anode Plant,Compositions of CPC,Pitch
arpitprachi123
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
ravicivil
 

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