SlideShare a Scribd company logo
1 of 33
Download to read offline
Sponsored by
Using FireMonkey as a game engine
Patrick Prémartin
DELPHICON 2021
The Official Online Conference All About Embarcadero Delphi
delphicon.embarcadero.com
Sponsored by
Agenda
● What is a game engine ?
● What is FireMonkey ?
● Why using FireMonkey to code games ?
● Really ? Games in Delphi FMX ?
● Managing music and sound effects
● Managing backgrounds and scenes
● Managing user interface
● Managing sprites, animations and collisions
● What about 3D ?
● You want more ?
Sponsored by
Speaker
● Patrick Prémartin - MVP Embarcadero
● Freelance Delphi and web developer since 2000
(just after the bug)
● Delphi user since the beginning and before
with Borland / Turbo Pascal.
● Game coder since a little more (TO7-70 J)
Sponsored by
Speaker
● Patrick Prémartin - MVP Embarcadero
● Follow me on :
● GitHub : https://github.com/DeveloppeurPascal
● Itch.io : https://gamolf.itch.io
● Twitch : https://www.twitch.tv/patrickpremartin
● My blog : https://developpeur-pascal.fr
● LinkedIn : https://www.linkedin.com/in/patrickpremartin/
Sponsored by
What is a game engine ?
● A game engine is a library or set of components available to
create games.
● You have code, SDK and sometimes editor tools or you can use
external tools like Tiled to create your scenes and maps.
● A game engine is not a complete game making software like
you have with GameMaker Studio, AppGameKit Studio, Game
Guru, Clickteam Fusion, Unreal Engine or Unity but the code to
work with when creating games.
Sponsored by
What is a game engine ?
● There are a lot of game making software and game engines
coded in Pascal.
● One of the most known is Castle Game Engine available at
https://castle-engine.io/
It now has Delphi compatibility. Look at Michalis Kamburelis
DelphiCon 2021 session to know more about it.
https://delphicon.embarcadero.com/talks/castle-game-engine-
coming-to-delphi/
Sponsored by
What is a game engine ?
● You perhaps eared about some of this other game engines for
Delphi or Pascal developers :
○ Gorilla 3D Framework : https://www.gorilla3d.de
○ Apus Game Engine : https://github.com/Cooler2/ApusGameEngine
○ SDL2 for Pascal : https://github.com/PascalGameDevelopment/SDL2-for-
Pascal
○ Andorra 2D, Turbu, Asphyre, DelphiX, Rage3D, and a lot more listed at
https://wiki.freepascal.org/Game_Engine
Sponsored by
What is FireMonkey ?
● FireMonkey is the multiplatform set of components and
libraries available in Delphi.
● You have VCL for Windows projects since Delphi 1.
● And since Delphi XE2 we have FireMonkey for all major
platforms.
● With Delphi 11 Alexandria you can target Windows, Mac, Linux,
iOS and Android platforms depending on your license level.
Sponsored by
What is FireMonkey ?
● The idea behind FireMonkey is to have one project and one
source code to target all major platforms.
● You don’t need to know “platforms languages” like Objective-C,
Swift, Java, Kotlin, C, C++, C#, .Net, …
Sponsored by
What is FireMonkey ?
● FireMonkey includes classic visual components but also
shapes, animations, visual effects, 3D, access to system API
and other libraries.
● It’s included in all Delphi license level even the Community
Edition (free for personal use) and Academic Edition.
Sponsored by
Why using FireMonkey to code games ?
● The simple answer could be “why not ?” and in fact it’s the first
reason I had to play with it.
● Second answer is more technical :
● FireMonkey draws everything on screen by default.
● Visual components are sets of shapes and effects. They are styled and can
be changed without coding.
● We have 2D and 3D components and layers in standard.
Sponsored by
Why using FireMonkey to code games ?
● The simple answer could be “why not ?” and in fact it’s the first
reason I had to play with it.
● Second answer is more technical :
● Touch, mouse and keyboard are managed by Delphi. It works for classic
programs, so it works for games too.
● We can use properties and events, timers and threads, multi resolution
images and bitmaps, classes and all thinks needed to code games.
Sponsored by
Really ? Games in Delphi FMX ?
● In 2021 I streamed weekly game coding sessions on Twitch,
with Delphi and FireMonkey.
● Published games are available at https://gamolf.itch.io
● Some projects have been open sourced on my GitHub account:
https://github.com/DeveloppeurPascal/DevPas-Games-Pack
● A lots of other projects are available with “delphi-game”
hashtag: https://github.com/topics/delphi-game
Sponsored by
Really ? Games in Delphi FMX ?
● You can also check the showcase part of Embarcadero blogs at
https://blogs.embarcadero.com/category/showcase/
● And more on iOS and Android stores !
● Simply look at the list of games which developers forgot to
change default package name in their project options :
https://www.google.com/search?q=%22com.embarcadero.%22
+game+site%3Aplay.google.com
Please don’t forget to personalize your project version info option page.
Sponsored by
How to ?
● Know, let’s look a little more at developer side of game making
with FireMonkey projects in Delphi.
● You’ll find code samples and usable Delphi units on GitHub at
https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe
ts
Sponsored by
Managing music and sound effects
● Managing sounds in a Delphi project is simple. We have a
component for that : TMediaPlayer.
● In my games I use it to play MP3 music in background. A timer
check if the music is over and restart it for a loop.
● For sound effects, I play WAV files with another TMediaPlayer
(or more than one in a TObjectList<TMediaPlayer> depending
on the game).
● To do the same, use the TMusicLoop class in uMusicLoop.pas
Sponsored by
Managing backgrounds and scenes
● For backgrounds and scenes, I use TImage component, the Fill
property of shapes like TRectangle or TCircle and the TPath to
draw SVG path depending on my needs.
● All FireMonkey visual components are containers. They can be
parents for all other visual components.
● All visual components have opacity, rotation and scale
properties.
Sponsored by
Managing backgrounds and scenes
● We can use nonvisual components to change property values in
a specific duration (TFloatAnimation is very useful).
● We have visual effect as nonvisual components like
TShadowEffect and TGlowEffect, useful for games and classic
programs to show errors or needed edit fields.
● It give us unlimited possibilities without coding anything… and
of course we can code !
Sponsored by
Managing backgrounds and scenes
● For Egg Hunter project, available at https://gamolf.itch.io/egg-
hunter, I needed to manage sprites positions and actions in
different threads.
● I wanted 60 FPS (because we need goals in life).
● I didn’t check if I succeeded but the result is good enough in
term of user experience.
Sponsored by
Managing backgrounds and scenes
● My scene is a TImage. I never draw on it.
● I use a TBitmap in background as a buffer. It’s only refreshed
depending on the viewport position and sprite actions.
● A timer checks every 16ms if I changed the buffer bitmap. If so,
I copy it to the scene image.
● It’s simple. Just need some Booleans and TMutex to avoid
access violations, conflicts and sprites flipping.
Sponsored by
Managing backgrounds and scenes
● In other games, I simply use TLayout on a TForm to simulate a
Z-Index if needed.
● You have a sample at
https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe
ts/tree/main/AnimationVaguesEtCanards
● I used it for Ok Ducky ! game available at
https://gamolf.itch.io/ok-ducky
Sponsored by
Managing user interface
● User interface is simple : I can use styled visual components,
shapes, images, …
● For texts I user TLabel if I want the look and feel of the OS or
TText when I prefer to change color, size and font in my
program.
● For buttons I use TButton, a personalized button style or I
“draw” them in a TFrame with TRectangle, images, effects and
texts.
Sponsored by
Managing user interface
● Have a look at this 2018 CodeRage replay to see how I proceed :
https://serialstreameur.fr/coderage2018-christmasgame-
codereview.php
● This project source code is available on GitHub :
https://github.com/DeveloppeurPascal/CodeRage2018-
ChristmasGame
Sponsored by
Managing sprites, animations and collisions
● For sprites I use the bitmap kind of Fill property from
TRectangle or TCircle components.
● For other visual elements I use TImage with a TImageList or the
background (Fill.Bitmap) of other shapes.
Sponsored by
Managing sprites, animations and collisions
● Animating is easy : FireMonkey give us a TBitmapListAnimation
component which accepts a sprite sheet.
● Look this samples :
https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe
ts/tree/main/AnimSpriteExplosion
and
https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe
ts/tree/main/AnimSpritePersonnage
Sponsored by
Managing sprites, animations and collisions
● To check collisions, I use what Delphi use for the visual
components and testing mouse clicks.
● IntersectRect() is a very useful (too unknown) method to check
if two rectangles collide.
● It’s standard. It works since more than 26 years in the VCL and
now in FMX. Why not using it ?
Sponsored by
Managing sprites, animations and collisions
● For circles I calculate the distance between center of each circle
and compare it to the sum of their radius.
● You have a sample with Soap Bubbles game available at
https://gamolf.itch.io/soap-bubbles
● The base code for this game is available on GitHub :
https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe
ts/tree/main/JeuDesCercles
Sponsored by
Managing sprites, animations and collisions
● For circle versus a rectangle, I calculate the distance between
the circle center and each angle of the rectangle.
● The classic sample for this is a Pong or Breakout game, when
the ball hits a wall or a brick.
● You have the source code of a sample breakout done for Learn
To Code Summer Camp 2021 event at
https://github.com/DeveloppeurPascal/Casse-Briques
Sponsored by
What about 3D ?
● 3D is little more complicated, but FireMonkey includes 3D
viewport and 3D shapes.
● You can use them to create games like did Grégory Bersegeay,
another French Embarcadero MVP, for
○ 3D Pong : a pong game in 3D.
https://github.com/gbegreg/FMXPong
○ FMX Corridor : a The Light Corridor remake.
https://github.com/gbegreg/FMXCorridor
○ FMX Island : an island in 3D, base for FPS games.
https://github.com/gbegreg/FMXISland
Sponsored by
You want more ?
● Did I say it’s simple to use Delphi and FireMonkey for game
coding and deploying them for Windows, Mac, Linux, iOS and
Android devices ?
● With those samples and links, I hope you have all what you need
to understand how to use FireMonkey as a game engine in your
games.
● If not, contact me and tell me what is missing or submit new
feature requests directly in Embarcadero’s Quality Portal.
Sponsored by 31
Q&A
Sponsored by
Q&A
● Sorry, I’m not live for Q&A during DelphiCon 2021 but if you
want to talk, leave me a message on LinkedIn or at
https://developpeur-pascal.fr/contact/
● You also can talk with me on Twitch during a live (game or
other) coding stream at
https://www.twitch.tv/patrickpremartin
● Please write in French or English.
Use https://www.deepl.com/translator tool to translate if
needed.
Sponsored by
THANK YOU!

