Useful C# Features (or “Cool Things You Didn’t Know You Could Use in Unity”)
1. Tuples & Discards! Tuples is something more dynamic languages like JavaScript have been holding over the more static languages for a while. It allows you to do more with less action (higher level ones, that is). While tuples have existed in C# before as a class of their own, they are now getting a proper implementation. It basically makes a complex variable/object without having to predefine it using a class or a struct. You can even use it to return more than one element from a method(!!!). Unfortunately, the Unity editor doesn’t support handling those kinds of returns yet but they are still useful inside your scripts. Discards are those underscores you see in the example below. It allows you to deconstruct a tuple and discard the data you don’t want, only keeping what you actually need in its own named variable. 2. Pattern Matching! Pattern matching allows you to test a runtime type in an if or switch statement and then convert it to that specific type all in a single statement! It also increases the power of switch, allowing you to do a lot more with less and create much more complex testing blocks. 3. Local functions Local functions is currently one of my favorite features in C#. You could already create functions inside functions by assigning a block into an Action or Func variable but now you can just define an anonymous function and not worry about what returns or not returns a value or where Continue Reading →
Posted in IT, No Category, Programming by Eran with comments disabled.
News: Average User has no Concept of How Much Game Dev Costs
Recently, some clueless joe on Twitter said he will pay 10,000$ to the person who adds a multiplayer aspect to Zelda: Breath of the Wild. If he was going to donate to a modder who was working on it, that would have been fine but it seems like he was thinking that he could hire someone to do something like that for that kind of money. Here is a long, detailed response to this which you should read but here’s the summary: 10,000$ would pay for about two work months of the average+ programmer. Also, networking is hard. The hardest networking challenges in gaming usually arise in fighting games because they usually need to be exactly per pixel and per frame accurate and, probably over distances where network traffic takes more time to go back and forth than it takes pro players twitch reflexes to react. You can see how important this is if you go back and read about the network woes of Street Fighter V. Now, the demands of a PvE, open world, action RPG would probably be a lot less strict but these are still difficult problems. Especially if you’re talking about tacking on something like this onto a game that was definitely not designed for it. You want a more current example? On the one hand, Battlefield 2042 is out now and it’s buggy as hell. On the other hand, Halo Infinite’s multiplayer is also out and it’s much better. Probably because the team is backed Continue Reading →
Posted in Gaming, Less Interesting News, Practice, Programming, Thinking Out Loud by Eran with comments disabled.
Activision-Blizzard Proving Again That They Just Don’t Care
Activision Apologises and Removes ‘Insensitive’ Quran Pages from Call of Duty: Vanguard. Seriously? I mean, really? I did my basic Arabic studies and I know that the Quran (like the Bible and the New Testament) is Islam’s holiest tome and they do take it very seriously with how you treat iconography. But even if you didn’t know that disrespecting the Quran would whip up Islamic people into some kind of rage, imagine what it would feel like to you (or your more religious friends/family members) if there were pages of your religious texts on the ground where everyone is expected to walk. Or, because you’re one of the hugest game companies in the world who want to sell your games to as many people as possible, have some freaking sensitivity consultants.
Posted in No Category by Eran with comments disabled.
The Only Way Out is Through
Posted in No Category by Eran with comments disabled.
Doggos: As Above So Below
Posted in No Category by Eran with comments disabled.
Beautiful Sky
Saw this on my walk this morning. Just wanted to share. Have a good.
Posted in No Category by Eran with comments disabled.
Make time to loaf yourself
I use this Keto Almond Bread recipe with some modifications. — SGHF, Eran
Posted in Mixing, No Category by Eran with comments disabled.
Just wanted to let you know our dogs are cute floofs
— SGHF, Eran.
Posted in No Category by Eran with comments disabled.
Found this outside one day
That’s it for today. — SGHF, Eran.
Posted in No Category by Eran with comments disabled.
Villains, bullies, dicks, and Hanlon’s Razor
I’ve recently read an article that was actually about work environment and building and maintaining a supportive team but one sentence struck me in a way that made me think about real life bullies and how villains are portrayed in media. […] Management expert and author Douglas W. Hubbard [in his] book The Failure of Risk Management: Why it’s Broken and How to Fix It [rewrote Hanlon’s Razor as]: “Never attribute to malice or stupidity that which can be explained by moderately rational individuals following incentives in a complex system of interactions.” […] not only are people’s actions rarely malicious, they’re most likely not about you at all. Malice is simply not a probable explanation for people’s actions, and it’s not reasonable to assume it is. So, if you take that to the realm of story villains, the best ones are not just there to be an antagonist but would exist and do their thing even if the hero wasn’t there at all. A good villain is not about the hero. A good villain is only about themselves and what they want to achieve. Think about that when you craft your next villain for your story or game, either forwards as who they are, what’s their motivations and what incentives exist that they will follow down the wrong path; or backwards as what you need the villain to be and come up with the system of incentives that could put someone in that position. But this same conversation got me Continue Reading →
Posted in No Category by Eran with comments disabled.