• tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    It’s amazing what modern game engine’s can render. That looks almost real, kudos to the creators

  • milicent_bystandr@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    What if we didn’t want more sea, just spikier? C#

    I look out acroth the thea, and thee what I can thee. I can’t pronounth that thtupid language; I’ll write in lithp.

    Ocean + traversing a desert => Ocaml?

    I improved the C! It is greater! More potent! But what is this? I look at at my poor boat, upon which I traverse the waves of the C++ 7; now it is degraded. Now its beautiful metal hull has oxidised. Oh, the dangers of the C. …Wait, that gives me an idea…

  • _____@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    I love C++ I love C++ I love C++ I love C++

    >does big something with C++

    I hate C++ I hate C++ I hate C++ I hate C++

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 months ago

      Honestly that’s most things in life.

      The more complex your project, the more likely you are to run into the rough patches or quirks of whatever it is you’re working with.

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 months ago

    C++ is fiiiiine. Just use the modern variant of the language, don’t bother with hand-optimizing your memory allocators, and generally avoid anything involving pointer arithmetics. So, basically, use it like you would use Python.

      • zik@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        3 months ago

        C++ can do a lot of things but one thing it can’t do is perform as poorly as python.

      • thebestaquaman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        This is a very “yes but still no” thing in my experience. Typically, I find that if I write “naive” C++ code, where I make no effort to optimise anything, I’ll outperform python code that I’ve spent time optimising by a factor of 10-30 (given that the code is reasonably complex, this obviously isn’t true for a simple matrix-multiplication where you can use numpy). If I spend some time on optimisation, I’ll typically be outperforming python by a factor of 50+.

        In the end, I’ve found it’s mostly about what kind of data structures you’re working with, and how you’re passing them around. If you’re primarily working with arrays of some sort and doing simple math with them, using some numpy and scipy magic can get you speeds that will beat naive C++ code. On the other hand, when you have custom data structures that you want to avoid unnecessarily copying, just rewriting the exact same code in C++ and passing things by reference can give you massive speedups.

        When I choose C++ over python, it’s not only because of speed. It’s also because I want a more explicitly typed language (which is easier to maintain), overloaded functions, and to actually know the memory layout of what I’m working with to some degree.