More Related Content

What's hot

Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysWithTheBest
 
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたい
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたいリアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたい
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたいYutoNishine
 
Makalah konsep-teknologi
Makalah konsep-teknologiMakalah konsep-teknologi
Makalah konsep-teknologiajiesoetiawan
 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceGene Leybzon
 
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27..."The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...Sherry Jones
 
Game Writing & Narrative Design
Game Writing & Narrative DesignGame Writing & Narrative Design
Game Writing & Narrative DesignCraig Carey
 
What Is A Game Engine
What Is A Game EngineWhat Is A Game Engine
What Is A Game EngineSeth Sivak
 
NFT Marketplace Development - Coinjoker
NFT Marketplace Development - CoinjokerNFT Marketplace Development - Coinjoker
NFT Marketplace Development - Coinjokeramarasophi
 
FIRST PERSON SHOOTER GAME UNITY 3D
 FIRST PERSON SHOOTER GAME UNITY 3D FIRST PERSON SHOOTER GAME UNITY 3D
FIRST PERSON SHOOTER GAME UNITY 3DRohith GS
 
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)Linda John
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d GameIsfand yar Khan
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetAbhijeet Kalsi
 

What's hot (20)

Blockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSysBlockchain, Ethereum and ConsenSys
Blockchain, Ethereum and ConsenSys
 
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたい
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたいリアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたい
リアルタイムなゲームの開発でコンテナを使ってみたら簡単便利で激安だったのでオススメしたい
 
