SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à 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
 

Similaire à 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?
 

Dernier

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Dernier (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

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