Live data from Hacker News

Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

castle-engine.io

91–100 of 103 posts

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#91
It's really a pity how badly the Delphi product was managed by Borland/Embarcadero.

Object Pascal is a great language. These days it produces native code for pretty much all platforms out there. The binaries created are tiny, and the speed is high - close to what C will give you - meaning that typically the code will run between 100 to 10000 times faster than comparable Python code.

When it comes to Castle Engine, it's a gigantic project, making it extremely easy to create games and 3D applications in a RAD kind of way. And unlike other huge Pascal frameworks, it's not a legacy product, but very actively developed. I have HUGE respect for the developers.

A comparable gigantic impressive project is Mormot, and ORM/SOA/MVC framework which is based on extremely optimized code.

Building a Server application with Object Pascal and Mormot is easy to do, and where using NodeJS might be able to handle 500 requests per second, with pascal code you will be in the areas of 10000+.

And this means that while with other languages you might need to run dozens of servers to handle the load, your Object Pascal based server code instead would easily run on a single server. So, using that language can give you massive cost savings.

A lot of people only remember Object Pascal as a teaching language. But the language has evolved, and still has features other languages are lacking, most importantly RTTI (aka reflection). There is only one area where the language isn't up to date, and that is having Multithreading/coroutines integrated into the language itself like it's done in Go.

And finally: I can still compile and run code I have written 40 (!) years ago. Within those 40 years tons of languages have come and gone out of fashion. Pascal is still here.

Back to Castle Engine: Even if you are not familiar with the Object Pascal language, I can highly recommend to try out their visual editor. It's just amazing.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#92
post #5

Ok I’ve got a hacker challenge for the more creatively-inclined: if I wanted to stretch “cross platform” to web (and thus webVR?), how might I wrap/integrate/emulate/polyfill/whatever this? EDIT: after a quick search the answer is a resounding “you can do it, but yikes.” Multiple people reference custom compilers , which I’m guessing are beyond my reach… https://news.ycombinator.com/item?id=12029566 EDIT 2: wow nvm i…

As for our mention of XBox on https://castle-engine.io/features : the point I wanted to say there was that we have "development" version of Xbox, as provided by Microsoft. Though it doesn't matter much nowadays, since retail Xbox versions can also be used for development, from what I read. I edited that statement to say this """ XBox (we have the hardware — even devkit, though "developer mode" can also be activated o…

Thanks for the detailed response! That sounds amazing. I’ll try to keep track of this to eventually try it out, I’ve been chafing at the bounds of Three.js and I think the whole web game ecosystem could use a method/tool infusion from mainstream game development.

And gotcha on the Xboxes, sorry if that was rude - clearly HN thought it was! I had no idea that there were special developer Xboxes. And in general was expecting a much less organized operation lol, you seem very on top of your game

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#93
post #5

Ok I’ve got a hacker challenge for the more creatively-inclined: if I wanted to stretch “cross platform” to web (and thus webVR?), how might I wrap/integrate/emulate/polyfill/whatever this? EDIT: after a quick search the answer is a resounding “you can do it, but yikes.” Multiple people reference custom compilers , which I’m guessing are beyond my reach… https://news.ycombinator.com/item?id=12029566 EDIT 2: wow nvm i…

> Love the casual “we own at least one xbox” humble brag. Maybe it's not a humblebrag, but showing they're taking cross-platform seriously. I don't own an Xbox for example, and if I worked on something like this, buying one would be for the specific reason of making sure the project worked. I'd communicate that.

I guess my observation was more along the lines of “they’re game devs, they almost definitely have at least a few Xboxes between them”. But of course a matter of rhetorical taste, and I think you’re in the majority

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#94
post #49

Earlier quoted context omitted.

Most probably you already learnt the alphabet in the past, and there is 0 cognitive load for your brain to parse it. Unless you come from a language using another alphabet, but then unfortunately you need to bow to Latin alphabet rule over programming languages in any case.

Oh, really? if ((input = 'y') or (input = 'Y')) then begin writeln ('blah blah'); end else if ((input = 'n') or (input = 'N')) then begin writeln ('blah'); end else begin writeln ('Input invalid!'); end; if input == 'y' || input = 'Y' { writeln ('blah blah'); } else if input = 'n' || input = 'N' { writeln ('blah'); } else { writeln ('Input invalid!'); } If you find Pascal easier to read, I would guess you have very s…