Makalah konsep-teknologi
Makalah konsep-teknologiMakalah konsep-teknologi
Makalah konsep-teknologi
 
Uu ite
Uu iteUu ite
Uu ite
 
Filsafat hukum
Filsafat hukumFilsafat hukum
Filsafat hukum
 
Non-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplaceNon-fungible tokens. From smart contract code to marketplace
Non-fungible tokens. From smart contract code to marketplace
 
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27..."The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...
"The Blockchain Effect on the Future of Game Design" by Sherry Jones (July 27...
 
Game Writing & Narrative Design
Game Writing & Narrative DesignGame Writing & Narrative Design
Game Writing & Narrative Design
 
What Is A Game Engine
What Is A Game EngineWhat Is A Game Engine
What Is A Game Engine
 
Gaming in India
Gaming in IndiaGaming in India
Gaming in India
 
E-Sports Presentation
E-Sports Presentation E-Sports Presentation
E-Sports Presentation
 
First-person Shooters
First-person ShootersFirst-person Shooters
First-person Shooters
 
Bantex catalogue 2018
Bantex catalogue 2018Bantex catalogue 2018
Bantex catalogue 2018
 
NFT Marketplace Development - Coinjoker
NFT Marketplace Development - CoinjokerNFT Marketplace Development - Coinjoker
NFT Marketplace Development - Coinjoker
 
FIRST PERSON SHOOTER GAME UNITY 3D
 FIRST PERSON SHOOTER GAME UNITY 3D FIRST PERSON SHOOTER GAME UNITY 3D
FIRST PERSON SHOOTER GAME UNITY 3D
 
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)
What is NFT? | A Complete Use-Cases of Non-Fungible Token (NFT)
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
 
