Forum > Operating Systems

General other OS question

<< < (3/3)

Seenkao:

--- Quote from: dLm on October 11, 2023, 05:58:47 pm ---So in order to get this thing to work for mobile I would have to write and compile a PC version, an android version and an iOS version?

--- End quote ---
Да, это наиболее правильное понимание происходящего. Для каждой платформы должно быть своё приложение. Универсальное приложение собой ни чего хорошего не несёт, кроме того, что оно универсальное.
И, я не видел ещё ни одной программы на FPC/Lazarus где было сделано универсальное приложение.

Если программы должны общаться между собой через интернет, то компиляция под определённую ОС ни как не должна повлиять на работу приложения. Одно и то же приложение, скомпилированное под разные ОС передаёт одни и те же данные для взаимодействия на разных устройствах.

Google translate:
Yes, this is the most correct understanding of what is happening. Each platform should have its own application. A universal application does not bring anything good, except that it is universal.
And, I have not yet seen a single program on FPC/Lazarus where a universal application was made.

If programs must communicate with each other via the Internet, then compilation for a specific OS should not in any way affect the operation of the application. The same application compiled for different OS transmits the same data for interaction on different devices.

dLm:
Here is a sample of the program that I am trying to optimize for android and iOS. Like i said it was an open source application but it stopped working correctly when color counts got higher. I got it working through my max colors (14) but now I am looking to optimize it for android and iOS

Handoko:

--- Quote from: dLm on October 11, 2023, 05:58:47 pm ---So in order to get this thing to work for mobile I would have to write and compile a PC version, an android version and an iOS version?

--- End quote ---

Which one you're asking about?

I haven't tested all the game development tools I mentioned above. But most of the them allow you to just write one code and generate binaries for Windows, Linux, Android, etc. For Construct Classic and GDevelop the same code can be used to generate binaries for Windows and Linux but their newer versions can also produce Android APKs.

As I said I haven't tested them all but the most impressive one I've tested so far is Godot Engine. It's free, I run the simple game demo on my desktop computer and that same code could be easily to be exported to Android APK. And I was amazed the same game code, which was running on my wide screen monitor then could be fit on my tall screen Android phone. No need to change any code, it worked like magic.

Most game development tools provide you a good visual editor, you can drag and drop items to design the game world. I said write code, well, that's not actually correct. Some of them allow you to design games without write a single line of code. Some call this kind of development tools game builder.

Building games using Lazarus is very different than all of them. Lazarus and Lazarus+LAMW is not game builder. Not sure but Castle Game Engine, which can be used with Lazarus, has its own game editor.

If you're good in Lazarus, same code you write can be targeted to both Windows and Linux (I don't use MacOS, I can't say anything about it). But to target Android platform you need to rewrite the code, as I said previously all the default visual components provided by Lazarus can't be used in LAMW. The good thing is you can write units (or non-Pascal users may call it modules), which can be used and shared for Windows, Linux and Android. So the core engine, game calculations, and many things can be write only once and be shared for multiple platforms. Then you just need to write the graphics engine unit for each of the targeted platforms. And if you know how, the Windows and Linux graphics engines can be merged into a single code. It may sound difficult, actually it can be easily done in Lazarus if you have the knowledge and time for studying it.

For ZenGL, I haven't really tested it, I can't say much about. It has less non-game related features compare to LAMW. For example in LAMW you can have ready to used components like jMenu, jEditText, jButton, jCheckBox, jProgressBar, jCustomDialog, jChronometer,  jDatePickerDialog, jDownloadManager, jCamera, jLocation, jBluetooth, etc. But ZenGL provides you a powerful graphics tool, in LAMW you need to write your own graphics engine first before you can write game using it. In short, ZenGL is a graphics engine that can be used to develop Android programs, LAMW is a tool to allow you to generate Android program using Lazarus. To write a complete game using Lazarus, usually you need game engine + graphics engine.

If you just want create games, don't use Lazarus. Because the default installation of Lazarus does not provide you any game engines and graphics engine. Yes you can install them yourself but it needs time to study it. Game engines and graphics engines can have overlap features, it is a bit hard to categorized which it is belong to.
https://wiki.freepascal.org/Game_Engine
https://wiki.freepascal.org/Choosing_a_Game_Engine
https://wiki.freepascal.org/Game_framework
https://wiki.freepascal.org/Developing_with_Graphics

Seenkao:

--- Quote from: dLm on October 11, 2023, 07:23:26 pm ---Here is a sample of the program that I am trying to optimize for android and iOS.

--- End quote ---
Данное приложение нельзя просто взять и перенести на мобильные платформы. Уже писали, что у Lazarus не совместимые графические компоненты с мобильными платформами.

Google translate:
This application cannot simply be taken and transferred to mobile platforms. It has already been written that Lazarus has incompatible graphic components with mobile platforms.

Navigation

[0] Message Index

[*] Previous page

Go to full version