| 08-21-2007, 09:17 PM | #1 |
I know that using the get location Z can cause desyncs but could i pass a variable from one player to the other players to resync the Z value? I was thinking send a chat string to all players from player 1 then using that Z value as the basis for the other player... Any ideas on if that would work or any ideas on a better method for passing the Z value? |
| 08-21-2007, 09:22 PM | #2 |
JASS:native SyncStoredReal takes gamecache cache, string missionKey, string key returns nothing I am not sure if this will work, never tried it myself. Why don't you simply make spells without GetLocationZ() ? |
| 08-21-2007, 10:05 PM | #3 |
Why don't you simply make spells without terrain deformations? |
| 08-21-2007, 10:39 PM | #4 |
because i dont know how to take them out of stomp and shockwave and i have some spells that use them that I would be hard pressed to remake ~.~ and also i was thinking of making a pathing system and would need to be able to use getlocationZ And you can ask pyrogasm im odd and like to put limits on what i can and cant do when making spells or w/e... |
| 08-21-2007, 11:01 PM | #5 |
Seriously, syncing a real value is like 1000x harder to even think of than just remaking some stupid spells. |
| 08-21-2007, 11:14 PM | #6 |
Well you don't have to use GetLocationZ() if you plan on using only simple movement triggers like knockback for example. Even jump can be made without GetLocationZ, it would look ok on flat ground, and not so ok when jumping over cliffs, but in 90% cases it does not really matter. On the other hand you can use GetLocationZ, but you must make sure you have no terrain deforms in your map. So to put it simply, you have two options to choose from, choose the one that is best for you. |
| 08-21-2007, 11:14 PM | #7 |
hard doesn't stop me :P im looking at it as a challenge and well hey what if the makers of the JASS new gen pack said it was too hard ^.^ im gonna do it if it is possible just I am trying to figure out the best way before i go make units fall through the floor :P And cohadar I know i can just "not use terrain deformations" but that isn't the point. The point is to be able to use them and not desync. |
| 08-21-2007, 11:23 PM | #8 |
Don't get me wrong here, but you are too unexperienced in JASS to make stuff like that. And although Z can be synced it would not work for the simple reason it would lag to much. Syncing a variable Z means that host picks a value for Z and then sends that Z to every other player to use it, and because Z is usually used for movements, a.k.a in periodic timers with something like 0.04 period that would INSTANTLY lag the game to death. So even if you make it sync it will not work because everybody will lag. PS: We are the borg, any resist is futile, lower your shields and prepare to be annihilated. |
| 08-21-2007, 11:51 PM | #9 |
LOL about the borg ne ways the desync only will happen in areas that you use the getlocationZ and as such only units in that area need the value from the host. I know that a streaming sync isn't plausible due to lag however sending the value once every .05 seconds would just be one more value and should be close enough to look decent. The main thing is that this will only be called for units in a certain area so it would be MABY 10 units that would need new assigned values. Basically i just need help with the sending of the sync value. I know strings are slow so i would like to find a better way. PS: Dont underestimate the pasionate JASS noobs all your base are belong to us!!! Also i have solved harder problems then this with less experience then what I have now. PPS: and telling me I cant do something doesnt ever work. I cant make a unit flying without creating a duplicate unit? Well i have a system now that does it :P |
| 08-22-2007, 01:08 AM | #10 |
If you really, really want to use GetLocationZ-based spells/systems in your map along with terrain deformations... then the easiest thing to do is not syncing z values. The easiest thing to do would be to sample z values on a grid when the map starts (when there are no deformations yet) and store them to a database (arrays may be too small unless the map is small or the sample grid is very large, but that's ugly, so we would use gamecache for this), then replace each GetLocationZ in the map with a custom function that retrieves the nearest 4 z values from game cache and interpolates between them. It's slow, but probably still faster than syncing reals. |
| 08-22-2007, 01:34 AM | #11 |
So then how slow all in all do you think it would be, except at load of course when the cache would be created (which would take a good few seconds)? Also how badly would doing that hurt the overall map / the gamecache? PS: thanks for not just saying "dont do it" :P Edit: Humm while arrays might be messy i wonder if i used an array as an x, y crossrefrence if that would be faster... |