How To Mint An NFT?
How To Mint An NFT?How To Mint An NFT?
How To Mint An NFT?
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - Abhijeet
 
Week 2, Game Design
Week 2, Game DesignWeek 2, Game Design
Week 2, Game Design
 

Similar to Using FireMonkey as a game engine

Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Holden Karau
 
How to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudHow to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudChris Schalk
 
Advanced Video Production with FOSS
Advanced Video Production with FOSSAdvanced Video Production with FOSS
Advanced Video Production with FOSSKirk Kimmel
 
GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++Gerke Max Preussner
 
Simplifying training deep and serving learning models with big data in python...
Simplifying training deep and serving learning models with big data in python...Simplifying training deep and serving learning models with big data in python...
Simplifying training deep and serving learning models with big data in python...Holden Karau
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engineMichalis Kamburelis
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Holden Karau
 
AGDK tutorial step by step
AGDK tutorial step by stepAGDK tutorial step by step
AGDK tutorial step by stepJungsoo Nam
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionistFelipe Prado
 
How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)Mihai Gosa
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Embarcadero Technologies
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalMichalis Kamburelis
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.aviSeongJae Park
 
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter   not yet another mobile cross-platform framework - i ox-kl19Flutter   not yet another mobile cross-platform framework - i ox-kl19
Flutter not yet another mobile cross-platform framework - i ox-kl19oradoe
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Lviv Startup Club
 
Encode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoEncode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoKlaraOrban
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environmentpprem
 

Similar to Using FireMonkey as a game engine (20)

Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...
 
How to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the CloudHow to build Kick Ass Games in the Cloud
How to build Kick Ass Games in the Cloud
 
Advanced Video Production with FOSS
Advanced Video Production with FOSSAdvanced Video Production with FOSS
Advanced Video Production with FOSS
 
GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++GDCE 2015: Blueprint Components to C++
GDCE 2015: Blueprint Components to C++
 
Simplifying training deep and serving learning models with big data in python...
Simplifying training deep and serving learning models with big data in python...Simplifying training deep and serving learning models with big data in python...
Simplifying training deep and serving learning models with big data in python...
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
AGDK tutorial step by step
AGDK tutorial step by stepAGDK tutorial step by step
AGDK tutorial step by step
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
 
How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)
 
Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework Python on Android with Delphi FMX - The Cross Platform GUI Framework
Python on Android with Delphi FMX - The Cross Platform GUI Framework
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.avi
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter   not yet another mobile cross-platform framework - i ox-kl19Flutter   not yet another mobile cross-platform framework - i ox-kl19
Flutter not yet another mobile cross-platform framework - i ox-kl19
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”
 
Encode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in MotokoEncode x ICH: Intro to Building on the IC in Motoko
Encode x ICH: Intro to Building on the IC in Motoko
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environment
 

More from pprem

Easy coding a multi device game with FireMonkey
Easy coding a multi device game with FireMonkeyEasy coding a multi device game with FireMonkey
Easy coding a multi device game with FireMonkeypprem
 
Utiliser FireMonkey comme moteur de jeux vidéo
Utiliser FireMonkey comme moteur de jeux vidéoUtiliser FireMonkey comme moteur de jeux vidéo
Utiliser FireMonkey comme moteur de jeux vidéopprem
 
Coder sans coder : Delphi en mode no code !
Coder sans coder : Delphi en mode no code !Coder sans coder : Delphi en mode no code !
Coder sans coder : Delphi en mode no code !pprem
 
Quoi de neuf dans la version 11 Alexandria ?
Quoi de neuf dans la version 11 Alexandria ?Quoi de neuf dans la version 11 Alexandria ?
Quoi de neuf dans la version 11 Alexandria ?pprem
 
Faire des applications web avec Delphi
Faire des applications web avec DelphiFaire des applications web avec Delphi
Faire des applications web avec Delphipprem
 
