Hacker News .hnnew | past | comments | ask | show | jobs | submit | enbugger's commentslogin

> So, if you want to build games using raylib, why not learn learning or use Swift for that?

Never ever worked for me. Imagine, you actually learned basic Swift and Raylib, now you want "advanced" features in your game like navigation/pathfinding, model loading, ImGui, skeletal animation (those are actually vital for gamedev). You realize that

- Navigation is only ReCast which is pure C++ library,

- ImGui has C++ API as first-class citizen,

- Decent animation with compression is only open-sourced by OzzAnimation which is pure C++ project.

For gamedev interfacing with C is never enough, half of ecosystem is built heavily on C++. Even C++ interop is not enough (see Dlang). Without all those libraries you are bound to make boring 2d platformers.

Same for Zig, Odin, C3 etc.


> Without all those libraries you are bound to make boring 2d platformers.

Perhaps if you're completely devoid of imagination.

It is in fact possible to make video games without deferring to open-source libraries for every single aspect of it.


It's also industry standard to do so. I don't think I've ever seen a team outsource something like pathfinding. Maybe in the Unity/Unreal space, which I'm very unfamiliar with. Dependencies are generally speaking not viewed as a good thing. They become vanishingly rare outside of certain things like physics engines, sound engines, vegetation, etc. And usually higher quality proprietary ones are chosen over OSS (though this is changing with physics engines in particular, mostly thanks to Bullet)

NIH is a cultural pillar. Even scripting layers are relatively split on if they're in-house or not. It's not uncommon to find both an in-house fork of Lua + a few other completely custom scripting engines all serving their own purpose.


