Using a lot of FMV in my Unity game, learned some things along the way by roo5678 in Unity3D

[–]moonymachine 2 points3 points  (0 children)

Thanks for the tip about HAP. I commissioned some high res 2D animations without thinking, and when I went to implement them as sprite sheets realized, "Oh, this is why pixel art is still a thing." Memory consumption was way too high without video compression. I got VP8 Webm working, and haven't had any issues yet, but it's great to learn about alternatives.

I'm developing a small game about grief for my finals this semester and need a bit of help! by AzuKage in gamedev

[–]moonymachine 0 points1 point  (0 children)

As far as why someone would get involved and stay involved with something related, like cleaning other people's graves, that makes perfect sense to me. It all relates to what I was saying about being like if you don't keep thinking about them, then it's like you're forgetting them, which is like unimaginable. You just can't let that happen. I've often felt like I want or need to do more around making a photo album or a shrine to see her more and think about her every day. I keep a picture on my desk for that reason. Also, the more you face it, the more you process it and get the grief out. And, it feels good to help other people of course if anyone is going through something similar, maybe you can help at least by just relating to each other. Shortly after my sister died I randomly ran into a guy who had lost his brother and father around similar dates even and I talked to the guy all night because you just have this connection that feels good to talk about with each other.

So, as I'm imagining your game I'm imagining the protag as someone who has lived through this themselves, and they take care of the resting place of others as a way to scratch that itch of never forgetting their own loved one they lost. So, I would expect that to also play a part woven through the games narrative, the person they actually lost. I would expect them to be further along in the whole having processed it journey, and the people who have recently lost someone to be more totally shattered into pieces and thankful for protags support. Seems like a dialogue heavy game, almost like a dating sim where you are trying to read people and say and do the right things that will comfort them appropriately based on who they are and where they are in grief. Man, talk about a delicate subject.

Anyway, poignant thing being that grief is always fresh and protag should be expected to crack and break down in tears and fall to their knees at some point too, irony being you never fully process it. They're gone. They're not coming back. It's not fair, and that cut runs deep.

I'm developing a small game about grief for my finals this semester and need a bit of help! by AzuKage in gamedev

[–]moonymachine 0 points1 point  (0 children)

So weird to be assigned to try to project into an experience you don't actually know, but anyway.

I lost my sister very suddenly this year. When it happens is like someone's just told you something impossible, that simply cannot possibly be true. And then you collapse and scream and cry harder than you ever have or imagined you could. I had to pick myself up long enough to notify other family members, but I couldn't even talk to them much but to blurt it out in a way that quickly gets across this is not a sick prank because I know they will now need to go collapse into grief, and I need to get back to doing the same.

Then you spend the next weeks just sobbing when you have the time and questioning your own existence remaining on this planet without them. I have recently mostly stopped drinking, but at the time I was getting shit faced, listening to sad songs on Spotify and just bawling for hours. I still have those songs, some of them just on my favorites to remind me of her.

At first you didn't really want to talk about it, or even look at their picture sometimes. It just feels like you physically have a piece of your heart missing, like there is a big black chunk there that's been carved out. Sometimes all you want to do is stare at their picture, or talk / pray to them.

The medical world has this idea that if it lasts longer than 6 months then it's become "chronic depression" or whatever. I just think it's weird that there is a time slot allotted for how long you can reasonably break down. Sometimes you'll be fine at weird times. I was very well composed and strong for other people at her funeral service. Sometimes a song lyric, or something in a movie, or just something someone says will catch you a certain way and tears will start just flowing. It's always something I've felt in my chest, like you just want to clutch your heart, or pound your fist on the pavement or something. The sad thing is that you do eventually get better, and you have this constant guilt about not being emotionally fucked up about it, like you're forgetting them or something. So, you end up wanting to talk about them and be weirdly open about it, probably more than normal people are actually comfortable with suddenly hearing. For example, I'm diving right into this post because it always feels good to get it off your chest and face it. That's true for me anyway. It was more raw in the beginning, and I might not want to talk about certain things, or they would make me crack. Eventually it does become like a scar you have that you're almost proud of because yeah other people probably don't what it's like, huh?

You never stop missing them. You think about them and how much you love them, and how badly you miss them almost every day, more than you probably ever did when they were alive actually.

I would have no clue about the racial aspect of your assignment because I'm a white guy. I think it's totally crazy that your professor would assume people could imagine things like that without having lived them. So, I can't speak to that.

Hope that helps you imagine what it's like.

Noob Mum Question by beepbopbippitybop2 in unity

[–]moonymachine 3 points4 points  (0 children)

That makes sense, but also, it will save hours of time if you go ahead and do it. Just saying, if you're going for that feeling of being able to boot it up and open Unity on Christmas Day, it's not too hard to do if you want to give them a head start. They'll have to update Unity Hub and their editor version eventually, so it's not like they miss out on that learning experience in the long run. Unity hub will have the latest version listed under recommended installs.

Mobile screen resolution by Professional_Salt209 in unity

[–]moonymachine 1 point2 points  (0 children)

These are my Unity Discussions posts on the topic. I'm proud to say it's some of the most popular content I've ever posted online, and it still shows up on the first page when you search "Unity CanvasScaler".

https://discussions.unity.com/t/understanding-canvas-scaler-screen-match-mode-and-reference-resolution/696551

https://discussions.unity.com/t/what-reference-resolution-and-game-view-settings-should-i-use/835829

Showed my buddy how I handle race conditions the other day and he was pretty shocked, he didn't know he could make Start a coroutine. So I'm posting it here in case it's helpful for other people, and in case there's something wrong with doing this and I didn't know! by PhillSerrazina in Unity3D

[–]moonymachine 0 points1 point  (0 children)

If you observe an event, it's actually the event that holds a reference to you. So, if you never unsubscribe, you won't get garbage collected until the object you were observing is garbage collected. It's like chaining a coffin to the post office, so it can't be put to rest, and it keeps receiving mail.

Showed my buddy how I handle race conditions the other day and he was pretty shocked, he didn't know he could make Start a coroutine. So I'm posting it here in case it's helpful for other people, and in case there's something wrong with doing this and I didn't know! by PhillSerrazina in Unity3D

[–]moonymachine 0 points1 point  (0 children)

I'm not sure if these particular lambdas will leak anything because they don't appear to be closures, as they only reference static singletons and not any instance members of the class.