Utilisation de git avec Delphi
Utilisation de git avec DelphiUtilisation de git avec Delphi
Utilisation de git avec Delphipprem
 
Diffuser nos logiciels et leurs mises à jour
Diffuser nos logiciels et leurs mises à jourDiffuser nos logiciels et leurs mises à jour
Diffuser nos logiciels et leurs mises à jourpprem
 
Delphi et les tests unitaires
Delphi et les tests unitairesDelphi et les tests unitaires
Delphi et les tests unitairespprem
 
Développer une application pour Android TV avec Delphi
Développer une application pour Android TV avec DelphiDévelopper une application pour Android TV avec Delphi
Développer une application pour Android TV avec Delphipprem
 
Sauvegarder et restaurer l'état des applications mobiles
Sauvegarder et restaurer l'état des applications mobilesSauvegarder et restaurer l'état des applications mobiles
Sauvegarder et restaurer l'état des applications mobilespprem
 
Gérer le clavier virtuel sous iOS et Android
Gérer le clavier virtuel sous iOS et AndroidGérer le clavier virtuel sous iOS et Android
Gérer le clavier virtuel sous iOS et Androidpprem
 
Internationaliser les projets VCL / FMX
Internationaliser les projets VCL / FMXInternationaliser les projets VCL / FMX
Internationaliser les projets VCL / FMXpprem
 
Comment développer pour Linux avec Delphi
Comment développer pour Linux avec DelphiComment développer pour Linux avec Delphi
Comment développer pour Linux avec Delphipprem
 
Utiliser des dessins vectoriels à la place d'images
Utiliser des dessins vectoriels à la place d'imagesUtiliser des dessins vectoriels à la place d'images
Utiliser des dessins vectoriels à la place d'imagespprem
 
Embarquer une base de données locale dans vos logiciels et applications mobiles
Embarquer une base de données locale dans vos logiciels et applications mobilesEmbarquer une base de données locale dans vos logiciels et applications mobiles
Embarquer une base de données locale dans vos logiciels et applications mobilespprem
 
Déploiement et débogage à distance
Déploiement et débogage à distanceDéploiement et débogage à distance
Déploiement et débogage à distancepprem
 
Utiliser l'EDI pour développer en multiplateforme
Utiliser l'EDI pour développer en multiplateformeUtiliser l'EDI pour développer en multiplateforme
Utiliser l'EDI pour développer en multiplateformepprem
 
Faire une interface adaptive avec la VCL
Faire une interface adaptive avec la VCLFaire une interface adaptive avec la VCL
Faire une interface adaptive avec la VCLpprem
 
Faire une interface adaptive avec FireMonkey
Faire une interface adaptive avec FireMonkeyFaire une interface adaptive avec FireMonkey
Faire une interface adaptive avec FireMonkeypprem
 
QR codes et codes à barres sous Delphi
QR codes et codes à barres sous DelphiQR codes et codes à barres sous Delphi
QR codes et codes à barres sous Delphipprem
 

More from pprem (20)

Easy coding a multi device game with FireMonkey
Easy coding a multi device game with FireMonkeyEasy coding a multi device game with FireMonkey
Easy coding a multi device game with FireMonkey
 
Utiliser FireMonkey comme moteur de jeux vidéo
Utiliser FireMonkey comme moteur de jeux vidéoUtiliser FireMonkey comme moteur de jeux vidéo
Utiliser FireMonkey comme moteur de jeux vidéo
 
Coder sans coder : Delphi en mode no code !
Coder sans coder : Delphi en mode no code !Coder sans coder : Delphi en mode no code !
Coder sans coder : Delphi en mode no code !
 
Quoi de neuf dans la version 11 Alexandria ?
Quoi de neuf dans la version 11 Alexandria ?Quoi de neuf dans la version 11 Alexandria ?
Quoi de neuf dans la version 11 Alexandria ?
 
Faire des applications web avec Delphi
Faire des applications web avec DelphiFaire des applications web avec Delphi
Faire des applications web avec Delphi
 
Utilisation de git avec Delphi
Utilisation de git avec DelphiUtilisation de git avec Delphi
Utilisation de git avec Delphi
 
Diffuser nos logiciels et leurs mises à jour
Diffuser nos logiciels et leurs mises à jourDiffuser nos logiciels et leurs mises à jour
Diffuser nos logiciels et leurs mises à jour
 