Well, other simpler options are:

  if (input in ['Y', 'y']) then
    WriteLn('blah blah')
  else if (input in ['N', 'n']) then
    WriteLn('blah')
  else
    WriteLn('Input invalid');
And:

  if (LowerCase(input) = 'y') then
    WriteLn('blah blah')
  else if (LowerCase(input) = 'n') then
    WriteLn('blah')
  else
    WriteLn('Input invalid');

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#95

Cannot remember the last time I used a programming language in the Pascal family. Our programming course we had to use Delphi. This was college back in 2001. I purchased a copy of Delphi 5 (my college has version 4) so likely tried things for a year or two afterwards. I doubt I touched Delphi after 2005. In College we had to create a Stock Control program. It was an IT course so most people struggled as programming w…

We're probably in the same age group. I used to write simple games and graphics apps in Turbo Pascal in high school. Later on I used Delphi to write "business apps". To me, there isn't that much difference between Pascal and C in terms of language design. I used to translate my Pascal code to C by replacing begin/end with curly braces, moving interface declarations to header files, replacing well named functions to c…

I find "modern" development to be bloat. By modern I refer to web development as smart device (ie Android, IOS, etc)

I will always have a soft spot for C but try to find the right replacemenet.

Looking at Odin at the moment which I do like. It is taking inspiration from a number of languages, include C and Pascal.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#96

Cannot remember the last time I used a programming language in the Pascal family. Our programming course we had to use Delphi. This was college back in 2001. I purchased a copy of Delphi 5 (my college has version 4) so likely tried things for a year or two afterwards. I doubt I touched Delphi after 2005. In College we had to create a Stock Control program. It was an IT course so most people struggled as programming w…

> Seems like an interesting project but I just dont have interet using Pascal so would be a deal breaker for me. What are the languages you would prefer to use now?

Hi.

As mentioned, I have not touched Pascal/Delphi for around 20 years now. I dont have interest (re)learning this to use a 3D engine.

My reasoning is mostly due to popularity or, more specifically, job security.

Newer languages preferably, or keeping it C (atleast)

As mentioned in another reply above - I am learning Odin at the moment.

These are just my views. Like any view, can be scrutinised by anyone. We all have our preferences. I mean no ill towards Pascal in general.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#97
post #38

Earlier quoted context omitted.

Words can be helpful for people who don't like symbols? C is very terse, Pascal verbose. It's like C vs Python. Single-character symbols can be hard to parse for some people in the same way words are for you. A good IDE / code structure will make the structure and code easy to differentiate anyway.

I see no difference in learning symbols in order to read source code and learning alphabet in order to read words/sentences.

This is like comparing Latin alphabet with Egyptian pictograms or Chinese hieroglyphs. The time has proven multiple times that using words is easier for humans than using symbols.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#98

Earlier quoted context omitted.

In my experience, Python, C and JavaScript* all have this property; whereas I have to relearn Pascal, Haskell, sh and (to an extent) Rust every time I go away from them for a bit. I think this is more a property of you or I than of particular languages. *: excluding `for (… of …)` and `for (… in …)` – I can never remember which is which. `for (… of …)` is the one you can use with Arrays and other iterables.

> *: excluding `for (… of …)` and `for (… in …)` There's more that will trip you up in JS if you leave it for too long. Off the top of my head: 1. Which function definition (`function` or `=>`) do I need to use in order to make the `this` keyword point at the correct object in an event handler/anonymous function/foreach parameter? 2. I see code with both `!==` and `!=` - what is the significance of using both? 3. Lon…

I just tried make a ".any" generic function for arrays, and by god :

Most languages : myArray.any((e) => true);

Delphi : AClass.any(myArray, function (e) : Boolean begin Exit(True); end);

The readability is through the roof, lol.

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#99
post #71
post #64

Earlier quoted context omitted.

Unless you’re testing if something is null or undefined, in which case a single “x != null” handles it.

Sure. I usually just use !x for that.

That doesn't test if it's null or undefined, that just tests if it's not falsy.

x = 0; !x → true

y = ""; !y → true

z = null; !z → true

Re: Castle Engine – Free open-source cross-platform 3D/2D game engine using Pascal

#100
post #54

Earlier quoted context omitted.

Agree! I also find Pascal very soothing to write. Yes it's a little more verbose than C but it makes you think ahead and stay organized.

Many people have the same experience writing Rust. And they have plenty of time to relax while the program compiles.

Relevant Xkcd: https://xkcd.com/303/
Post reply on HN