Live data from Hacker News

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

castle-engine.io

101–103 of 103 posts

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

#101

I took a look at the code, since I was curious far a large Pascal codebase looked like. I haven’t seen a substantial amount of Pascal code since about 2001. One thing I noticed was the file names, I can’t say I’m a fan of prefixing every single source file with “castle”, it makes it much harder to see what the file is about and makes them all look the same. I can’t comment on the actual code, since I’ve never written…

This is no different from yacc files being prefix by "yy". It makes it easier to spot which files are castle files and avoids collisions with files/units from other libraries. Meaningless nitpick.

But if you open the source directory, “every” file is a castle file.

I already know which files are castle files because they’re in the castle directory. It’s redundant information and it makes it hard to browse the files, eg I now need to scroll my file browser in my IDE to the right (so can no longer see directory names), Dane for tab labels snd file path breadcrumbs (on GitHub and in IDE), and on GitHub at least on mobile which is how I viewed it, it cuts the filename off after a certain length.

So I disagree that it’s a meaningless nitpick, it directly affects how easily I can navigate and read the file names. Just because yacc does it too doesn’t make it good (but at least in yacc’s case it’s not redundant information to know they are generated files, unless you put them in a yacc directory)

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

#102

Earlier quoted context omitted.

Have to agree with the OP here. There may be a handful of yacc files in a large project, so prefixing them with "yy" is convenient to locate them quickly - though I'd still prefer a dedicated subdirectory. Every file in this project is a "castle file", so preceding every name with "castle" is pretty useless and hinders readability and navigation. If it's not part of castle, it shouldn't be checked into the repo.

And what happens when these castle_xx files have to be combined with files from other libraries? This goes a long way into avoid namespace conflicts.

Do they need that? If not you’re using a hypothetical situation that likely will never occur to excuse a bad decision (see YAGNI). In my 24 years of programming, I’ve never needed to do this in any way where this naming would have helped me (a very occasional single prefixed file sure, but an entire project, never).

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

#103
post #83

Earlier quoted context omitted.

MM even opensourced it https://github.com/soldat/soldat

In the meantime the repository moved to: https://github.com/opensoldat/opensoldat After MM sold the game to someone else I felt like it would be better to make sure the name is different as the new owner had different plans and did not want to continue releasing the source code. Later someone unknown hijacked the original url and copied an outdated version of the repository (you can see the mention of OpenSoldat.)

Thx i didnt know that. Was actually wondering about why 2.
Post reply on HN