Delphi et les tests unitaires
Delphi et les tests unitairesDelphi et les tests unitaires
Delphi et les tests unitaires
 
Développer une application pour Android TV avec Delphi
Développer une application pour Android TV avec DelphiDévelopper une application pour Android TV avec Delphi
Développer une application pour Android TV avec Delphi
 
Sauvegarder et restaurer l'état des applications mobiles
Sauvegarder et restaurer l'état des applications mobilesSauvegarder et restaurer l'état des applications mobiles
Sauvegarder et restaurer l'état des applications mobiles
 
Gérer le clavier virtuel sous iOS et Android
Gérer le clavier virtuel sous iOS et AndroidGérer le clavier virtuel sous iOS et Android
Gérer le clavier virtuel sous iOS et Android
 
Internationaliser les projets VCL / FMX
Internationaliser les projets VCL / FMXInternationaliser les projets VCL / FMX
Internationaliser les projets VCL / FMX
 
Comment développer pour Linux avec Delphi
Comment développer pour Linux avec DelphiComment développer pour Linux avec Delphi
Comment développer pour Linux avec Delphi
 
Utiliser des dessins vectoriels à la place d'images
Utiliser des dessins vectoriels à la place d'imagesUtiliser des dessins vectoriels à la place d'images
Utiliser des dessins vectoriels à la place d'images
 
Embarquer une base de données locale dans vos logiciels et applications mobiles
Embarquer une base de données locale dans vos logiciels et applications mobilesEmbarquer une base de données locale dans vos logiciels et applications mobiles
Embarquer une base de données locale dans vos logiciels et applications mobiles
 
Déploiement et débogage à distance
Déploiement et débogage à distanceDéploiement et débogage à distance
Déploiement et débogage à distance
 
Utiliser l'EDI pour développer en multiplateforme
Utiliser l'EDI pour développer en multiplateformeUtiliser l'EDI pour développer en multiplateforme
Utiliser l'EDI pour développer en multiplateforme
 
Faire une interface adaptive avec la VCL
Faire une interface adaptive avec la VCLFaire une interface adaptive avec la VCL
Faire une interface adaptive avec la VCL
 
Faire une interface adaptive avec FireMonkey
Faire une interface adaptive avec FireMonkeyFaire une interface adaptive avec FireMonkey
Faire une interface adaptive avec FireMonkey
 
QR codes et codes à barres sous Delphi
QR codes et codes à barres sous DelphiQR codes et codes à barres sous Delphi
QR codes et codes à barres sous Delphi
 

