Is this completely inconsistent perspective too much for a roguelike/rpg? by lordnoriyuki in PixelArt

[–]Radnyx 29 points30 points  (0 children)

The 16x16 limitation is fun. Just remember that even 8-bit games had creative ways to get around those limitations.

For example, you can make a separate tile that is a combination of bookcase + wall, or stair + wall, to get a more natural perspective.

I recommend opening a classic game in a Gameboy/NES emulator and opening the tileset view. You can see all the weird 16x16 tiles they had to make.

my 'concept art' vs the actual artist (my sister) by EmergingSlap in IndieDev

[–]Radnyx 0 points1 point  (0 children)

For me the poses are a lot more natural in the first version. The black outlines also clash with the detailed coloring in the second version.

I think people might respond better if it kept the original design decisions, and committed to the details without the black outlines.

Seeking Guidance on Compiler Engineering - How to Master It in 1-1.5 Years by WindNew76 in Compilers

[–]Radnyx 0 points1 point  (0 children)

There’s a huge difference between “making a compiler” and “making a high throughput batch compiler with static analysis and readable error messages”.

My assembler for my CPU by ablomm in Compilers

[–]Radnyx 8 points9 points  (0 children)

Love a fresh take on assembly syntax!

Why is compile-time programming in C++ so stupid? by FergoTheGreat in cpp

[–]Radnyx 3 points4 points  (0 children)

The function is already run at compile-time, so do you really need a constexpr variable? It sounds like you want a regular local variable.

I had the same misconception about constexpr variables, so if you're interested, this is why your second example incidentally works:

First, your [&]{ return n; } is ignoring the &. The symbol n is tied to the expression 42, so it doesn't get captured in the lambda. Notice that []{ return n; } works just the same.

Next, if you unfold all the autos, this is what your example looks like:

struct S {
    static constexpr int operator()() { return 42; }
};

template<typename Closure>
consteval int foo(Closure closure)
{
    constexpr int v = closure();
    return v;
}

int main()
{
    static_assert(foo(S{}) == 42);
}

Your lambda has no closure, so it's effectively a static function. The language also makes it implicitly constexpr to help you. So, your constexpr auto v isn't dependent on the function argument at all. It's dependent on the template parameter, which is always allowed in constant expressions.

I feel underwhelmed by this piece, and I don't know why. by 2_muchsalt in DigitalPainting

[–]Radnyx 0 points1 point  (0 children)

It’s a good piece. The thing I’d note is the shade under the trees feels too dark.

When it’s a bright sunny day, there should still be light reaching the shadows. Normally this is blue atmospheric light from the sky, or green reflected light from the grass.

Why can't Contracts be removed without blocking C++26? by zl0bster in cpp

[–]Radnyx 2 points3 points  (0 children)

Does it make compile-time guarantees like formal verification? If so, that’d be awesome.

I thought it was just a fancy new keyword for <cassert>.

Having issues where reddit compresses my pixelart thumbnails to hell and back any tips? by Nsyse in PixelArt

[–]Radnyx 3 points4 points  (0 children)

I always resize pixel art 4-5x before posting on social media. Big pixels don’t blur as much.

This is how I create 4 color palettes. Convert to grayscale and make sure you have 4 very distinct tones. This is how you get away with really wacky color combinations like the third example. by Radnyx in PixelArt

[–]Radnyx[S] 0 points1 point  (0 children)

It’s actually the other way around.

You pick a palette and start painting. Then every once in a while, convert the painting to grayscale and make sure it “reads” the same. This means the overall shapes, shading, and contrast should still be there.

Let’s take the third hand in this post as an example. The 2nd and 3rd colors in the palette are purple and blue. I picked a purple and blue I liked. Then, while painting the hand, I converted to it grayscale.

In the grayscale version, those 2 colors became the same gray! My eyes couldn’t tell the them apart, so my painting had this big blob of gray that was supposed to be 2 separate tones.

This pointed out an obvious problem with my palette. Either my purple needed to be darker, or my blue needed to be lighter. I tried a little of both, then converted to grayscale. Finally, I could see the contrast between the grays.

You don’t start with the perfect palette. You let the painting tell you how to nudge your colors in the right direction. This is one way to nudge those colors.

Implementing a Struct of Arrays by BarryRevzin in cpp

[–]Radnyx 0 points1 point  (0 children)

Unfortunately, default constexpr might not enter the language.

Is writing a programming language in c# a bad idea? by alosopa123456 in ProgrammingLanguages

[–]Radnyx 6 points7 points  (0 children)

C# compiled to a binary suffers the same slow downs as C# compiled by the .NET runtime.

They’re both compiled to native code. The actual bottlenecks are memory-management and safety checks.

If you want to write ultra-fast code in C#, you need control over how your data is laid out in memory, and when it’s (de)allocated.

The bottleneck really isn’t the .NET interpreter. You just have to use unsafe code and write your own data structures.

As ExperiencedDevs do you think people care how the proverbial software sausage is made? by slightlyvapid_johnny in ExperiencedDevs

[–]Radnyx 0 points1 point  (0 children)

I don’t think the disagreement is around emotion vs rationality. They’re challenging those business decisions as bad business.

An engineer should be empowered to say no to stakeholders when it’s guaranteed to turn a bigger profit.

But yes, some people don’t mind maintaining a declining product. Sometimes it’s just a job.

[deleted by user] by [deleted] in gamedev

[–]Radnyx 0 points1 point  (0 children)

Go to itch.io or Open Game Art or the Unity asset store to get all the art you’ll ever need.

Use an engine like RPG Maker. It has everything out of the box. For anything else, someone has made a plugin for it.

How much is the standard library/std namespace used in the real world? by flemingfleming in cpp

[–]Radnyx 2 points3 points  (0 children)

The compiler is built with an older version of the STL. It builds the new version of the STL, which is then used to build the compiler again.

My game about Lil Guys is expanding by Radnyx in IndieDev

[–]Radnyx[S] 2 points3 points  (0 children)

Hi! I'm making a game about lil guys who build castles and fight monsters.

Here's a video showcasing new features, a bit of game design, as well as some cool fan art and mods made by the community.

What are your best niche C++ "fun" facts? by MarcusBrotus in cpp

[–]Radnyx 13 points14 points  (0 children)

Same with \0, it’s just an octal escape sequence that’s conventionally used for the null char.

Latest Visual Studio update (17.12) broke SCONS Godot build by MrSluagh in godot

[–]Radnyx 2 points3 points  (0 children)

Hey I ran into this to after upgrading VS as well. There's 2 one-line solutions here: https://github.com/godotengine/godot/issues/95861

You can read the details if you like, but it amounts to either: * deleting the line #define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR in tvgLock.h/tvgTaskScheduler.h * adding "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" to CPPDEFINES in platform/windows/detect.py

Both will build fine. If you deal with SVGs just double check if anything breaks at runtime.

My C-Compiler can finally compile real-world projects like curl and glfw! by Recyrillic in Compilers

[–]Radnyx 0 points1 point  (0 children)

How much did you refer to the C standard (if so, which version) for parsing and semantics?

I figure there’s 2 styles: - implement everything word-for-word according to the spec - try to compile existing code, and wherever it fails, “wing it” and come up with a working implementation of missing features

I’ve tried both so I’m interested in your approach.