-
Content Count
321 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Patrick PREMARTIN
-
Some games and project samples with FireMonkey in Delphi
Patrick PREMARTIN posted a topic in I made this
Hello After talking about some of my utilities in November, I thought it would be interesting to talk about the other side: video games. I only do 2D, generally using FireMonkey. On classic FMX projects I add some of my libraries: game controllers, support for graphic elements as user components, help bar, music, score and settings storage. Everything is open source and available on GitHub. I have a few game projects developed under Delphi also visible on GitHub. They're available as executables or will be when I'm happy with how they work. Files containing licensed items, passwords or encryption keys are not put online. This prevents programs from being compiled, but not from reading their source code. If you're interested in the subject of game coding, here are a few repositories to look into: Delphi FMX Game Snippets: demos and examples of features and games (such as match-3, coded today as a TFrame). My Delphi libraries: a set of units I use everywhere, including SVG image list management and settings storage for my programs. Delphi Game Engine: components and libraries to support what we use in classic video games, with as few dependencies as possible and ideally cross-platform. Gamolf FMX Game Starter Kit: I presented it at the Embarcadero online conference in July 2024. This starter kit has evolved and simplified quite a bit since then. I've started switching my games over to it. There's still all the documentation to be produced before it's really usable by you, but I'm available if you have any questions. A pack of Delphi games: the list of my open source games available on GitHub. These projects are intended to work as much as possible with what Embarcadero provides, to be as simple as possible to use, consult and understand. I don't and never will support everything done by Castle Game Engine, Gorilla3D, APUS or other specialized game engines. On the other hand, what I offer should satisfy the majority of 2D video games (or 3D if you manage it yourself). PS: As with the utilities, the game sites are not all available and redirect to Itch.io or GitHub. Yesterday's release of this repository and the start of work on two others should finally allow me to create the hundred or so sites I've been waiting for. That should keep me busy for another year or two... 😉 -
Some games and project samples with FireMonkey in Delphi
Patrick PREMARTIN replied to Patrick PREMARTIN's topic in I made this
Last week-end I finished the rebuild in Delphi FMX of the video game Bidioo I've created in AGK Basic in 2013. It's a match-3 game. I used the sample match-3 TFrame added to Delphi FMX Game Snippets two weeks ago. The graphics are in SVG. I use Skia like in my other recent games. On iOS and macOS with Metal it's very speed. The best experience is of course on an iPad. On Windows without the Skia raster it works as expected (in a VM, I didn't check on a real PC). On Android it's too slow to have the full animations, but it works. I've to find the reason and check with Skia4Delphi and EMB teams if a solution can be found. The 2.0 version has been published on stores. you'll find the download links on this page. I can send you free coupons if you want to test the game on an Apple device. Just send me a private message. For Windows, use Itch to get the installer (and the game) for free. The source code of the project are on GitHub except some files where are stores the SVG (the images are under closed licenses). It won't compile as it instead of the match-3 sample project. Some demos are available from YouTube and PeerTube. If you want to talk about game programming in Delphi or this particular game, you know how to message me. We can do anythings in Delphi. Just try. 😉 -
Hi If you want to prevent the user activities for a waiting animation you simply have to put a Layout with contents alignement and HitTest=True. Instead of using a Form for your animation, use a TFrame or a simple image component. Of course if the user is supposed to have a real keyboard, you must intercept onKeyDown events.
-
shareware Some open sourced tools for Delphi developers
Patrick PREMARTIN posted a topic in I made this
Hi From the contacts I have from time to time following presentations or training courses, it seems that I'm better known for the video game coding part of my hobby than for the other stuff. It's true that I find it more fun (especially to stream on Twitch), but I also have utilities for Delphi developers created to simplify my life that I make available as binaries and source code on my GitHub account. App Stores Screen Captures Generator : to generate all the needed images from your screen captures when you have to publish your softwares on current app stores Copyright Pascal Projects : to add a copyright text in the header of each PAS/DPR files of a folder tree DProj To Windows Setup : to generate the Windows setup from Delphi deployment wizard data. It uses Inno Setup to create the install program and Exe Bulk Signing to sign the exe files. Exe Bulk Signing : a local and network signing program for Windows executables (exe+msix). It has an API you can use to integrate it in your projects like I did with "DProj To Windows Setup". Folder to FMX Image List : to create a FireMonkey TImageList to copy paste in your project or in a data module unit from all images in a folder tree. It fills the multires bitmaps depending on file names. Google Play Developer Banner Generator : to create a picture to use has your Play Store developer banner composed by a random collage of images you add to your project. I use it with icons of my Android apps. HTML Writer : to simply get HTML source code or WYSIWYG HTML content. I use Delphi HTML Components library in this program to have the WYSYWYG HTML editor and a memo for the source code tab item. Pic Mob Generator : my icons generator from basics layers or images, SVG, paths or rectangles. It export JPEG&PNG images, ICO and ICNS files. For the SVG I used RiverSoftAVG SVG Component Library, but next release will use Skia4Delphi. SM Code Generator : I use it in some multi players games, for EXE Bulk Signing API and client projects. The program generates Delphi code you only have to use in your projects to have a client / server solution to exchange formatted messages over IP. The library uses standard TCP sockets from Embarcadero (with no external dependencies). SVG Folder to Delphi Unit : to import SVG files as Pascal strings in your projects. I use it in some games with Skia4Delphi to show icons or sprites. The program generates a unit (compatible with Delphi 12.X and higher) with SVG found in a folder. Some of these programs are available from GetIt. The others will be submitted before the end of the year. The download links are on their GitHub repositories and will be added to their websites (which should be redirected to GitHub in the meantime). If you need changes in these programs or have suggestions, be free to tell here or as issues on their repositories. I'm also looking for ideas of simple tools to develop during live coding streams to show Delphi or web solutions. They are distributed as shareware programs. Contributions and sponsoring are welcome but not obligatory, and there are no program restrictions in the absence of a valid license. All features are available for free. -
shareware Some open sourced tools for Delphi developers
Patrick PREMARTIN replied to Patrick PREMARTIN's topic in I made this
My projects are open source. It doesn't means all the code of the dependencies are open source too. If I use FireDAC, I'm still open source, even if Embarcadero don't give us everything (like the drivers). Open source and free software are subject to interpretation. It's a debate that began in the last century and will never end. -
shareware Some open sourced tools for Delphi developers
Patrick PREMARTIN replied to Patrick PREMARTIN's topic in I made this
I try to use only components from Embarcadero (available in the CE edition, but as an MVP I have the Enterprise edition) or open sourced, but sometimes I need others like Delphi HTML Components used in HTML Writer. In this case my code stay open source. I cannot guarantee that everything I offer online can be recompiled without external dependencies. In the case of external components, I either purchase them or they are given to me, but in no case is it for advertising purposes, only because I have a use for them. -
How to find the currently used theme color of a themed control
Patrick PREMARTIN replied to Fudley's topic in FMX
I have a slightly more extreme solution: use a capture of the component whose color you want to retrieve (with MakeScreenshot) and look directly at its bitmap canvas. -
shareware Some open sourced tools for Delphi developers
Patrick PREMARTIN replied to Patrick PREMARTIN's topic in I made this
Today I've released "Copyright Pascal Project" v0.3b (still a beta but used in production by me). The purpose of this program is to add and update comments on top of Pascal files (PAS, DPR, LPR) with the copyright, description, authors, links you want to put on each files of your projects before distributing them. The program add a signature to each file to update the comments only for files really changed without looking at their file date. In previous releases I used XML Doc comments for the program or units name. I replaced them by a simple comment. The exports of developer docs (with DocInsight or PasDoc) are better like that and you are free to add yours XMLDoc comments without conflicts with what I do. The project is distributed as a shareware. You can download latest version from the GitHub repository at https://github.com/DeveloppeurPascal/CopyrightPascalProjects/releases/ The program changes the Pascal source files in a folder tree. Beware of changes it can do in case of errors or bugs. I didn't see anything wrong with it but it's up to you to save your files or do commits before applying new comments on your projects with C2PP (or any other tool which change files without previous control). -
Hi Did you found a solution for this problem or filled an issue on the quality portal ? I'm having a similar problem where UPDATE doesn't work, whereas INSERT and SELECT don't cause any problems with BLOB fields.
-
It's now official : FMX Linux is back in GetIt for developers with Enterprise and Architect licenses under subscription. Current version available is 1.78 (the same for 12 and 12.1 Athens) but it will be maintained and evolve in the future. https://blogs.embarcadero.com/fmx-linux-for-delphi-12-3-is-now-available/
-
Did you installed it from GetIt or as a standalone program downloaded from https://my.embarcadero.com ? In the first case it should say the patch has been installed. In the second not. https://blogs.embarcadero.com/rad-studio-12-3-april-patch-available/ If you have FireMonkey projects on Mac/iOs, try to connect the IDE to PAServer. The patched version needs an update (the file is in the catalog repository folder of the patch).
-
How can you list all the datasources linked to a dataset?
Patrick PREMARTIN replied to PiedSoftware's topic in VCL
thanks -
Cannot install 12.3 to fresh Win11 VM - Error message is "Python37.zip" is in use or not enough disk space"
Patrick PREMARTIN replied to Stuart Clennett's topic in Delphi IDE and APIs
If you need to upgrade Windows 11 on this "old" VM it's possible even if Microsoft says "this system is too old, Windows Update can't be used anymore". I found how to do it on Parallels forum and can explain how to do it there. -
How can you list all the datasources linked to a dataset?
Patrick PREMARTIN replied to PiedSoftware's topic in VCL
Ah, yes, I've forgotten that. So no other solution than RTTI or checking all components in loops. Mark, you're probably not the first one in 30 years to want to access it. Perhaps you can open a "new feature" request on https://qp.embarcadero.com asking for having DataSources[] (read only) and DataSourceCount public properties on TDataSet ? (and explain why you need them) -
How can you list all the datasources linked to a dataset?
Patrick PREMARTIN replied to PiedSoftware's topic in VCL
Perhaps you can try to access it from a helper on TDataSet... -
Developpez.com blocks some external site like Google Translate. Only the translation included in the web browser can work.
-
Where can I download RAD Studio 12.3 help?
Patrick PREMARTIN replied to alank2's topic in Delphi IDE and APIs
The help is an install option, like the samples. Restarting the installer or Tools / Manage Features allow to install/uninstall them. You can also go to https://docwiki.embarcadero.com/docs/products/rad_studio/ if you just want the help files on an other computer and don't have access to the online DocWiki -
I've just created a sample project to illustrate what you can do. Check https://github.com/DeveloppeurPascal/Delphi-samples/tree/main/FireMonkey-Samples/027-StylesAndEXESize Screen samples are good for understanding how to use visual component stacking, layout and alignment, but not necessarily for organising things. Never put styles on forms but rather on data modules, like database components or image lists used by several files. This is something you learn as you use it, which you can read about in certain corners of the documentation or in the many books full of good practices. Unfortunately, it's difficult to add a comment in the examples, but a good idea for improvement.
-
Hi The things you do in the form editor is embed as a resource in the programs. If you fill your styles with more than one platform they are all embed in it. The solution is to use TDataModule as a TStyleBook container. One per platform or per platform/style. In the TDataModule unit, simple use compiler defines to compile or not the data module class depending on MSWINDOWS, ANDROID, IOS, MACO or LINUX defines. Condition the implementation the same way you do for the interface. In your code, do the same for the uses of these units and of course to enable or not the styles you want to use. It's a little work but it's easy to do and avoid having too big EXE/APK/IPA/APP files.
-
Some questions about password input and TDialogService
Patrick PREMARTIN replied to pquessev's topic in FMX
It was my second point, I've updated the post. -
I'm glad to see that my videos are sometimes useful. 😉
-
[Solved] FireDAC Encryption (FDE) Issue with SQLite 3.31.1+ in RAD Studio 12.3 - Access Violation
Patrick PREMARTIN replied to FT_Uhu's topic in Databases
Good to know. In projects used in older Delphi releases (or for open source) I suggest to replace the unit by this code if you still use FireDAC Encryption for SQLite : {$IF CompilerVersion >= 36.0} // Delphi 12 Athens FireDAC.Phys.SQLiteWrapper.FDEStat, {$ELSE IF CompilerVersion >= 34.0} // Delphi 10.4 Sydney FireDAC.Phys.SQLiteWrapper.Stat, {$ELSE} FireDAC.Phys.SQLiteWrapper, {$IFEND} -
Some questions about password input and TDialogService
Patrick PREMARTIN replied to pquessev's topic in FMX
Modifying standard units can be a source of problems when you install a new update or major release. It's better you add your own implementation. In FMX it's simple : - ShowModal of a form for Windows, Mac, Linux - For iOS / Android, using a Rectangle for the background (to catch the click events) and your design in front of it. A TFrame shown with an alignment contains and it's done. You can also use https://github.com/andrea-magni/TFrameStand which have dialog box samples. -
Embarcadero quality Portal Status "Ready for Validation"
Patrick PREMARTIN replied to CB2021's topic in General Help
... or less, it depends on the subjects -
Drawing forms according to screen size is a nice feature when targeting a particular device model, but if it's for the general public, don't use it. FMX uses the source screen with the same width/height for a specified OS. Just 2 pixels wider and it returns to the default view (according to tests I did a long time ago). It's preferable to draw our screens using the numerous layouts (grid, flow, layout) and alignments. Think responsive, like for a web page. If you draw your screen by pixel, use a TScaleLayout as a global container. It has a virtual size and a real size. You can use it to adapt the size of your content or add a zoom in / zoom out feature. Look a "screens" samples in GetIt to see how Embarcadero suggest to use those features for classic screens in a mobile app.