Recently uploaded

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Using FireMonkey as a game engine

  • 1. Sponsored by Using FireMonkey as a game engine Patrick Prémartin DELPHICON 2021 The Official Online Conference All About Embarcadero Delphi delphicon.embarcadero.com
  • 2. Sponsored by Agenda ● What is a game engine ? ● What is FireMonkey ? ● Why using FireMonkey to code games ? ● Really ? Games in Delphi FMX ? ● Managing music and sound effects ● Managing backgrounds and scenes ● Managing user interface ● Managing sprites, animations and collisions ● What about 3D ? ● You want more ?
  • 3. Sponsored by Speaker ● Patrick Prémartin - MVP Embarcadero ● Freelance Delphi and web developer since 2000 (just after the bug) ● Delphi user since the beginning and before with Borland / Turbo Pascal. ● Game coder since a little more (TO7-70 J)
  • 4. Sponsored by Speaker ● Patrick Prémartin - MVP Embarcadero ● Follow me on : ● GitHub : https://github.com/DeveloppeurPascal ● Itch.io : https://gamolf.itch.io ● Twitch : https://www.twitch.tv/patrickpremartin ● My blog : https://developpeur-pascal.fr ● LinkedIn : https://www.linkedin.com/in/patrickpremartin/
  • 5. Sponsored by What is a game engine ? ● A game engine is a library or set of components available to create games. ● You have code, SDK and sometimes editor tools or you can use external tools like Tiled to create your scenes and maps. ● A game engine is not a complete game making software like you have with GameMaker Studio, AppGameKit Studio, Game Guru, Clickteam Fusion, Unreal Engine or Unity but the code to work with when creating games.
  • 6. Sponsored by What is a game engine ? ● There are a lot of game making software and game engines coded in Pascal. ● One of the most known is Castle Game Engine available at https://castle-engine.io/ It now has Delphi compatibility. Look at Michalis Kamburelis DelphiCon 2021 session to know more about it. https://delphicon.embarcadero.com/talks/castle-game-engine- coming-to-delphi/
  • 7. Sponsored by What is a game engine ? ● You perhaps eared about some of this other game engines for Delphi or Pascal developers : ○ Gorilla 3D Framework : https://www.gorilla3d.de ○ Apus Game Engine : https://github.com/Cooler2/ApusGameEngine ○ SDL2 for Pascal : https://github.com/PascalGameDevelopment/SDL2-for- Pascal ○ Andorra 2D, Turbu, Asphyre, DelphiX, Rage3D, and a lot more listed at https://wiki.freepascal.org/Game_Engine
  • 8. Sponsored by What is FireMonkey ? ● FireMonkey is the multiplatform set of components and libraries available in Delphi. ● You have VCL for Windows projects since Delphi 1. ● And since Delphi XE2 we have FireMonkey for all major platforms. ● With Delphi 11 Alexandria you can target Windows, Mac, Linux, iOS and Android platforms depending on your license level.
  • 9. Sponsored by What is FireMonkey ? ● The idea behind FireMonkey is to have one project and one source code to target all major platforms. ● You don’t need to know “platforms languages” like Objective-C, Swift, Java, Kotlin, C, C++, C#, .Net, …
  • 10. Sponsored by What is FireMonkey ? ● FireMonkey includes classic visual components but also shapes, animations, visual effects, 3D, access to system API and other libraries. ● It’s included in all Delphi license level even the Community Edition (free for personal use) and Academic Edition.
  • 11. Sponsored by Why using FireMonkey to code games ? ● The simple answer could be “why not ?” and in fact it’s the first reason I had to play with it. ● Second answer is more technical : ● FireMonkey draws everything on screen by default. ● Visual components are sets of shapes and effects. They are styled and can be changed without coding. ● We have 2D and 3D components and layers in standard.
  • 12. Sponsored by Why using FireMonkey to code games ? ● The simple answer could be “why not ?” and in fact it’s the first reason I had to play with it. ● Second answer is more technical : ● Touch, mouse and keyboard are managed by Delphi. It works for classic programs, so it works for games too. ● We can use properties and events, timers and threads, multi resolution images and bitmaps, classes and all thinks needed to code games.
  • 13. Sponsored by Really ? Games in Delphi FMX ? ● In 2021 I streamed weekly game coding sessions on Twitch, with Delphi and FireMonkey. ● Published games are available at https://gamolf.itch.io ● Some projects have been open sourced on my GitHub account: https://github.com/DeveloppeurPascal/DevPas-Games-Pack ● A lots of other projects are available with “delphi-game” hashtag: https://github.com/topics/delphi-game
  • 14. Sponsored by Really ? Games in Delphi FMX ? ● You can also check the showcase part of Embarcadero blogs at https://blogs.embarcadero.com/category/showcase/ ● And more on iOS and Android stores ! ● Simply look at the list of games which developers forgot to change default package name in their project options : https://www.google.com/search?q=%22com.embarcadero.%22 +game+site%3Aplay.google.com Please don’t forget to personalize your project version info option page.
  • 15. Sponsored by How to ? ● Know, let’s look a little more at developer side of game making with FireMonkey projects in Delphi. ● You’ll find code samples and usable Delphi units on GitHub at https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe ts
  • 16. Sponsored by Managing music and sound effects ● Managing sounds in a Delphi project is simple. We have a component for that : TMediaPlayer. ● In my games I use it to play MP3 music in background. A timer check if the music is over and restart it for a loop. ● For sound effects, I play WAV files with another TMediaPlayer (or more than one in a TObjectList<TMediaPlayer> depending on the game). ● To do the same, use the TMusicLoop class in uMusicLoop.pas
  • 17. Sponsored by Managing backgrounds and scenes ● For backgrounds and scenes, I use TImage component, the Fill property of shapes like TRectangle or TCircle and the TPath to draw SVG path depending on my needs. ● All FireMonkey visual components are containers. They can be parents for all other visual components. ● All visual components have opacity, rotation and scale properties.
  • 18. Sponsored by Managing backgrounds and scenes ● We can use nonvisual components to change property values in a specific duration (TFloatAnimation is very useful). ● We have visual effect as nonvisual components like TShadowEffect and TGlowEffect, useful for games and classic programs to show errors or needed edit fields. ● It give us unlimited possibilities without coding anything… and of course we can code !
  • 19. Sponsored by Managing backgrounds and scenes ● For Egg Hunter project, available at https://gamolf.itch.io/egg- hunter, I needed to manage sprites positions and actions in different threads. ● I wanted 60 FPS (because we need goals in life). ● I didn’t check if I succeeded but the result is good enough in term of user experience.
  • 20. Sponsored by Managing backgrounds and scenes ● My scene is a TImage. I never draw on it. ● I use a TBitmap in background as a buffer. It’s only refreshed depending on the viewport position and sprite actions. ● A timer checks every 16ms if I changed the buffer bitmap. If so, I copy it to the scene image. ● It’s simple. Just need some Booleans and TMutex to avoid access violations, conflicts and sprites flipping.
  • 21. Sponsored by Managing backgrounds and scenes ● In other games, I simply use TLayout on a TForm to simulate a Z-Index if needed. ● You have a sample at https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe ts/tree/main/AnimationVaguesEtCanards ● I used it for Ok Ducky ! game available at https://gamolf.itch.io/ok-ducky
  • 22. Sponsored by Managing user interface ● User interface is simple : I can use styled visual components, shapes, images, … ● For texts I user TLabel if I want the look and feel of the OS or TText when I prefer to change color, size and font in my program. ● For buttons I use TButton, a personalized button style or I “draw” them in a TFrame with TRectangle, images, effects and texts.
  • 23. Sponsored by Managing user interface ● Have a look at this 2018 CodeRage replay to see how I proceed : https://serialstreameur.fr/coderage2018-christmasgame- codereview.php ● This project source code is available on GitHub : https://github.com/DeveloppeurPascal/CodeRage2018- ChristmasGame
  • 24. Sponsored by Managing sprites, animations and collisions ● For sprites I use the bitmap kind of Fill property from TRectangle or TCircle components. ● For other visual elements I use TImage with a TImageList or the background (Fill.Bitmap) of other shapes.
  • 25. Sponsored by Managing sprites, animations and collisions ● Animating is easy : FireMonkey give us a TBitmapListAnimation component which accepts a sprite sheet. ● Look this samples : https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe ts/tree/main/AnimSpriteExplosion and https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe ts/tree/main/AnimSpritePersonnage
  • 26. Sponsored by Managing sprites, animations and collisions ● To check collisions, I use what Delphi use for the visual components and testing mouse clicks. ● IntersectRect() is a very useful (too unknown) method to check if two rectangles collide. ● It’s standard. It works since more than 26 years in the VCL and now in FMX. Why not using it ?
  • 27. Sponsored by Managing sprites, animations and collisions ● For circles I calculate the distance between center of each circle and compare it to the sum of their radius. ● You have a sample with Soap Bubbles game available at https://gamolf.itch.io/soap-bubbles ● The base code for this game is available on GitHub : https://github.com/DeveloppeurPascal/DelphiFMXGameSnippe ts/tree/main/JeuDesCercles
  • 28. Sponsored by Managing sprites, animations and collisions ● For circle versus a rectangle, I calculate the distance between the circle center and each angle of the rectangle. ● The classic sample for this is a Pong or Breakout game, when the ball hits a wall or a brick. ● You have the source code of a sample breakout done for Learn To Code Summer Camp 2021 event at https://github.com/DeveloppeurPascal/Casse-Briques
  • 29. Sponsored by What about 3D ? ● 3D is little more complicated, but FireMonkey includes 3D viewport and 3D shapes. ● You can use them to create games like did Grégory Bersegeay, another French Embarcadero MVP, for ○ 3D Pong : a pong game in 3D. https://github.com/gbegreg/FMXPong ○ FMX Corridor : a The Light Corridor remake. https://github.com/gbegreg/FMXCorridor ○ FMX Island : an island in 3D, base for FPS games. https://github.com/gbegreg/FMXISland
  • 30. Sponsored by You want more ? ● Did I say it’s simple to use Delphi and FireMonkey for game coding and deploying them for Windows, Mac, Linux, iOS and Android devices ? ● With those samples and links, I hope you have all what you need to understand how to use FireMonkey as a game engine in your games. ● If not, contact me and tell me what is missing or submit new feature requests directly in Embarcadero’s Quality Portal.
  • 32. Sponsored by Q&A ● Sorry, I’m not live for Q&A during DelphiCon 2021 but if you want to talk, leave me a message on LinkedIn or at https://developpeur-pascal.fr/contact/ ● You also can talk with me on Twitch during a live (game or other) coding stream at https://www.twitch.tv/patrickpremartin ● Please write in French or English. Use https://www.deepl.com/translator tool to translate if needed.