Lurker News

Comments (262) 55 threads

Earlier comments
ashdev#
This is super impressive considering it's written in C. Well done and keep it up.
djoldman3 replies#
Quick question: all the goto fail's where

  fail:
    return false;

This is just to perhaps change return false to something else in the future, correct? Else why not just return false everywhere instead of goto fail
namdnay#
I think it’s to cleanly show when he is using his pseudo-exception handling system. So goto fail would be “throw”
alksjdalkj#
Not sure if this is the author's reason but I find it helpful to have a single return point from functions. Much easier to follow code paths.

You'll see this in some places in Linux's source too.

slim#
Not op, but that's obviously in case you need to do something more complicated than returning false later. It's good practice
optymizer#
As someone who's working on his own game engine in C, I applaud you for releasing an engine, a game and with such great code quality!

Thank you for open sourcing it as well. I've already learnt a thing or two by skimming the code.

hgs3#
Nice project! I too am working on my own game engine in C. The language gets a reputation for being inaccessible to mere mortals, but I find it refreshingly simple.

Load more comments