I’m in the process of researching my options for creating a program similar to Obsidian or Zettlr and was wondering if CGE or Lazarus would be better for this.
I would like the finished program to run on minimal hardware - such as older laptops - that might not have a dedicated 3D GPU.
CGE can run on older hardware (we support even ancient OpenGL versions), see e.g. news Big rendering refactor: fully modern OpenGL support (3.3 core profile), mobile OpenGLES more functional (3D textures, occlusion query, more OpenGLES 3 features), ancient OpenGL better (reliable fallback to even 1.1 rendering in VMs), modernized GLSL code – Castle Game Engine . So we have this covered
That said, to implement application like https://obsidian.md/ or https://www.zettlr.com/ using CGE – it is possible to do this with Castle Game Engine, but probably it’s not optimal. (My reasoning goes for any game engine, if you’d ask e.g. whether it’s possible to implement such application using Unity or Godot I would answer the same – it’s possible, but not optimal.) Reason: The hardest part of such note-taking application is IMHO a text/media renderer, which most of these applications get by using Electron (Chrome inside). If you want to do it using Pascal and Lazarus, you can look at GitHub - salvadordf/CEF4Delphi: CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS. or fpCEF3 - Lazarus wiki .
I realize it’s a bit surprising that I’m actually not recommending to use CGE to develop this, but it would not be fair If you’d use CGE (or any other game engine) to develop such application, you’d have to spend a lot of time making this text/media renderer. And you don’t ultimately benefit from many of game engine features (3D / 2D world).
But if you want to use Lazarus and Pascal anyway (not necessarily CGE) then it’s certainly an option. Look at above options that allow to embed Chromium Embedded Framework inside Lazarus app. Or consider pas2js - Free Pascal wiki , and develop a regular “web application” in Pascal, and package it later using Electron.
1 Like
Thanks. That makes sense.
I had seen that Godot and Defold had been used to create applications and had hoped that CGE might also be suitable.
I hadn’t really considered the HTML viewing side of things as I was so focused on how I would create a GUI, as I haven’t done anything remotely like that before.
The Webbrowser page of the Free Pascal Wiki seems to have some useful info and links relating to displaying HTML pages. Pascal-WebUI in particular caught my eye.
I’ve heard that Electron applications can be quite slow, so haven’t really looked into that option.
Using Python would likely be easiest as there are so many existing packages available, but again it might be too slow when handling larger documents.