Pathfinding middleware has traditionally been a thing though, e.g. apart from the mentioned ReCast (which is the popular free solution) the commercial counterpart was PathEngine (looks like they are even still around: https://pathengine.com/overview/).

If you need to do efficient path finding on random triangle geometry (as opposed to running A* on simple quad or hex grids) it quickly gets tricky.

What has undeniably declined is the traditional "10k US-$ commercial middleware". Today the options are either free and open source (which can be extremely high quality, like Jolt: https://github.com/jrouwe/JoltPhysics) or fully featured engines like Godot, Unity or UE - but little inbetween those "extremes".


> Today the options are either free and open source (which can be extremely high quality, like Jolt: https://github.com/jrouwe/JoltPhysics)

I did mention this was changing in particular with physics engines. That being said, proprietary dependencies still reign supreme in places like audio engines. Something like OpenAL isn't really a replacement for FMOD or Wwise. I know those off-the-shelf engines roll their own replacements, but then they also roll their own pathfinding and navmesh generation as far as I know.


From https://recastnav.com :

> Industry Standard - Recast powers AI navigation features in Unity, Unreal, Godot, O3DE and countless AAA and indie games and engines

I see the industry is of full double standards :)


https://www.mobygames.com/group/9867/middleware-recast/

It's not a terribly long list, it seems, even if it's non-exhaustive.

> I see the industry is of full double standards

Absolutely, and that's why it's so great. No two companies are going to look the same. The culture of the video games industry is a rather unique one that's kept its archipelago syndrome alive against all odds. It'll be a sad day if that ever changes.


> ImGui has C++ API as first-class citizen

Dear ImGui via the C bindings is actually quite nice and not much less convenient than the C++ API (the only notable difference is that the C API has no overloads and default params).

E.g. here's a control panel UI (from the below ozz-animation sample) with the 'Dear Bindings' approach (using a custom 'ig' prefix)):

https://github.com/floooh/sokol-samples/blob/d8429d701eb7a8c...

Dear ImGui is a bit of an outlier for C++ libraries though, since it is essentially a C API wrapped in a namespace.

OzzAnimation is also fairly trivial to wrap in an (abstracted) C API, for instance I use this in some of the sokol-samples:

https://github.com/floooh/sokol-samples/blob/master/libs/ozz...

Implementation: https://github.com/floooh/sokol-samples/blob/master/libs/ozz...

...used in this sample:

https://github.com/floooh/sokol-samples/blob/master/sapp/shd...

...WASM live version:

https://floooh.github.io/sokol-html5/shdfeatures-sapp.html

TL;DR: quite a few C++ libraries out of the game-dev world are actually quite easy to access from C or languages that can talk to C APIs, mainly because the game-dev world typically uses a very 'orthodox' subset of C++ (no or very restricted C++ stdlib usage, no rtti, no exceptions, ideally no smart pointers in the public API).


> They are designed for environments where being clear is very risky

So fake guru courses mostly


We live in time when instead of booking a ticket you have to create a landing page to draw developer’s attention to a quite irritating bug.


>ZERO concern of the current US administration about the welfare of Venezuelans

Neither was doing that with other countries they ransacked. The other was pouring enough propaganda at you so that you think it is somehow different.


Not to mention the Hot Reload which comes out of the box.


GDScript is not very maintainable as the code base grows. It lacks proper refactoring tools (e.g. the ones from Jetbrains Rider), static type checking, flexible object system and many 3rd party libraries which might be needed


My main point is: if GDScript isn't good enough, go straight to c++ directly in the Engine.

I won't even get into how big of projects I've written in GDScript successfully.


I don't want to do manual memory management and pointer handling

I don't want to have any sort of undefined behavior

I want to have quick code reload button in the editor

I want to still rely of the engine official documentation with examples like it is with GDScript and C#


You likely won't need to do manual memory management nor think about undefined behavior. If your writing basic c++ to handle the simulation in a game, it's going to be pretty orthodox and these problems likely won't manifest.

The purpose of recommending c++ here is:

If GDScript is too slow, reach directly for C++.

I'm specifically recommending GDScript over C# for ease of use and c++ over C# for performance.


The author "teaches workshops on AI development for engineering teams". This is nothing but a selling post for companies. I don't know what to discuss here honestly, this is more primitive bait than an average video preview picture on YouTube.


If only Lisp had better presense in modern code editors. Emacs is not enough, especially on Windows where it is super slow. I think this is what actually stops newcomers to start with Lisp and not Python


> I think this is what actually stops newcomers to start with Lisp and not Python

What stops newcomers is knee-jerk reactions about the (lack of) syntax, it's scary to see something that doesn't look like Algol, because everyone who does mainstream programming uses Algol-like languages.

Introduce lisp to anyone who knows programming since earlier, and 99% of them will have a adverse reaction to s-expressions, before they understand what's going on. Once they understand, it makes a lot of sense obviously, but not everyone even has that kind of open mindset where they could understand if they wanted to.


Symbolic expression is one thing, I would personally find it rather cool to have more first class expression as building block everywhere. However I'm not found of using explicit parentheses all around. Even mandatory curly/square brackets are superfluous with a properly defined syntax ruleset.


My crackpot theory is that what stops newcomers is how unergonomic "(" and ")" are to type on typical keyboards. If mainstream lisp dialects used square brackets instead, we'd all be programming in it!


> If mainstream lisp dialects used square brackets instead, we'd all be programming in it!

You've almost convinced/nerd-sniped me to write a(nother) new lisp where we'll be using brackets for forms and lists and no parenthesis in sight. It's a wild theory.


It's just a reader macro, parse out quotes, other reader macros, then replace [ -> (, ] -> ) in the rest and throw into (read).


I find lisp to be a very non ergonomic language and am happy that python is the default.


Can you quantify that?


Let's just say that the weights of opening and closing parentheses do not cancel out.


I've had way more issues with proper indentation in Python and YAML than I have with parenthesis in lisp. Meaningful whitespace is about the worst idea I've seen in a programming language.


You would need to show that, including the parens, the average Lisp program requires more tokens than Python.

I'm not sure that's true. Because Lisp has a lot of facilities for writing more concise code that are difficult to achieve without the parens.


Is there any good guide on how to solve the issue which OP solves?


I was reading this the other day when I came across this feature because I’m stacking PRs recently which I don’t usually do

https://andrewlock.net/working-with-stacked-branches-in-git-...

Another commenter posted this link which was a bit more succinct

https://blog.hot-coffee.dev/en/blog/git_update_refs/

There isn’t much to it though, you just go to the branch and run git rebase with the update refs flag.


You don’t really need docs as --update-refs does what the OP does automatically instead of manually like the OP does.


How? I tried recreating the scenario from the article (the section "First rebase –onto") and ran the first rebase with "--update-refs":

  $ git checkout feature-1
  $ git rebase --update-refs main
  Successfully rebased and updated refs/heads/feature-1.
  Updated the following refs with --update-refs:
   refs/heads/feature-2-base
But all it did was update feature-2-base. It still left feature-2 pointing to the old commits. So I guess it automates "git branch -f feature-2-base feature-1" (step 3), but it doesn't seem to automate "git rebase --onto feature-1 feature-2-base feature-2" (step 2).

Presumably I'm doing something wrong?


Yeah, you need to rebase the tip of the feature branch stack. git will then update all the refs that point to ancestor commits that are moved. So in this case

    $ git rebase --update-refs main feature-2


Thanks! Yup, that does the trick.


First, you don't need the extra "marker" commit. This flag obviates the entire workflow.

Second, you run it on the outermost branch: feature 2. It updates all refs in the chain.


If I'm fine with my code being scanned by AI and Grok presence, is there any non-political reason to migrate from Github?


https://sfconservancy.org/GiveUpGitHub/

https://ziglang.org/news/migrating-from-github-to-codeberg/ for some more fresh ones.

I kind of wish there was a better collection of these.


They haven't been very good at keeping their site up lately, but how much that bothers you is fort you to decide.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: