2 Questions

Discussions about Coding and Scripting
User avatar
Feralidragon
Godlike
Posts: 5506
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

2 Questions

Post by Feralidragon »

This is just by curiosity and I hope someone knows to answer this, honestly (perhaps they are quite easy questions, but I really don't know):

1 - In CheckReplacement function, on the mutator class, I noticed it isn't able to replace every actor several months ago when I was doing xZones for my SP.
So my question: I know it replaces inventory, carcasses, some other classes, but doesn't replace projectiles for example, so does the CheckReplacement really ignores specifically projectiles and a few other classes (hard-coded), or it's some setting (internal or not) in the classes which avoid the CheckReplacement being called for them?

2 - I always thought, by looking at the Guided Redeemer, SLV and even RX code, that the whole guiding handling could be made more effectivelly, using less bandwidth and a lot less code, but also I see the same kind of code on playerpawns...
I have seen a lot of mistakes in Epic's coding, mostly optimizations, useless and even stupid stuff (like in the translocator, some projectiles, effects, etc).
So am I wrong, and there's no more reliable and faster way to make those kind of projectiles, and there's indeed room for improvement using the SimulatedProxy, for example, in an effective way with just some integrity checks between server and client? I have the impression of being so, but it's just me?


Just 2 questions that I have in my head from several months. You might find them quite dumb, but I have really those doubts.
User avatar
TheDane
Masterful
Posts: 661
Joined: Tue Feb 12, 2008 2:47 pm
Personal rank: Happy fool :-)

Re: 2 Questions

Post by TheDane »

A1: I've nothing to base it on but own expiriences, but it seems to me that CheckRelpacements will work on most actors that are present in the map at all times, while projectiles are spawned into the map depending on player actions etc. Though it doesn't quite explain how it works on carcasses, but i guess it's because carcasses are "steady"? they just spawn at the players last known position in the game and is assigned the lpayers velocity. Projectiles are spawned a little different, they also origin from players position and given a velocity, BUT, not all projectiles are hitscan made, so it needs updating on-the-fly to check if a player is touching it. Though you can chenge the projectile class using the AlwaysKeep function.

A2: Epic's code does have a lot of bugs and things included that are not used. Ofcause most of the code hasn't been 100% optimized, so there should be room for optimizations. The reason why Epic's code may seem to take too much bandwidth is to be found in the date of origin i think, 1999, the majority used dial-up connections back then, so bad ping and packet losses was more common than today, therfore they wanted to ensure that the replication was done as good as possible. You are right about the optimizations, but they only apply if players have zero packet losses.
Retired.
User avatar
Feralidragon
Godlike
Posts: 5506
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: 2 Questions

Post by Feralidragon »

Thanks for enlighten me on this. :tu:

As for the CheckReplacement, it seems there's more to it than what it seems...

As for guided projectiles, it would work great if there were no packet losses... but even so I feel it can be optimized without having that issue affecting it much... but it's just me.