SlideShare a Scribd company logo
1 of 45
Download to read offline
Developing mobile games
and applications using
Castle Game Engine
Michalis Kamburelis
About Me
● Castle Game Engine - https://castle-engine.io/
● PasDoc - https://pasdoc.github.io/
● Modern Object Pascal Introduction -
https://castle-engine.io/modern_pascal
● Web3d member, Khronos<->Web3d liaison (3D standards - glTF, X3D)
● Co-owner of Cat-astrophe Games - https://cat-astrophe-games.com/
Castle Game Engine intro:
Editor, Components and Building
Applications
Castle Game Engine
Castle Game Engine
● 3D and 2D
● Editor
● Pascal API (all that you can do in editor + much more)
○ For your games and for engine
○ FPC (all platforms) and Delphi (Windows, Linux)
● Open-source
○ Want to fork to add a project-specific feature? OK.
● Multi-platform
○ Windows, Linux (Raspberry Pi too), FreeBSD, macOS
○ Android, iOS
○ Nintendo Switch
3D FPS game template
● Views
● Play view
○ Viewport, navigate in 3D
○ Left side: hierarchy with components
■ UI
■ viewport is also UI
■ 3D: transform scenes, cameras, lights
■ drag-and-drop 3D models, images
■ transform, delete, duplicate
■ behaviors attach to transforms, like billboard
○ Right side: properties
○ Bottom: files
■ preview
■ special data directory
■ double click to run view3dscene on scenes
2D game template
Run!
From CGE editor, or Lazarus, or Delphi, or VS Code.
Run on mobile
Just switch "Run -> Platform (...)" to "Android".
Assuming you have Android SDK and FPC cross-compilers, see https://castle-engine.io/android .
Physics and Coding
Setup and test Physics in editor -
colliders and rigid bodies
Edit in Lazarus IDE
Edit in VS Code
See our VS Code extension - https://castle-engine.io/vscode
Bigger Projects
Mobile: touch and multi-touch
Basic: mouse and touch unified
● Mouse is just like touch, but you only have 1 finger.
● Touch is just mouse, but you only have 1 (left) button.
So just recompile and it works
But some differences cannot be "hidden" by
engine
● When touching, user cannot move position without pressing
● Touching has less precision
○ (smaller physical devices (phones), your finger, you don't see the
cursor)
● Multi-touch possible in exchange: touch screens can track each finger
press independently.
Multi-touch API
● Press, Motion and other events have "FingerIndex"
● Observe current touches from any place (like Update):
○ Container.Touches[FingerIndex: Integer]: TTouch
○ Container.TouchesCount: Integer
drawing_toy example
examples/mobile/drawing_toy
Alternative version for my daughter :)
Ready TCastleTouchNavigation to navigate in
3D on mobile
UI Scaling
(for mobile, but also modern
screen with different sizes)
UI scaling - scale UI to some imaginary size
● The coordinates you specify are in floats, and follow "scaled coordinates".
● The "scaled coordinates" by default pretend that you have a screen 1600 x 900,
○ but adjusted (larger in one dimension) to keep aspect ratio.
○ Of course this is configurable, https://castle-engine.io/manual_castle_settings.php
UI Scaling - how coordinates work
UI Scaling - result
● Sizes and positions are scaled, so designing them on 1 screen will work on
another.
● You can just use hardcoded numbers for sizes and positions.
○ They will work (be scaled).
● Use anchors to keep things aligned to proper border/center.
● Your application works on all screen sizes --
○ various Androids, iOS, desktops…
Example: component_gallery
component_gallery on Android
Android Services
How are Android / iOS projects build
● FPC compiles your application to a library (so or a).
● We glue it with larger code that defines an Android or Xcode iOS project.
● So we can really use 100% of native platform capabilities.
● "Services" are pieces of code basically added to the native project,
○ that expose some native platform API (like vibrations).
○ They usually enable to control it from Pascal code
○ (you can use your own, e.g. JNI, or use our ready CastleMessaging -- good for
cases when communication is naturally asynchronous, like for all services that
do something over the network).
● See https://castle-engine.io/android_services
Example: vibrations
Example: Analytics - basic metrics
Example: Analytics - custom events, screen
views, progression
More services
https://castle-engine.io/android_services
● Various Ad frameworks
● Analytics
● In-app purchases https://castle-engine.io/in_app_purchases
● Networking (downloading URLs, TCP/IP client/server)
● Google Play Games (Achievements, Leaderboards)
● Vibrate
● Photo storage
● TestFairy (distribution, remote logging)
● More planned (GPS, maps, AR…)
iOS is as easy as Android, you just
need mac machine
iOS
If you have a mac machine, follow https://castle-engine.io/ios to get some dependencies:
● Xcode with cli tools
● FPC cross-compilers
and you can build iOS (iPhone, iPad) applications with equal ease as Android.
CGE can prepare
● Xcode project (that you can later deploy in any way from Xcode)
● or create ready archive like IPA (that you can distribute e.g. using TestFairy)
iOS services are available as well https://castle-engine.io/ios_services
Conclusion
Plans
● 7.0-alpha3 release next week
○ Ton of stuff:
https://castle-engine.io/new_features_in_castle_game_engine_7.0
● 7.0 release this year:
○ Material components (shaders, mirrors, easier)
○ Steam (for your games, but also for editor!)
● 7.2 (hopefully this Christmas):
○ Web platform (target, but also source!)
● More: https://castle-engine.io/roadmap
How to make this sustainable?
● We're a community of Pascal developers who are enthusiastic about open-source, games,
and Pascal.
● Engine is all free and open-source.
○ But we can sponsor open-source work (Andrzej Kilijański, Eugene Loza).
○ We also did commercial games (CAG, https://unholy-society.com/ ).
● Support us:
https://www.patreon.com/castleengine
● Want to work together, b2b contract?
michalis@castle-engine.io
Thank you!
https:/
/castle-engine.io
michalis@castle-engine.io

More Related Content

Similar to Developing mobile games and applications using Castle Game Engine

Mak product overview_no_video
Mak product overview_no_videoMak product overview_no_video
Mak product overview_no_videoPeter Swan
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneursRodrigo Gil
 
Video Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersVideo Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersThomas Walker Lynch
 
Interfaces of the future now available augmented reality - google glass - 3...
Interfaces of the future now available   augmented reality - google glass - 3...Interfaces of the future now available   augmented reality - google glass - 3...
Interfaces of the future now available augmented reality - google glass - 3...CuriousInventor
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalBrian Hay
 
Your next data viz gear should be a Wii-U
Your next data viz gear should be a Wii-UYour next data viz gear should be a Wii-U
Your next data viz gear should be a Wii-UChristophe Guéret
 
A 3D printing programming API
A 3D printing programming APIA 3D printing programming API
A 3D printing programming APIMax Kleiner
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCorley S.r.l.
 
Flutter - Pixel by Pixel
Flutter - Pixel by PixelFlutter - Pixel by Pixel
Flutter - Pixel by PixelThomas Gazzoni
 
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LIST
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LISTCOMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LIST
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LISTtarun kumar sharma
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsLuca Galli
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
 
I/O Frog: Not another Sigfox platform?
I/O Frog: Not another Sigfox platform?I/O Frog: Not another Sigfox platform?
I/O Frog: Not another Sigfox platform?Simple Hardware
 

Similar to Developing mobile games and applications using Castle Game Engine (20)

Mak product overview_no_video
Mak product overview_no_videoMak product overview_no_video
Mak product overview_no_video
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Html5 (games)
Html5 (games)Html5 (games)
Html5 (games)
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
Video Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of BrowsersVideo Terminal Evolution and The Future of Browsers
Video Terminal Evolution and The Future of Browsers
 
Interfaces of the future now available augmented reality - google glass - 3...
Interfaces of the future now available   augmented reality - google glass - 3...Interfaces of the future now available   augmented reality - google glass - 3...
Interfaces of the future now available augmented reality - google glass - 3...
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with Drupal
 
Mobile cloud
Mobile cloudMobile cloud
Mobile cloud
 
Your next data viz gear should be a Wii-U
Your next data viz gear should be a Wii-UYour next data viz gear should be a Wii-U
Your next data viz gear should be a Wii-U
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
A 3D printing programming API
A 3D printing programming APIA 3D printing programming API
A 3D printing programming API
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT Applications
 
Flutter - Pixel by Pixel
Flutter - Pixel by PixelFlutter - Pixel by Pixel
Flutter - Pixel by Pixel
 
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LIST
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LISTCOMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LIST
COMPUTER GRAPHICS AND MULTI MEDIA SOFTWARE LIST
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
I/O Frog: Not another Sigfox platform?
I/O Frog: Not another Sigfox platform?I/O Frog: Not another Sigfox platform?
I/O Frog: Not another Sigfox platform?
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Developing mobile games and applications using Castle Game Engine

  • 1. Developing mobile games and applications using Castle Game Engine Michalis Kamburelis
  • 2. About Me ● Castle Game Engine - https://castle-engine.io/ ● PasDoc - https://pasdoc.github.io/ ● Modern Object Pascal Introduction - https://castle-engine.io/modern_pascal ● Web3d member, Khronos<->Web3d liaison (3D standards - glTF, X3D) ● Co-owner of Cat-astrophe Games - https://cat-astrophe-games.com/
  • 3. Castle Game Engine intro: Editor, Components and Building Applications
  • 5. Castle Game Engine ● 3D and 2D ● Editor ● Pascal API (all that you can do in editor + much more) ○ For your games and for engine ○ FPC (all platforms) and Delphi (Windows, Linux) ● Open-source ○ Want to fork to add a project-specific feature? OK. ● Multi-platform ○ Windows, Linux (Raspberry Pi too), FreeBSD, macOS ○ Android, iOS ○ Nintendo Switch
  • 6. 3D FPS game template ● Views ● Play view ○ Viewport, navigate in 3D ○ Left side: hierarchy with components ■ UI ■ viewport is also UI ■ 3D: transform scenes, cameras, lights ■ drag-and-drop 3D models, images ■ transform, delete, duplicate ■ behaviors attach to transforms, like billboard ○ Right side: properties ○ Bottom: files ■ preview ■ special data directory ■ double click to run view3dscene on scenes
  • 7.
  • 9. Run! From CGE editor, or Lazarus, or Delphi, or VS Code.
  • 10. Run on mobile Just switch "Run -> Platform (...)" to "Android". Assuming you have Android SDK and FPC cross-compilers, see https://castle-engine.io/android .
  • 12. Setup and test Physics in editor - colliders and rigid bodies
  • 14. Edit in VS Code See our VS Code extension - https://castle-engine.io/vscode
  • 16.
  • 17.
  • 18. Mobile: touch and multi-touch
  • 19. Basic: mouse and touch unified ● Mouse is just like touch, but you only have 1 finger. ● Touch is just mouse, but you only have 1 (left) button.
  • 20. So just recompile and it works
  • 21. But some differences cannot be "hidden" by engine ● When touching, user cannot move position without pressing ● Touching has less precision ○ (smaller physical devices (phones), your finger, you don't see the cursor) ● Multi-touch possible in exchange: touch screens can track each finger press independently.
  • 22. Multi-touch API ● Press, Motion and other events have "FingerIndex" ● Observe current touches from any place (like Update): ○ Container.Touches[FingerIndex: Integer]: TTouch ○ Container.TouchesCount: Integer
  • 25. Alternative version for my daughter :)
  • 26. Ready TCastleTouchNavigation to navigate in 3D on mobile
  • 27. UI Scaling (for mobile, but also modern screen with different sizes)
  • 28. UI scaling - scale UI to some imaginary size ● The coordinates you specify are in floats, and follow "scaled coordinates". ● The "scaled coordinates" by default pretend that you have a screen 1600 x 900, ○ but adjusted (larger in one dimension) to keep aspect ratio. ○ Of course this is configurable, https://castle-engine.io/manual_castle_settings.php
  • 29. UI Scaling - how coordinates work
  • 30. UI Scaling - result ● Sizes and positions are scaled, so designing them on 1 screen will work on another. ● You can just use hardcoded numbers for sizes and positions. ○ They will work (be scaled). ● Use anchors to keep things aligned to proper border/center. ● Your application works on all screen sizes -- ○ various Androids, iOS, desktops…
  • 34. How are Android / iOS projects build ● FPC compiles your application to a library (so or a). ● We glue it with larger code that defines an Android or Xcode iOS project. ● So we can really use 100% of native platform capabilities. ● "Services" are pieces of code basically added to the native project, ○ that expose some native platform API (like vibrations). ○ They usually enable to control it from Pascal code ○ (you can use your own, e.g. JNI, or use our ready CastleMessaging -- good for cases when communication is naturally asynchronous, like for all services that do something over the network). ● See https://castle-engine.io/android_services
  • 36. Example: Analytics - basic metrics
  • 37. Example: Analytics - custom events, screen views, progression
  • 38. More services https://castle-engine.io/android_services ● Various Ad frameworks ● Analytics ● In-app purchases https://castle-engine.io/in_app_purchases ● Networking (downloading URLs, TCP/IP client/server) ● Google Play Games (Achievements, Leaderboards) ● Vibrate ● Photo storage ● TestFairy (distribution, remote logging) ● More planned (GPS, maps, AR…)
  • 39. iOS is as easy as Android, you just need mac machine
  • 40. iOS If you have a mac machine, follow https://castle-engine.io/ios to get some dependencies: ● Xcode with cli tools ● FPC cross-compilers and you can build iOS (iPhone, iPad) applications with equal ease as Android. CGE can prepare ● Xcode project (that you can later deploy in any way from Xcode) ● or create ready archive like IPA (that you can distribute e.g. using TestFairy) iOS services are available as well https://castle-engine.io/ios_services
  • 41.
  • 43. Plans ● 7.0-alpha3 release next week ○ Ton of stuff: https://castle-engine.io/new_features_in_castle_game_engine_7.0 ● 7.0 release this year: ○ Material components (shaders, mirrors, easier) ○ Steam (for your games, but also for editor!) ● 7.2 (hopefully this Christmas): ○ Web platform (target, but also source!) ● More: https://castle-engine.io/roadmap
  • 44. How to make this sustainable? ● We're a community of Pascal developers who are enthusiastic about open-source, games, and Pascal. ● Engine is all free and open-source. ○ But we can sponsor open-source work (Andrzej Kilijański, Eugene Loza). ○ We also did commercial games (CAG, https://unholy-society.com/ ). ● Support us: https://www.patreon.com/castleengine ● Want to work together, b2b contract? michalis@castle-engine.io