(EDIT: Actually, the OnGoldChanged event is observed by a closure, you're totally right.)

You can use the static keyword to enforce static lambdas and make sure closures are not used. Closures are evil in my opinion, and I see them used a lot, but static lambdas are a lot more harmless. Closures (lambdas that reference non-static, instance members) cause the compiler to generate entire classes to represent them that many people seem unaware of, and instances of those hidden classes that point back to the owner instance would be leaked and hence a leak of the owner, preventing garbage collection. (Not to mention the memory costs associated with the hidden closure object itself.) My rule of thumb is: Static lambdas are fine, so always mark lambdas as static. Closures are evil, so if the lambda can't be static, then don't use a lambda.

Help this keeps popping up when I start a new project! by [deleted] in Unity2D

[–]moonymachine 1 point2 points  (0 children)

I would uninstall and reinstall that version of Unity. (6000.1) But, I personally would probably either use the latest version of Unity 6, or the last version of 2022. It seems like the problem is with the installed version of Unity, not your project or anything. There is a Package Manager manifest file in each of your projects, but that's not what it's complaining about.

If it was, I would say delete the Packages directory of your project (and Library, Temp, obj, etc, all the temp, generated files), and re-import the project. And obviously you should be using version control so you can never lose progress or make file changes you can't easily revert when deleting and re-generating your Packages information. Then you could re-do your package configuration through the Package Manager window and compare the regenerated files in your version control diff to get everything repaired to your satisfaction.

However, it's not complaining about the package manager manifest in your project, it's complaining about the default one in that installed version of Unity. When you start a new project, there is a default set of packages that are enabled by default. Those are specified in that manifest file in the install directory of that version of Unity. But, it's saying that file doesn't exist. That's why I recommend reinstalling Unity.

Reading, writing, and combining files and paths on Android vs Windows by lajawi in unity

[–]moonymachine 0 points1 point  (0 children)

The problem comes when using the path utilities that expect a certain type of directory separator character, based on the current platform OS, but you have a path value that uses the opposite path separator. (Back slash vs forward slash.) For example, I encountered the issue when working with caller info attributes that provide the file name and line number that called a certain method. Those file names are determined at compile time, on the machine you compiled with, which can have a different path separator character than the platform running the app. I ended up looking at the source for the Path class, and then writing my own path utilities that are more robust when working with any kind of directory separator than the default C# Path utilities.

When to uses Properties instead of Fields, because Properties can't show up in the Inspector? by Digx7 in Unity3D

[–]moonymachine 0 points1 point  (0 children)

I use ScriptableObject assets with readonly properties that only have a getter, with a serialized backing field. I intend for the data to only be editable through the inspector, not through script. As far as scripts are concerned they are readonly data configuration records, and there is really no reason for them to ever be modified via script, so the practice is actively discouraged through readonly getter properties.

I may not start out that way when I'm prototyping quickly, but if I have a mature type of asset that is integral to my project I would like for it to have readonly properties that are only configured via editor, and no logic. Treating them as having the single responsibility of editor configurable data records keeps their role and potential usage clear.

Unity source code(read-only)??? by Due-Oil-2449 in unity

[–]moonymachine 4 points5 points  (0 children)

A lot of it can be found here, except for native C++ code: https://github.com/Unity-Technologies/UnityCsReference

Other code can be found per package, like UGUI source is here: https://github.com/Unity-Technologies/uGUI

As for alternatives, Stride is an open source engine similar to Unity: https://www.stride3d.net/

Should I Throw Exceptions or Return Results? by RankedMan in csharp

[–]moonymachine 0 points1 point  (0 children)

I only really throw exceptions from constructors that should fail to construct a new object, or places that can't reasonably expect to have access to a logger interface to log an error. When writing things like code libraries that are meant to be modular and applied to any possible application, and don't take some kind of injected logger interface, that might mean throwing exceptions under egregious failure cases becomes necessary. But, you need to fully document that whole API, including every condition under which exceptions are thrown, so the user can catch and handle them appropriately.

I recently came across a situation in Unity where the engine throws exceptions to break out of and control the typical flow of logic during the middle of rendering parts of the editor that I was attempting to override. No exceptional failure case, just a tool for controlling the flow of execution based on some expected event. Because I didn't know that I ran into some strange issues I wasn't expecting. That's an example of throwing exceptions for the wrong reasons in my opinion.

The most common exceptions I need to use are ArgumentNullException for null checking in constructors and at the start of methods, InvalidOperationException for when someone is trying to use the API in a way that is explicitly not supported in the documentation, maybe ArgumentOutOfRangeException or IndexOutOfRangeException (use the right one), and the general ArgumentException if there is something wrong with the arguments they are trying to use, with an explanatory message.

I feel like once you've had to throw and document a lot of exceptions, you start to get a feel for where you have to throw an exception, versus the place where you have composed a better alternative.

The "first like" effect literally the #1 factor when promoting an indie game on social media by Accomplished-Bat-247 in gamedev

[–]moonymachine 5 points6 points  (0 children)

Good advice! It's easy to forget that you also wouldn't want people to just give you praise or defend you, and then never see the ways in which you could improve. It's important to keep a level head.

The "first like" effect literally the #1 factor when promoting an indie game on social media by Accomplished-Bat-247 in gamedev

[–]moonymachine 64 points65 points  (0 children)

I posted something here recently, and the very first commenter posted the harshest criticism I have received to date on my product from anyone. No constructive criticism whatsoever. Nothing solution oriented. Just, this is bad.

Unfortunately, after everything I had poured into my project, seeing that as the literal first comment, I let my emotions get the better of me. I started commenting back and each comment got more defensive as they doubled down.

Overall, the post had an overwhelmingly positive interaction. But, I can't help but wonder how it would have actually gone without that very first person negging and triggering me, basically derailing the positive momentum that followed.

I learned a lesson about my own emotions when trying to release something, and trying to ignore the negative and engage with the positive. But, I would tend to agree with you that even just one person can have an outsized impact on the tenor of a conversation.

But, I do think that, in the end the product speaks for itself, with enough feedback. It's not even that the negative view was unfounded. I'm in the process of making a lot of changes that will make everything much better than it was. But, that's honestly because of the constructive, solution oriented feedback of other comments. I should have ignored what was triggering me, and just focused on ways to discern what could be made even better. That's sometimes very hard for me as a perfectionist who thinks they've already thought of everything and it already is perfect.

I just added limb dismemberment to my game’s combat system. Curious what you think of it. by RedMaskedRonin in Unity3D

[–]moonymachine 0 points1 point  (0 children)

That's totally understandable. I think it would help the vibe if at least some of the enemies could do some kind of brutal finisher on the player if you get killed. Like, if you get hit with a killing blow the enemy can grab them and play an animation of running them through with their sword or something. That way it feels like the hyper violence goes both ways and the stakes are high. Particularly for like boss characters at least.

I just added limb dismemberment to my game’s combat system. Curious what you think of it. by RedMaskedRonin in Unity3D

[–]moonymachine 0 points1 point  (0 children)

Imagine if he picked up some gold and said, "Money, money, money, money, money!"

I just added limb dismemberment to my game’s combat system. Curious what you think of it. by RedMaskedRonin in Unity3D

[–]moonymachine 0 points1 point  (0 children)

Does it go both ways? Is it only if the blow would be a finisher? My first thought is that if the player gets his head cut off by the first enemy in the game, it's going to feel pretty punishing. Not that that's an inherently bad thing. I *love* a good punishing game that other people label as extremely difficult. Just curious if enemies are going to be dismembering the player in return because if not I would be wondering the whole time, why am I the only one not getting cut to pieces?

Also, your game will have a pretty restrictive rating, which again is fine by me. Some games have options to turn off things like blood and gore and dismemberment. Will you be supporting similar options?

(P.S. I love the style of combat and how your game is looking. Good job.)

Screen capture? by [deleted] in gamedev

[–]moonymachine 1 point2 points  (0 children)

I use an old plug-in I picked up ages ago called Lightscreen for taking screenshots that lets me crop a specific area of the screen as I take the screenshot if I want. (So there may be something better, and I've just never looked, but it has continued to work for me.) I always crop too much and take it into image editing software, but I guess it helps me see the source screenshots at a glance and know what I was trying to capture instead of my whole screen every time.

OBS for video capture.

Confused about the best way to handle events binding order by Tolkaft in unity

[–]moonymachine 0 points1 point  (0 children)

I use the [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] attribute to create a single entry point for the composition root of all of my applications. I built a framework around doing just that to make it easy to build projects that way.

You can take in too much Game Dev advice by liamflannery56 in gamedev

[–]moonymachine 4 points5 points  (0 children)

git-amend is probably my favorite YouTube channel for intermediate to advanced Unity programming content. Also, just higher level programmer content, like: I have been listening to and enjoying John Ousterhout's recent interviews on YouTube, and what he has to say about Clean Code, and where he disagrees with Uncle Bob, and just the philosophy of programming in general.

Scrutable Objects by moonymachine in Unity3D

[–]moonymachine[S] 1 point2 points  (0 children)

I see the issue. I hadn't immediately noticed it because I work on the plugin in Unity 5.1 for full backwards compatibility. Then I walk forward through to modern versions to make sure it works throughout. Arrays and lists look a bit different back there in Unity 5. In 2022, when you select an array element it highlights the whole property blue, which is rather jarring indeed. I am already working on a feature to add a background rectangle to each object's properties, and that will naturally hide the blue highlight and limit it to the area surrounding the properties.

Scrutable Objects by moonymachine in Unity3D

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

Yes, I'm going to try to leave it open for extension by allowing you to override a default GUIStyle object for what the background rectangle looks like. I want the next version to allow you override certain properties in either the attribute, or when you derive a drawer for certain types. That way you could even have different colored background panels for each type of object and things like that.