Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Red Mike
Jul 11, 2011

OneEightHundred posted:

Benefit how though? The runtime is the same for all tiers, and the developers hosting their stuff on SpatialOS still need the same licenses they would if they were hosting it themselves.

They don't need the same license, because they're effectively sending SpatialOS code that the SpatialOS guys run on their own Unity instances. Basically, you wouldn't be allowed to use the free version of Unity (or a Pro trial) to write up a codebase that you then build on someone else's Pro version. The same applies if people write a framework that runs third party code as a platform. They've now clarified this.

The blog post makes it clear that it's what I said. You can't have a platform offering fully hosted Unity runtimes that run third party code from other developers without talking to Unity. This was the case before and is now clarified in the ToS. No-one hosting their own gameserver is affected, because that's you hosting your own code in a Unity runtime, not you taking code from other people (not covered by your license) and then hosting it under your own license.

It's just community overreaction as usual.

Adbot
ADBOT LOVES YOU

pseudorandom name
May 6, 2007

Well, not usual now that Epic has swooped in to be disingenuous about the situation.

FuzzySlippers
Feb 6, 2009

Rocko Bonaparte posted:

Okay so compromises like that do let you get away with more, although having only one writer to multiple readers is the more important thing. I can't see a problem with using ReaderWriterLockSlim but I am surprised the ConcurrentDictionary is being so bad. On the other hand, it is also guaranteeing atomicity on multiple writers so it would likely be slower regardless.

That must be some intense pathfinding to calculate that you have to sweat this. Have you checked the actual number of operations you are performing when calculating routes? I would be worried I botched my heuristics and am actually calculating (recalculating?) my entire domain.

The more complicated traversal data is what ends up making me go through so many nodes when pathfinding. I've tinkered with the heuristic but I think its just inevitable. My implementation of BFS was pretty messy but it didn't end up gaining me anything. I don't think my winding dungeons aren't great for BFS anyway.

This is replacing cooperative pathfinding which is ungodly complicated and performed far worse. This is a bit hacky but I've been very impressed with the results. My agents naturally squish through hallways and then fan out with more space. They also naturally surround the player without needing to explicitly assign fight slots in a kungfu circle or whatever.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Red Mike posted:

They don't need the same license, because they're effectively sending SpatialOS code that the SpatialOS guys run on their own Unity instances. Basically, you wouldn't be allowed to use the free version of Unity (or a Pro trial) to write up a codebase that you then build on someone else's Pro version. The same applies if people write a framework that runs third party code as a platform. They've now clarified this.
They already let you upload binaries under a Free license to a cloud service and run it there with exactly the same features, so what difference does it make?

seiken
Feb 7, 2005

hah ha ha

Red Mike posted:

They don't need the same license, because they're effectively sending SpatialOS code that the SpatialOS guys run on their own Unity instances. Basically, you wouldn't be allowed to use the free version of Unity (or a Pro trial) to write up a codebase that you then build on someone else's Pro version. The same applies if people write a framework that runs third party code as a platform. They've now clarified this.

This isn't how SpatialOS works. There's no spatialos code running on unity instances. You upload your custom game server binaries, which use some APIs to talk to spatialos (which has nothing to do with unity and works the same for unreal or anything else), and they get orchestrated by the system. It's more like AWS-with-game-focused-databases-and-scaling-and-stuff.

seiken fucked around with this message at 03:21 on Jan 12, 2019

Absurd Alhazred
Mar 27, 2010

by Athanatos

Nolgthorn posted:

I am not a lawyer but you agree to ToS at the point that you start using unity. Those ToS that you agreed to should remain in place until you agree with a new ToS. I imagine Unity might be able to prevent you from using a new version of Unity without agreeing to the new ToS but otherwise couldn't in development/released games continue to do what they're doing?

ToS have some kind of clause in it saying they can change it at any time, I think.

pseudorandom name posted:

Well, not usual now that Epic has swooped in to be disingenuous about the situation.

You mean this? Why not swoop in and take advantage of a rival's blunder? I don't see what's disingenuous here.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Absurd Alhazred posted:

