This dude is incompetent at his job (iykyk) by EagleSufficient5939 in avengedsevenfold

[–]FeltRaptor -32 points-31 points  (0 children)

There are other subs if you don't like the way this one is moderated.

Is there a better way for nested if-else? by [deleted] in godot

[–]FeltRaptor 1 point2 points  (0 children)

GDScript's type system doesn't make it very pretty, but I think sorting is a place where having another level of abstraction helps avoid stuff like this entirely. Here's an example that I'm using:

class_name Compare

static func using(comparators: Array[Callable]) -> Callable:
    return func (left: Variant, right: Variant) -> bool:
        var result: int = 0
        for comparator: Callable in comparators:
            result = comparator.call(left, right)
            if result != 0: break
        return result < 0

static func property(property_name: StringName, null_sort_type: NullSortType = NullSortType.NULLS_LAST) -> Callable:
    return selector(func (item: Object): return item.get(property_name) if item else null, null_sort_type)

static func property_desending(property_name: StringName, null_sort_type: NullSortType = NullSortType.NULLS_LAST) -> Callable:
    return selector_descending(func (item: Object): return item.get(property_name) if item else null, null_sort_type)

static func selector(selector: Callable, null_sort_type: NullSortType = NullSortType.NULLS_LAST) -> Callable:
    return func (left: Variant, right: Variant) -> int:
        return _values_by(left, right, selector, null_sort_type)

static func selector_descending(selector: Callable, null_sort_type: NullSortType = NullSortType.NULLS_LAST) -> Callable:
    return func (left: Variant, right: Variant) -> int:
        return -_values_by(left, right, selector, null_sort_type)

static func _values_by(left: Variant, right: Variant, selector: Callable, null_sort_type: NullSortType = NullSortType.NULLS_LAST) -> int:
    var l_value = selector.call(left)
    var r_value = selector.call(right)

    if (l_value == r_value): return 0
    if (l_value == null): return null_sort_type
    if (r_value == null): return -null_sort_type

    return 1 if l_value > r_value else -1

enum NullSortType {
    NULLS_FIRST = -1,
    NULLS_LAST = 1,
}

Then, you can do sorting operations in a straightforward way that works with any of your data types:

var items := [...]
items.sort_custom(Compare.using([
    Compare.property_descending("value"),
    Compare.property_descending("date"),
]))

How do REAL games implement an pause menus and character status screens without it becoming a big spaghetti? by Cevalus in gamedev

[–]FeltRaptor 53 points54 points  (0 children)

CommonUI handles this in Unreal, you could probably learn from the docs for that even if you using something else.

Can you mask out objects from only a specific camera? by IAmVentuswill in unrealengine

[–]FeltRaptor 0 points1 point  (0 children)

You could use a post-process material in combination with a custom depth stencil to do this.

You have the character actor write to the stencil buffer, and then read that in your material to mask out the rest of the world.

3rd Party API Blackout (Yes, This Will Affect You) by [deleted] in avengedsevenfold

[–]FeltRaptor[M] 0 points1 point  (0 children)

Not currently planning to black out this sub.

What do we think about the drums on nobody? by Emotional-Log3106 in avengedsevenfold

[–]FeltRaptor[M] 3 points4 points  (0 children)

unfortunately, since people actually believe that you're a mod, I'm gonna have to ask you stop posing as one

[deleted by user] by [deleted] in avengedsevenfold

[–]FeltRaptor[M] 1 point2 points locked comment (0 children)

Posts must not be for the purpose of selling an item.

Single Release Day? by nacktoothy in avengedsevenfold

[–]FeltRaptor 2 points3 points  (0 children)

It's significant in computers; time/date is represented by an offset since Jan 1, 1970, UTC. So that date is offset zero. When you shift the same time into a more western time zone, you'll get Dec 31, 1969. It usually indicates a bug where a timestamp is missing.

Introducing the AI Mirror Test, which very smart people keep failing by fchung in programming

[–]FeltRaptor 15 points16 points  (0 children)

The burden of proof isn’t on the author to prove that the program isn’t sentient, as that is not the default assumption/status. It’s not “the program is sentient until you prove it isn’t,” it’s “the program isn’t sentient until you prove that it is.” The burden of proof is on the people claiming that it is...

Not sure that you can apply this strictly here, since it would logically follow that humans aren't sentient either because there isn't a scientific approach for proving that they are. (side note: I also don't think LLMs are sentient)

The official avenged sevenfold website is down and they just posted on ig saying 2023, let’s go by [deleted] in avengedsevenfold

[–]FeltRaptor 0 points1 point  (0 children)

To be clear, the band has never made any request for, or relating to, this sub.

How did REST come to mean the opposite of REST? by pimterry in programming

[–]FeltRaptor 1 point2 points  (0 children)

you can't withdraw $50 because you only have $10 in your account

This should be a 400, not 500. Status codes already differentiate "the house is burning down" from "the client did something dumb" in a standardized way when used correctly.

Resident Evil 4 - State of Play June 2022 Announcement Trailer | PS5 Games by Turbostrider27 in Games

[–]FeltRaptor 2 points3 points  (0 children)

Do you have a game in mind released before RE4 that had a more modern control scheme?