Emperor
July 26th, 2010, 01:12
For our project, we want full clipped following.
So, I've been thinking for about 10 minutes on what the possabilities are.
We came up with this:
/**
* Finding ways to prevent no-clipping:
* 1. Mimic the followers path.
* 2. Make a database containing all the 'solid' coordinates.
* 3. Make a packet sending from source to client containing the coords, let client check and send a packet back. (?)
* 4. Make the regionloader packet send all unwalkable tiles in that mapregion.
* 5. Make a huge-antic array (or XML file) containing all solid objects, and check that every time you're going to move.
*/
1: Mimics the player you're following his path, thus doing exactly the same just 1-3 tiles behind him.
2: Making a database containing all the clipped coordinates (Example: Binairy file), and check that database every step.
3: Send a packet from the source to the client containing the coordinates, client checks these and sends a packet back weither it's clipped or not.
4: Make the regionloader packet send the clipped tiles in that mapregion, check these every step.
5: Make a huge array or make an XML file containing all the clipped coordinates, check these every step.
Personally, I'd say number 1, 3 or 4:
1 Because it doesn't require a check per step. (Downside: looks terrible)
3 Because it doesn't require to check a huge database or array per step.
4, My favourit one: Make the regionloader packet send all the clipped coordinates, thus having to check way less coordinates clipped per step.
Please vote what you think would be the best way.
Or post if you know better ways/what you voted.
Thank you very much, we really need this.
So, I've been thinking for about 10 minutes on what the possabilities are.
We came up with this:
/**
* Finding ways to prevent no-clipping:
* 1. Mimic the followers path.
* 2. Make a database containing all the 'solid' coordinates.
* 3. Make a packet sending from source to client containing the coords, let client check and send a packet back. (?)
* 4. Make the regionloader packet send all unwalkable tiles in that mapregion.
* 5. Make a huge-antic array (or XML file) containing all solid objects, and check that every time you're going to move.
*/
1: Mimics the player you're following his path, thus doing exactly the same just 1-3 tiles behind him.
2: Making a database containing all the clipped coordinates (Example: Binairy file), and check that database every step.
3: Send a packet from the source to the client containing the coordinates, client checks these and sends a packet back weither it's clipped or not.
4: Make the regionloader packet send the clipped tiles in that mapregion, check these every step.
5: Make a huge array or make an XML file containing all the clipped coordinates, check these every step.
Personally, I'd say number 1, 3 or 4:
1 Because it doesn't require a check per step. (Downside: looks terrible)
3 Because it doesn't require to check a huge database or array per step.
4, My favourit one: Make the regionloader packet send all the clipped coordinates, thus having to check way less coordinates clipped per step.
Please vote what you think would be the best way.
Or post if you know better ways/what you voted.
Thank you very much, we really need this.