ToS have some kind of clause in it saying they can change it at any time, I think.

Yeah, but that doesn't mean you automatically agree to the new ToS. They have to present the new terms to you and get you to agree to them again. Being able to retroactively change a contract and add whatever terms you like and then force the other party to hold to them would be...bad.

xgalaxy
Jan 27, 2004
i write code

Suspicious Dish posted:

My hot take: the ToS basically doesn't matter until you get Unity angry. And if you make them really angry, they can just change the ToS anyway. And if you don't make them angry, they're not gonna take action against ToS violations. So the ToS is basically just a guideline about what might make them angry.

I don't think any games are in danger -- I think they learned from the PR disaster that happened today.

No serious company is going to run that way though? If something is vague in the TOS than that product either isn't used by the company or serious negotiating between the company and Unity needs to happen to have a contract drawn up that explicitly lays out what can and can't be done.

And *that* is the true intent of this TOS change. Unity wants serious companies to come to them and draw up special contracts, with no doubt special pricing, to use the Unity product in the cloud.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

TooMuchAbstraction posted:

Yeah, but that doesn't mean you automatically agree to the new ToS. They have to present the new terms to you and get you to agree to them again. Being able to retroactively change a contract and add whatever terms you like and then force the other party to hold to them would be...bad.

Right, but they can release the new editor under new terms, and if Improbable doesn't like it... they're consistently stuck on an old version of Unity, which won't accept their dev license key anyway.

xgalaxy posted:

No serious company is going to run that way though? If something is vague in the TOS than that product either isn't used by the company or serious negotiating between the company and Unity needs to happen to have a contract drawn up that explicitly lays out what can and can't be done.

Except it happens. A lot. Because laypeople don't read contracts, and because lawyers evaluate risk as a sliding scale, not a yes/no answer. Google can terminate your account at any time without pointing to a specific ToS violation if they really want to, and they have in the past. It's just considered low-risk that nobody REALLY cares that much about it.

Absurd Alhazred
Mar 27, 2010

by Athanatos

TooMuchAbstraction posted:

Yeah, but that doesn't mean you automatically agree to the new ToS. They have to present the new terms to you and get you to agree to them again. Being able to retroactively change a contract and add whatever terms you like and then force the other party to hold to them would be...bad.

IANAL but as far as I understand it, you're not forced to agree to the new ToS, but then you have to stop using their software.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I've been thinking about online features/multiplayer for my game. It is written in C++ and I'm not using any commercial engine.

I think I'm happy to use Steam's facilities for leaderboards, but I'm wondering specifically about online multiplayer. I have some experience with network programming, but it has been a while. Should I just do peer-to-peer? Or attempt to run a server? There are things like gamelift, gamesparks, etc... but these things seem quite involved. I "applied" for a free gamesparks account but it doesn't seem they will get back to me.

What are my options, really?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
basic peer-to-peer where each client is authoritative over their own game state isnt that terrible for a small indie game without a serious competitive scene. if you are ok to lock yourselves into steam, then definitely use the steam networking sdk for p2p. they also have a new one in beta which is much better -- contact your steam store rep to get access to that if it's not part of the default sdk by now.

this doesn't help you much with the packets themselves or synchronizing game state (it looks like you already have some split-screen display, so it hopefully shouldnt be that tricky to hook up), but it does solve matchmaking and packet delivery.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

FuzzySlippers posted:

The more complicated traversal data is what ends up making me go through so many nodes when pathfinding. I've tinkered with the heuristic but I think its just inevitable. My implementation of BFS was pretty messy but it didn't end up gaining me anything. I don't think my winding dungeons aren't great for BFS anyway.

This is replacing cooperative pathfinding which is ungodly complicated and performed far worse. This is a bit hacky but I've been very impressed with the results. My agents naturally squish through hallways and then fan out with more space. They also naturally surround the player without needing to explicitly assign fight slots in a kungfu circle or whatever.
I'm kind of curious how much data you have to munge. At some point, I'm going to be worrying about pathfinding again. I just have an A* thing working on some matrix of compacted binary data representing the 8 major directions. I have a thing that just generates the data from the level by testing collisions of a box against all major directions in a grid, and it seemed to be fine enough. However, that's on my huge-rear end PC without a bunch of other poo poo going on. So I'm wondering if I can expect to run into a wall with it. Of course I should wait until it actually happens, but it's better to have a sense of smell for it.

