SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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?
 

Kürzlich hochgeladen

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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
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...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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