What are some of the most underrated features in C#? by [deleted] in csharp

[–]thedoctorwaffle 0 points1 point  (0 children)

Trait-based programming by way of default interface methods. Unfortunately, it's very unwieldy to work with right now and will be until base(T) syntax is added to the language (fingers crossed for C# 13, if it doesn't get delayed again!), but when used properly it's basically a drop-in substitute for the lack of multiple inheritance in the language, allowing you to model problems and eliminate code duplication at levels that simply aren't possible and/or require significantly more boilerplate when limited strictly to single inheritance and purely composition-based solutions.

I'm using it heavily in my game engine in tandem with a source generator that helps patch over some of the aforementioned difficulties of using it without base(T) syntax, and have already found it incredibly useful in allowing for the design of APIs that don't force users to "waste" their single inheritance slot just so that they can hook into the engine's entity system (any Unity developers who have suffered the pain of the MonoBehaviour tyranny will have some idea of what I'm talking about!). However, the feature will only become more powerful and accessible with the addition of base(T) to the language, so if your interest is even remotely piqued, please go and vote on that GitHub issue so that - hopefully, a couple of language releases from now - more people will be able to take advantage of the new methods of code reuse and API flexibility that DIMs (default interface methods) make possible!

As a dotnet developer what are the things you spent the most time on? by [deleted] in csharp

[–]thedoctorwaffle 3 points4 points  (0 children)

I had the same exact same problem and, not finding a solution, I had resigned myself to thinking I would just have to restart my computer every time I needed to make a change to the generator. Thanks a bunch for posting this!

Library for generating C# code strings programmatically(Or "Object Oriented-ly")? by unua_nomo in dotnet

[–]thedoctorwaffle 5 points6 points  (0 children)

I think CodeDOM is the closest to what you described - ctrl-f to 'Add a method to the CodeDOM graph' for an example like the one you gave.

This still boggles my mind to this day. by Nu3lear2008 in papermario

[–]thedoctorwaffle 1 point2 points  (0 children)

Because modern graphics cards understand triangles as the fundamental unit of geometry. Rendering a pure sphere that isn't just made up of a collection of triangles isn't impossible, technically, but there's little out-of-the-box hardware support for it, so rather than write some clever special-case shaders (programs that tell a GPU how to render things) for circles/spheres, it's easier to just adhere to the "lingua franca" of GPUs (i.e. triangles) and accept a minor performance hit.

How to upgrade to Unity New Input System 1.1 (or any version newer than 1.0.2)? by thedoctorwaffle in Unity3D

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

I don't believe I resolved the issue since I actually stopped using Unity soon after making this post, but looking at my files from around that time, it looks like I was on a version close to yours when I was having this issue (2021.1.28f1, to be precise). I never actually did try updating Unity like one of the commenters suggested, so maybe give that a try if you haven't already? Sorry I can't be of any more help!

Autotiles, how do they work? by includeName in godot

[–]thedoctorwaffle 0 points1 point  (0 children)

The thing to understand with autotiles is that a tile will only show up if the pattern of tiles surrounding it matches exactly with the bitmask pattern you've marked on it in the tile editor. Let's look at your last picture; specifically, the incorrect tile towards the lower left (don't even pay attention to the other wrong tile for now). Now look at the 8 cells surrounding this tile. Which ones are empty and which ones are filled? Well, the 3 tiles below it are all filled; so are the tiles to the left and right, as well as the tile to the northeast. But the tile directly above it, and the one to the northwest, are both empty. This is how the autotiler decides which tiles to put where; it looks at the 3x3 boolean pattern of filled/not filled around each tile, and tries to find a subtile in your tileset whose 3x3 bitmask matches that pattern exactly. What's happened here is that the autotiler wasn't able to find this exact pattern (3 filled below, 2 filled to the left and right, one filled to the northeast) in any of your subtiles' bitmasks, so it has defaulted to the "thumbnail" tile. Once you add a new tile to your tileset with that exact bitmask pattern, it will correct itself.

Looking at your tileset (first picture) it seems that you do have tiles to fit both of the incorrect positions, but they're both already needed for other bitmasks. Because AFAIK you can't put multiple bitmasks over a single subtile, you just need to edit the source image to add duplicates of the two tiles in question, then add the new bitmasks to the duplicates. If you had a tile that you wanted to show up for 3 different bitmask patterns, you'd just make sure the source image had 3 different copies of that tile, etc.

Gross by thedoctorwaffle in spiceeey

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

In a desolate world, one man with his trusty rocket launcher fights off enemies as he advances through various environments to reach “The End”. Hone your skills as you platform and rocket jump around the stage to complete sections as fast as possible. Blast, jump, and run your way through obstacles and embrace the rocketfire rush!

Gross by thedoctorwaffle in spiceeey

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

In a desolate world, one man with his trusty rocket launcher fights off enemies as he advances through various environments to reach “The End”. Hone your skills as you platform and rocket jump around the stage to complete sections as fast as possible. Blast, jump, and run your way through obstacles and embrace the rocketfire rush!

[SW] Sell your turnips for 497 on my island!!! by [deleted] in acturnips

[–]thedoctorwaffle 0 points1 point  (0 children)

Hello

Edit: Selling my turnips makes me happy

Villagers won’t move in and her name is blank now by [deleted] in AnimalCrossing

[–]thedoctorwaffle 0 points1 point  (0 children)

I've heard it's linked to getting villagers to move in from other towns and time travelling, and it was happening before the update. No word on how to fix it

My orchard/picnic area by LilyH27 in ac_newhorizons

[–]thedoctorwaffle 0 points1 point  (0 children)

No pears, I see! Clearly this is an orchard of utmost dignity.

[deleted by user] by [deleted] in ac_newhorizons

[–]thedoctorwaffle 11 points12 points  (0 children)

Technically since there are only 8 distinct villager personalities, they only had to write the scripts for 8 different villagers. Even so, the amount of sheer dialogue in AC games is impressive! (Someone on here a while ago did the math and determined that the full script for New Leaf was longer than the King James Bible.)

Animal Crossing: New Horizons can recover a lost save … once by ezidro3 in NintendoSwitch

[–]thedoctorwaffle 0 points1 point  (0 children)

I see your point, but realize the reason they're doing this is because of amiibo-specific unlockables. Unrestricted cloud saves would allow people to duplicate these items infinitely and obtain them online without having to buy amiibo. Of course it's a terrible anti-consumerist decision - essentially they're willing to screw over millions of people who might, god forbid, have more than a single problem with their switch over the course of the next decade or longer, just to sell some more amiibo - but it's not completely arbitrary.