FuzzySlippers
Feb 6, 2009

Rocko Bonaparte posted:

I'm kind of curious how much data you have to munge. At some point, I'm going to be worrying about pathfinding again. I just have an A* thing working on some matrix of compacted binary data representing the 8 major directions. I have a thing that just generates the data from the level by testing collisions of a box against all major directions in a grid, and it seemed to be fine enough. However, that's on my huge-rear end PC without a bunch of other poo poo going on. So I'm wondering if I can expect to run into a wall with it. Of course I should wait until it actually happens, but it's better to have a sense of smell for it.

My levels are usually a few thousand grid cells, 30-60 enemies, and it's real time. I have a stress test scene of a 100 agents that I tweak it un-threaded so I can more easily profile. Running on a couple threads I'm pretty happy with it now tho I feel it's one of the areas I could always improve.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

baby puzzle posted:

Should I just do peer-to-peer?
That's quite the "just" these days, unless you're expecting people to play on a LAN. Firewall traversal and stuff is non-trivial, and even where that's not an issue, if you're doing peer-to-peer with no server you're asking people to find and communicate their correct remote IP address to their partner. In the old days people were used to that kind of thing, but nowadays people are used to just clicking their friend from a list that got built from Facebook or some poo poo like that. If some third-party API is available and suitable (like Steam) it's almost certainly less effort to do it that way than to roll your own peer-to-peer and explain it to users.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I'm getting ready to implement a bit of a multiplayer. I figure I am setting up a simple server equipped with websockets, and I'm going to run everything through websockets. I think it's a pretty good solution, which will take care of 80% of my "network programming" concerns and I can setup accounts and friends lists fairly trivially with it.

All I need is to pass some data around and that's what this does.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
Well, I think I'm just going to use Steam's matchmaking and peer-to-peer networking. I don't have the resources to move away from steam anyway.

mobby_6kl
Aug 9, 2009

by Fluffdaddy
I'm writing an app targeting OpenVR and everything turned out surprisingly well except that the "right way" of doing input seems to be broken. Or maybe it's just me, does it work for anyone else?
This setup returns no errors and generates some handles:
code:
EVRInputError  e = VRInput()->SetActionManifestPath("C:\\temp\\openvr_manifest.json");
	
VRInput()->GetActionHandle("/actions/main/in/RightHand", &in_hand);
VRInput()->GetActionHandle("/actions/main/in/Click", &in_click);
...
vr::VRInput()->GetActionSetHandle("/actions/main", &action_set);
I've made a basic manifest but sometimes SteamVR doesn't like it for whatever reason. So assume I used the sample manifest from here: https://github.com/ValveSoftware/openvr/wiki/Action-manifest

This lets me go into the SteamVR Input Binding settings but most of the time, if I try to actually bind a button to an action, it just throws an error about failing to open bindings. Once or twice I managed to bind the mandatory actions but it still wouldn't save it as the default binding for the app. Did anyone get this stuff to work? There's very little documentation or discussion about it online so I'm stuck using the deprecated methods and hardcoding controller IDs just to keep things moving.

just a kazoo
Mar 7, 2018
Does anyone have much experience working with unity's new multiplayer setup? The game my partner and I are working on will be multiplayer heavy and it seems like the new tools should be a little more friendly than unet. We are working to get the fps sample project set up so we can start playing around with it to learn some basics.

Stick100
Mar 18, 2003

just a kazoo posted:

Does anyone have much experience working with unity's new multiplayer setup? The game my partner and I are working on will be multiplayer heavy and it seems like the new tools should be a little more friendly than unet. We are working to get the fps sample project set up so we can start playing around with it to learn some basics.

Personally, I'd be wary of Unity's MP stuff and maybe just go with a known quantity like Photon/Bolt.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀

Nolgthorn posted:

This is the absolute best pathfinding tutorial I have found for a grid which is perfect for me. I'm just unsure about what to do about hard corners. I don't want people to assume they can move diagonally when there is a barrier on the corner, if there's no barrier then go hog wild of course.

https://www.youtube.com/watch?v=KNXfSOx4eEE

A* is a generic pathfinding algorithm and can be adapted to just about any graph you want. Just look for barriers and disallow diagonal movement during the path calculation. This won't break the algorithm.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

Dr. Stab posted:

A* is a generic pathfinding algorithm and can be adapted to just about any graph you want. Just look for barriers and disallow diagonal movement during the path calculation. This won't break the algorithm.

I have a second question and thank you for your answer.

My map has several layers and as many staircases as you want can be built just about anywhere. Is there anyone talking about h-cost between staircases in case I wanted to go from level 5 to level 3? How would I figure out which staircase to use? I was thinking perhaps I could pre-calculate the distance between each pair of staircases, or even, pre-calculate paths, not all staircases will get you where you want to go.

Seems to add an extra dimension of complexity that not many people are discussing.

Maybe this is really simple and I'm just slow.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
If the stairs map directly to squares below them in a physically sensible way, your heutistic for a square would be the straight line distance plus the cost of descending/ascending that many levels.

If that ends up being too slow, you can start encorporating pre computed data about the connectivity of levels and distance to stairs.

The only constraint on your heuristic is that it doesn't over-estimate the true cost of the path.
e: And of course, the better your heuristic estimates the true cost, the faster your algorithm will perform. Evaluate your heuristic function using Price is Right metrics. That is, you want it to be as close as possible without going over. Also, it shouldn't be too complicated. A* should be the part doing the heavy lifting here.

Dr. Stab fucked around with this message at 21:54 on Jan 15, 2019

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
What I meant is in my example travelling from a point on level 5 to a point on level 3, is that the stairs don't go straight from level 5 to level 3. There's a whole floor on level 4 that needs to be traversed, potentially, and a potential multitude of staircases in different locations.

I suppose I should figure out which staircases down from level 5 can get to which staircases down from level 4, and ignore the ones with no available path. Then calculate h-cost based on distance to the nearest staircase that can make it, plus the h-cost to the staircase nearest the destination. Even though there's no guarantee it's actually the shortest possible path.

Mata
Dec 23, 2003

Nolgthorn posted:

Seems to add an extra dimension of complexity that not many people are discussing.

It literally does add an extra dimension, and if you have a lot of stairs and levels, performance will take a hit. But like Dr Stab said, A* works with any graph (not just grids). Just consider, which neighbor nodes (or tiles) does a staircase have? The algorithm will figure it out from there.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Come to think of it my thinking is totally wrong, h-cost doesn't care if it can make it or not it's just the distance, period. So I should calculate the shortest possible route from where I am to where I'm going, ignoring all walls and things but taking into account the locations of staircases.

I guess in a different way I was imagining I can shave off some calculation by pre-computing paths between staircases... but I don't really know how that would work with the algorithm.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
You can precompute things about the connectivity of areas, but the naive solution is just the 3d distance to the end point. If that solution works for your game, then you don't need to do anything more fancy.

You could get a little more precise if you precomputed which stairs could take you to the right area by saying that your heuristic values was the straight line distance to the nearest valid stairs plus the height differential plus the distance to the target from those stairs.

e: precomputing paths can be a trap if you have a bunch of agents. You might want them to try to take the least congested path.

A somewhat more generic approach is to divide the space into chunks, figure out the path through those chunks, then figure out the tile by tile path within a chunk. This can get pretty complicated and is no longer going to give correct answers. Only do this if you have to.

Dr. Stab fucked around with this message at 00:55 on Jan 16, 2019

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
If I treat every layer separately. I could perform pathfinding to every valid staircase that successfully navigates all the levels.

If the paths between staircases are calculated ahead of time then I will already know which staircases are capable of delivering me to the destination from the level I am at. It's possible this will save cycles because I'll be performing more pathfinding operations but they'll be smaller. Any intermediate layers, like layer 4 from my example would be instant.

