Comments (19)
That seems like a good addition. It seems like a client-state synchronisation issue similar to #41. Is it better to send the server the information on the projectile upon switching or is it better to attempt to remove it?
from dimensions.
Transferring the projectiles over is nearly impossible: Even if the client is able to keep the owner+ident combo of the projectiles, the chances that the global(server) projectile id is unused in the new dimension are pretty slim.
So killing off projectiles seems like the way to go: Buff-based projectiles will be respawned by the buff refresh loop on the client, Equipment-based projectiles will be respawned by the equips update loop on the client.
Letting the client start off from scratch (like after running /clear projectiles) will cause the least issues.
from dimensions.
I don't think that's how it works from what I remember. The client decides on an id, and that is bound with their player id (what you said about owner+ident) to identify projectiles, the server will search through its array until it finds that combination for any projectile updates, I don't remember any server-side projectile id. I don't know how that interacts with the client when their player id changes though.
Buff-based projectiles may be respawned, but do you get things like the Solar Flare shield getting reset? That might be problematic.
from dimensions.
Also each client knows about the projectiles of other players. And when you jump dimensions those "other" projectiles will just lay dormant in the client memory. (That is if the client doesn't have one global 1000 projectiles array and instead keeps arrays for each player... Which I doubt)
Making the client forget everything about the previous dimension and then feed it information about the new dimension (we might have to send all server projectiles of the new server during the transition
I will check how Solar Flare works, thanks for the heads up.
from dimensions.
Solar Flare isn't a projectile but rather client-side Dust(s). Works directly off of Buffs (type 170, 171, 172).
This buff (and the chloro buff in the example above) check their consistency every tick.
tl;dr: The player will keep his current Solar Flare level and the Solar Flare levelup counter.
from dimensions.
How about minions? Does that reset the minions spawned?
from dimensions.
Minions are projectiles, so yes. And might be for the better since the new dimension might have different inventory/permissions.
from dimensions.
Yes but I don't believe that should be the responsibility of Dimensions. The server itself could easily remove them on the case that it doesn't want them. It would be especially annoying in the case that no SSC is involved, and the user is constantly getting their minions removed.
from dimensions.
Constantly? I guess there's a use case involving a LOT of dimension shifts.
Guess emulating all the ProjectileNew packets will be the solution?
from dimensions.
I'm just not sure how the server will react to new projectiles a mile away from where the player appears or even off the map if the world size is different.
from dimensions.
Would it be possible to add a config option for the switcher to either push the projectiles over or to kill them? If the target dimension is SSC and the transferred projectiles don't line up with their SSC inventory it could trigger an anti-cheat.
Or at least lower the Player.State below 10 until they are fully aware of the new dimension?
from dimensions.
Well a config option might work, because that way the host can choose which one fits what they're doing best. May also be possible to give the option to clear "always" or "ssc", so that they can enable it for SSC only? Since that sounds like the biggest reason to use clearing.
from dimensions.
Great idea since you can detect if the target dimension is in SSC mode
"never", "ssc", "always"
from dimensions.
I assume that you're not up for programming it, so I self assigned it but if I am wrong then I'd be welcoming to a PR that adds it, since I don't have a lot of time to work on it.
from dimensions.
I've never used typescript/javascript so you clearly have more expertise in this.
...
Nobody has time nowadays, I know
from dimensions.
I know it's been a while and I've not worked on it yet, I'm hoping that I can get around to it soon once I have time off.
from dimensions.
You can test the build using the zip at #56 and let me know if that does what you want yet. It keeps track of client projectiles and will send destroy projectile for each active projectile to the client when receiving world info while switching.
from dimensions.
Oh and I forgot to mention that you need to add the following to the config:
synchronization: {
projectiles: {
enabled: true,
type: "clear",
when: "ssc",
}
}
from dimensions.
The problem with "keep" is that you can't guarantee that the target dimension will have free/enough projectile slots. They are hardcoded to 1000 slots and run out very quickly with a couple of players. Mostly only possible for small minigame-like dimensions.
from dimensions.
Related Issues (20)
- Some bugs in the Preview-releasessss! HOT 5
- 希望可以支持Proxy Protocol HOT 3
- 如何修改服务器聊天窗语言 HOT 8
- Stuck after transmission failure(传送失败后卡住)
- Invisible Players HOT 1
- 为什么跳转维度之后需要重新/login HOT 13
- Different version than the server. HOT 1
- 从大厅传送到另一个世界再传送回大厅地图部分方块会空白 HOT 2
- Player can't see each otcher HOT 4
- 测试版维度把光标放到玩家身上不会显示玩家名 HOT 16
- Terraria-Servers do not showing player count correctly HOT 1
- 如何获取玩家真实ip HOT 1
- Dimensions-5.9.1 NPCUpdate-Log报错 HOT 7
- Switch dimensions between servers cause inventory lag. HOT 5
- 泰拉瑞亚1.4.4.9版本更新后玩家传送之后装备栏会出现问题 HOT 2
- IP errors and connection to other dimensions HOT 21
- How can i use restapi to check online list? HOT 4
- How to use Crossplay in Dimensions properly? HOT 4
- How to disable currentTerrariaVersion in config?It cause some problem when some plugins check player version. HOT 8
- Considering reading config file path from environment variable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dimensions.