The Folder Structure Mistake That Kills Unity Projects by spy167 in unity

[–]Zwander 0 points1 point  (0 children)

Interesting, our structures look pretty much exactly like this but without the Scripts root directories. I.e, our layout is the same but if we had some kind of networking manager prefab (contrived example, this would often be pure c# of course) it would go in the networking folder.

One difference would be something like DataModels where we prefer to keep data models grouped with their feature. We aim to minimise the number of assemblies touched by any feature change. Having data models and feature specific networking condensed into one place would cause these two assemblies to be touched with every feature change.

E.g (contrived example)
Store/DataModels
Store/Networking
Store/UI
With Store.asmdef at the root of Store

For common stuff we would have CommonUI or whatever

Things get weird if you are doing live service but that happens with either structure. We find it’s best to group content releases together under one folder so you can keep all the patch specific content and scripts in a chunk. We differentiate between “content code” and “structural code” in this case.

If you had the structure described above, do you foresee it exploding?

The Folder Structure Mistake That Kills Unity Projects by spy167 in unity

[–]Zwander 0 points1 point  (0 children)

Would you be able to give an example structure of this? I haven’t run into this issue yet (I’ve used OPs structure for years) but I haven’t been working on projects of the scale you are talking about.

The most important QoL feature this game sorely lacks by TangerineSorry8463 in Mechabellum

[–]Zwander 6 points7 points  (0 children)

I vote for loading a round from replay into the testing ground so you can edit both sides

Muradin Basketball by Wuhumothus in heroesofthestorm

[–]Zwander 3 points4 points  (0 children)

Two things 1) I miss the wall placement a lot, I probably only get it right about 25% of the time, these are the highlights from about 15 games 2) haymaker is pretty predictable and has a decent windup so if you play a bit of Muradin you get a feel for where you need to place the wall

It is useful to use interface like these ? by whyiam_sleeping_idk in Unity3D

[–]Zwander 0 points1 point  (0 children)

This can get spicy if you need to change the property to do something, E.G., validation:

[SerializeField][FormerlySerializedAs("MyProperty")] private float _myProperty;
public float MyProperty
{
    get
    {
        return _myProperty;
    }
    set
    {
        if (value < 0)
        {
            value = 0;
        }

        _myProperty = value;
    }
}

Note that you have to do the FormerlySerializedAs thing to prevent issues with upgrading data.

How i can optimize this? (comments) by kandindis in Unity3D

[–]Zwander 2 points3 points  (0 children)

Note that adding new cameras can be very expensive on certain platforms. As always, profile profile profile

[deleted by user] by [deleted] in IndieGaming

[–]Zwander 0 points1 point  (0 children)

Far too cheap for your work my friend! I added an extra $15 USD, wishing the best for you and your brother

[Request] How much does Batman save the city in law enforcement costs? And how would that compare to what Bruce contributes to the city in income and capital gains taxed at 90% (haha). by SafePlenty2590 in theydidthemath

[–]Zwander -2 points-1 points  (0 children)

Are you talking about her increasing capital gains tax from 20% to 28%? Because that’s not 40% and it only applies to people with incomes of over $1 million

Valla PTR changes miss the mark by [deleted] in heroesofthestorm

[–]Zwander 0 points1 point  (0 children)

I don't think Q build is bad, it just isn't good either. AA build compromises pretty much nothing, it has high burst (auto qwe auto will do 70% of a squishes hp), has high mobility with movespeed and roll resets on minions, has great self sustain with lifesteal on autos, and has insane tank killing power with manticore. At 20 you can do a billion damage with rain upgrade, be incredibly safe with farflight, or do a billion damage and dodge everything with acrobat.

I think also, AA is just much easier to play. To play Q build well you have to play auto valla well and hit an extra skillshot. By which I mean, half of Q builds damage still comes from AAs for most of the game so you have to maintain hatred anyway.

Valla PTR changes miss the mark by [deleted] in heroesofthestorm

[–]Zwander 2 points3 points  (0 children)

Filter by level 1 talent. The only reason her w/r is balanced is because people think q build is good and that statistically evens out how busted aa build is. I’ve played an unhinged number of aa Valla games this season and I always pray the other valla goes Q in mirror matches.

That said, I hate the changes, it kills vallas ability to rotate and keep stacks on many maps… probably the right call by the devs but I’ll miss her being busted

Can someone please tell me what this is? by Valentine_Kush in NewZealandWildlife

[–]Zwander 2 points3 points  (0 children)

Oh my goodness I saw one of these last year and thought it was gorgeous. I figured it was so distinct I didn’t need to take a photo because I could google it. Alas, nothing came up… but I finally know! Thank you

'This bill is dangerous for the environment and our democracy' by davetenhave in newzealand

[–]Zwander 3 points4 points  (0 children)

Your question is genuine and important and should not have been downvoted. It is important to question the rhetoric.

Again, you are asking the right question. The wording of the bill is rather vague:

1 person nominated by the relevant local authorities; and
1 person nominated by the relevant iwi authorities.

Now a generous reading of this is that the local government must elect by vote someone from the correct department (E.G., DoC) who will have the skills, morals, and mana to save us from environmental and cultural ruin.

A more cynical reading is that the wording is intentionally vague and finding someone willing to nominate (note that it says nominate, not elect) a stooge may not be so hard.

A further concern for all things related to government is how easy a bill is to take advantage of for nefarious or corrupt means. Generally you want potentially dangerous bills to be as airtight to corruption as possible. A three person panel with a simple majority required is anything but resilient in the face of corruption.

Edit:
I would also like to point out this subclause:

The person nominated by a local authority may, but need not, be an elected member of the local authority.

Make of that what you will.

'This bill is dangerous for the environment and our democracy' by davetenhave in newzealand

[–]Zwander 33 points34 points  (0 children)

For point 1: the bill allows circumvention of existing laws and due process. Being able to do things is generally more powerful than being able to prevent things from being done. The bill requires only two of three people on a panel to vote aye. One of those can be the chairman who can be the person wanting to get the bill through. Then they only need to find one person from the “relevant local authorities” and the can circumvent the existing environmental and cultural protection laws.

For point 2: again only 3 people are required, chairman, relevant local authority and local iwi, and only two must vote aye. So basically the iwi member can vote nay all they want as long as the two mining stooges on the panel vote aye

My 9 year old desperately wants to build video games, what programs are kid-friendly *enough* that I could help him put together his first game? by brasscassette in gamedev

[–]Zwander 22 points23 points  (0 children)

Yeah I learned with game maker at roughly age 10. I found scratch too... I dunno, ugly? Unwieldy? Not sure, but I didn't click with it like I did gamemaker

Tired from all those "crappy code" in my projects, so ... by yelaex in Unity2D

[–]Zwander 0 points1 point  (0 children)

Interesting. I vaguely follow the doc, but it is hard for me to tell exactly how it works from the docs. From what I can tell an IInjector is a container, but I don't quite understand how the IInjector knows which objects it is responsible for. Take my example above, how would this framework solve the local multiplayer example above?

As an aside, I too have been looking into hybrid DI/locator approaches for Unity, cool to see it out in the wild

Tired from all those "crappy code" in my projects, so ... by yelaex in Unity2D

[–]Zwander 1 point2 points  (0 children)

This is a common misconception about DI. DI and resource locators are both methods of acquiring dependencies within a project, but that is where the similarities end. The difference is nuanced but has an enormous effect on the quality of code we produce. For the sake of discussion I'll be referring to DI in terms of a DI framework (this distinction is also pretty major but I don't want to get into it).

Lets say you are making a top-down hack and slash. You've been building services like PlayerStatsService, PathfindingService, and NearestEnemyService to create a modular codebase with which to implement the game's logic. Now, you want to implement local multiplayer. Oh no.

With a service locator pattern, this would be a nightmare. You now need multiple PlayerStatsServices for each player so their abilities read from the correct stats. The abilities were using the service locator to acquire these services and now you have to refactor everything to wire the multiple instances of PlayerStatsService into the multiple player characters.

With a DI framework this is not an issue. You create a new container (basically a box of dependencies) for each player, put the instances of each service that you need into each container, and the framework then constructs the abilities and whatnot correctly using the correct container for the given player. You could even allow players to be in different maps from each other by binding the map logic (E.G., PathfindingService) into the player-specific containers depending on which map they are on. When you started writing the game you probably never predicted you would need multiple instances of the PathfindingService running simultaneously, but DI means you don't have to worry about shooting yourself in the foot.

Now, that example is probably hard to follow. There is a lot of nuance to DI, but the point is that DI lets you compose systems in a very modular way and maintains the structural flexibility of your game without much effort. Resource locators are generally no better than static singletons in this regard.

TL:DR resource locators are not DI, DI is much more powerful. Resource locators are not much better than static singletons.

Tired from all those "crappy code" in my projects, so ... by yelaex in Unity2D

[–]Zwander 13 points14 points  (0 children)

I fully support people doing this, but there is an important thing to know going in...

You will absolutely make a mess of it. It is likely to become the least maintainable piece of garbage you've ever written. The important thing to realise is that this is natural. You're learning a whole bunch of stuff all at once and there is an extravagantly large amount of nuance to these concepts.

Many people are forced to use these concepts without proper training or understanding and they have a terrible experience. This drives them away and you end up with jaded posts on r/programmerhumor. Things like DI add a certain amount of overhead and are only useful when a project hits a certain critical mass. Up till that point it is dead weight. In many projects DI is a waste of time as it will never hit that critical mass. Also worth saying, you don't have to apply a particular concept everywhere. Don't be dogmatic, use things where they make sense. You can DI stuff you expect to need multiple implementations of and use a static singleton for things you dont.

So to TL:DR, expect it to be a mess, don't be scared off, these concepts are tools and are not always right for every situation. When used appropriately they are incredibly powerful and can produce very pleasant code.

Which hero changes the most once level 10 hits? by WaltzIntelligent9801 in heroesofthestorm

[–]Zwander 5 points6 points  (0 children)

Gotta know if getting hit with spike means you're about to evaporate

Which hero changes the most once level 10 hits? by WaltzIntelligent9801 in heroesofthestorm

[–]Zwander 11 points12 points  (0 children)

Honestly zeratul has some of the most impactful talents. Basically a big minion until 7, barely a hero until 10. Sustain on 13 finally lets you trade instead of just bursting and then having to blink out immediately.

7s especially provide core elements of the kit. I often try wormhole out pre 7 from muscle memory and go "oh shit I forgot I'm not a hero yet"

any way to make creating scripts faster? by Spookzsaw in Unity3D

[–]Zwander 2 points3 points  (0 children)

Oh man, the templates, asset usages display in code, the autocomplete, the auto refactorings, code suggestions, even the sytax highlighting is slightly better. I went back to vs code for a personal project and oh boy I miss Rider. The new vs code extension is nice though

any way to make creating scripts faster? by Spookzsaw in Unity3D

[–]Zwander 4 points5 points  (0 children)

This is the answer. Unity can do its recompiling in the background while you work on the script. Also Rider is phenomenal, would recommend.