I know staircase A and F for example on layer 5 both lead to corridors that have staircases V and Y that go down to layer 3. So I path from my source to A and F. Then I path from V and Y to my destination, and figure out which is the shortest route overall, discarding the other options. The path would be for example my path to F plus the pre-calculated path to V plus my path to the destination.

The trade off I suppose is that if there's tons of staircases this could get really expensive.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
The other tradeoff is that if I'm only travelling one level, then I would have to path to and from all staircases that are between the levels. Which might be a big huge waste of time, when a normal use of the algorithm might have been simpler. Do I need to try both solutions? Are either of these options obviously worse than the other?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Nolgthorn posted:

The other tradeoff is that if I'm only travelling one level, then I would have to path to and from all staircases that are between the levels. Which might be a big huge waste of time, when a normal use of the algorithm might have been simpler. Do I need to try both solutions? Are either of these options obviously worse than the other?
If you're just dealing with a grid like a Roguelike game, and you're not doing pathfinding every frame of a smooth-animated game, just use the algorithm normally and don't think about caching or shortcuts. The algorithm is very fast, and writing better ways is not very fast. You probably even could do it every frame of a smooth-animated game unless the grid is very huge or you have many many agents trying to travel long distances.

Mata
Dec 23, 2003
Well as always be 100% sure you need to optimize before you start doing so.
Often, hierarchical pathfinding is the most natural first optimization for A*. E.g divide your map into chunks of 8x8 tiles and treat each such chunk as a pathfinding node to generate an initial coarse path, then just pathfind one chunk ahead of your agents as they move.
JPS is an option but you gotta get fancy to make stairs work.
If you have hundreds of agents and really want to sink months into this, flowfields are cool.

Aside from algorithmic optimizations you can sometimes get orders of magnitude faster by e.g. ensuring you're not allocating on the heap in tight loops, use the faststack optimization to minimize access to the open list priority queue.

BarbarianElephant
Feb 12, 2015
The fairy of forgiveness has removed your red text.
What’s the best source control system for a game with large files and a developer with crappy rural internet?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
I was wondering why unity didn’t have built in a way to yield a coroutine to a task. Turns out it’s basically a one liner.

WaitForTask

One wonders why unity doesn’t just have more of these convenience wrappers.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

BarbarianElephant posted:

What’s the best source control system for a game with large files and a developer with crappy rural internet?

How large?

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.

BarbarianElephant posted:

What’s the best source control system for a game with large files and a developer with crappy rural internet?

Something distributed, so you can commit changes locally, and push to a remote repository over night. I use git lfs but there are probably multiple things that fit the bill.

BarbarianElephant
Feb 12, 2015
The fairy of forgiveness has removed your red text.

leper khan posted:

How large?

An indie game written in Unity. So not spectacularly large but not text files either.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Both bitbucket and github don't seem to have a problem with repositories up to 1GB in size. Bitbucket says that 2GB is a hard limit, github is more vague. I'd suggest putting it all on github because I don't care as much about them as my precious bitbucket. This makes me nervous but someone wrote a utility called git-split if you want to try it.

The Fool
Oct 16, 2003


Azure DevOps Repos supports git lfs and "unlimited" repo sizes, and is free for 5 users.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Re: The SpatialOS incident, Unity has completely reversed course on it.

https://blogs.unity3d.com/2019/01/16/updated-terms-of-service-and-commitment-to-being-an-open-platform/

TLDR ToS terms now apply forward for the entire remainder of the major version (even through updates, even if an update includes new ToS terms), the cloud platform language was heavily relaxed, and Improbable's license was reinstated.

Adbot
ADBOT LOVES YOU

BarbarianElephant
Feb 12, 2015
The fairy of forgiveness has removed your red text.

Nolgthorn posted:

Both bitbucket and github don't seem to have a problem with repositories up to 1GB in size. Bitbucket says that 2GB is a hard limit, github is more vague. I'd suggest putting it all on github because I don't care as much about them as my precious bitbucket. This makes me nervous but someone wrote a utility called git-split if you want to try it.

Everyone on the project except me hates git because it's easy for non-technical people to gently caress up.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply