| 06-13-2004, 11:47 AM | #1 |
1.What are the differences between DisplayTimedTextToPlayer and DisplayTimedTextFromPlayer ? 2.In blizzard.j it usually displays text only for local player, like: Code:
function DisplayTextToForce takes force toForce, string message returns nothing
if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
// Use only local code (no net traffic) within this block to avoid desyncs.
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, message)
endif
endfunctionWhat will happen if you call DisplayTextToPlayer to a specific player, ex: call DisplayTextToPlayer(Player(0), 0, 0, "test") Will it cause dsyncs?? 3.Could caches be used on b.net?? I've heard that when all players' same-name cache data has different things, it dsyncs. But what will happen if you just stores data and load data in the same game( use like variables, but it sometimes be more convenient than vars ). If it doesn't dsyncs, how to write?? 4.Will FadeFilter for a local player dsyncs?? 5.Will SetUnitVertexColor for a local player dsyncs?? |
| 06-13-2004, 12:22 PM | #2 |
2. I think that works without desync. 3. You can't store or load caches from disk in b.net but you can use them within a game to store data. Especially together with the return bug that is very useful 5. No, it will not desync. It is local. |
| 06-13-2004, 01:40 PM | #3 |
1. I did once check this, I just forgot the results >_<. 2. Doesn't de-sync (it is made for usage for specific players, so it'd suck if it did de-sync, but no, it doesn't) 4. Doesn't de-sync ~Cubasis |
| 06-13-2004, 02:08 PM | #4 |
2.I'm just wondering. If it doesn't dsync, why does Blizzard make it local?? 3.I can understand what AI-Andy you just said>"< If I only save and load cache in a same game, would it dsyncs?? And if it doesn't, how can I do? Use StoreInteger or SyncStoreInteger instead? |
| 06-13-2004, 02:11 PM | #5 |
I've heard that Pan Camera As Necessarily (SmartPan) dsyncs. But Pan Camera doesn't. It seems that GetCurrentCamera dsyncs on b.net...does it? (I can't create games on b.net, so it's hard for me to test. could someone help me?_? ) |
| 06-13-2004, 02:14 PM | #6 |
2: Nah, they're just coding this (for once) smartly. So only the players who are in the force run the statement on themselves. It could have been done in a loop, but that would just have been way less efficient. 3: When you work with gamecache at start, you're only working with data in memory, not in files, and that works 100% in multiplayer, that is, to save and load gamecache from memory. It's only to SaveToFile that doesn't work in MP, no matter what. So you can use the game cache as global dynamic variables as much as you like. And yes, becouse GetCurrentCamera is one of the few functions to return local data. That is, each player has different GetCurrentCamera, so if you do something on the data you get by this function, you are risking de-syncage. Pan Camera as Neccessary just has a silly flaw, and should be avoided. ~Cubasis |
| 06-13-2004, 02:14 PM | #7 |
Here's another question which isn't about jass... I've heard that when the host leaves in a custom game, the game will be over, and all players disconnects...Is that true?? It it is, what would happen if the host defeats?? (May host be undefeatable-_-"?) |
| 06-13-2004, 02:16 PM | #8 |
Nah, that's not true. Host can be defeated but the game continues. However, in some instances, if the host crashes/disconnects suddenly of abnormal reasons, all the other players disconnect too. That happens only sometimes though. ~Cubasis |
| 06-13-2004, 02:17 PM | #9 |
3. Thanks for answering. But I still want to know - If I want to store and load an integer, should I use StoreInteger or SyncStoreInteger or other method? |
| 06-13-2004, 02:19 PM | #10 |
Store<Type> for storing, GetStored<Type> for loading. |
| 06-13-2004, 02:19 PM | #11 | |
Quote:
|
| 06-13-2004, 02:20 PM | #12 |
Well, who knows. Who knows if the game really depends on a certain "host" as such. That depends on the network code, perhaps it's all just P2P :), but yes, that's likely the case. ~Cubasis |
| 06-13-2004, 09:39 PM | #13 |
It does need a host and my guess as to why people get disconnected when host leaves is that Warcraft assigns host to players that cannot really host and then they get disconnected. |
| 06-14-2004, 10:08 AM | #14 | |
Quote:
|
| 06-14-2004, 11:05 AM | #15 |
Not necessarily. Just that there is a new host assigned and if that one cannot really host then that one is disconnected and a new host is assigned again and so on until he finds one that can host. I am not 100% sure that this is how it works but it would explain why often several get disconnected when host leaves/disconnects. |
