https://castle-engine.io/why_pascal * Support us on Patreon Wordmark 72% of $250 Castle Game Engine Logo Castle Game Engine * Download * Features * News * Documentation + Manual + Creating Game Data + API Reference + Why Pascal? + Modern Object Pascal Introduction + Overview for Unity Developers + Compiling from source + Scene Graph (X3D) + Presentation (GIC 2022) * Videos * Viewer for glTF, X3D... * Forum, Discord... * Gallery + Games + Tools + Additional Components + Assets (3D and 2D Graphics, Sound) * Why use Pascal? Table of Contents * 1. Short answer * 2. More elaborate answer + 2.1. Modern clean language to develop maintainable applications + 2.2. Fast + 2.3. Cross-platform + 2.4. Welcoming + 2.5. General purpose + 2.6. Ecosystem of tools 1. Short answer Object Pascal is a * modern, * readable, * fast, * type-safe, * cross-platform programming language. It is also easy to pick up if you know any OOP language. Learn more in our Modern Object Pascal Introduction for Programmers. VS Code completion 2. More elaborate answer 2.1. Modern clean language to develop maintainable applications * Object Pascal is a modern programming language. It supports classes, units, properties, generics, interfaces, reflection, closures... Everything you expect from a modern OOP language. * The syntax puts emphasis on readable code. * The language is type-safe. E.g. special types for booleans, strings, chars, sets, enums, ranges. Type conversions are either really safe, or have to be done explicitly. * There are additional run-time checks, e.g. array range checking, integer overflow checking, assertions, memory leak checking. Notes: + You can turn off these checks in release version, but use them in debug. When compiling using CGE build tool / editor, we have debug / release modes that automatically do this for you. + What are range and overflow checks (and errors) in Pascal + Detecting Memory Leaks 2.2. Fast * It is compiled to a native code and so is fast "out of the box". There's seldom any need to do low-level optimizations. * But if you need to, language can be as low-level as you want. E.g. you can use pointers, do pointer math, write OS and CPU-specific code, even add pieces in assembly. You can work on the same level as C or C++ does. But you will probably not need to get too "low level" in Note usual applications. E.g. Castle Game Engine has zero assembler code to maximize portability and code readability and we're still fast. * Compilation is also fast. pascal fast compilation 2.5 seconds to get desktop build, 10.1 seconds to get Android build of a new project, opened for the 1st time. Try to match that with your engine :) 2.3. Cross-platform * Desktop (Windows, Linux, macOS, Raspberry Pi, FreeBSD, probably every Unix... ), * mobile (Android, iOS), * consoles (Nintendo Switch, special in CGE), * web (both WebAssembly and JS (using pas2js)). See also Castle Game Engine platforms supported. 2.4. Welcoming * In Castle Game Engine case, engine code and game code are in the same language. Every user is contributor! * And the engine is open-source. Don't hesitate to fork CGE to adjust it to your needs. 2.5. General purpose There are existing libraries (units) in Pascal for everything: * database * XML, JSON * A.I. * blockchain * networking Moreover you can easily integrate with (link to) any existing library with C API. Any renderer, sound library, physics - we can use everything. You can also use Python libraries in Pascal easily. 2.6. Ecosystem of tools * FPC - Free Pascal Compiler, open-source. * Lazarus - IDE for Pascal, on top of FPC, also open-source. * Delphi - commercial compiler and IDE for Pascal. * VS Code support - CGE, as well as many others in the Pascal ecosystem, explicitly support integration with VS Code. --------------------------------------------------------------------- To improve this documentation just edit this page and create a pull request to cge-www repository. Copyright Michalis Kamburelis and Castle Game Engine Contributors. This webpage is also open-source and we welcome pull requests to improve it. We use cookies for analytics. See our privacy policy. [piwik]